class Beaver::FundraisingEvent
FundraisingEvent
Model.
Attributes
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [CurrencyEnum]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [Integer]
TODO: Write general description for this method @return [Integer]
TODO: Write general description for this method @return [Integer]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [List of String]
TODO: Write general description for this method @return [String]
Public Class Methods
Creates an instance of the object from a hash.
# File lib/beaver/models/fundraising_event.rb, line 88 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash['name'] currency = hash['currency'] event_time = hash['event_time'] fundraising_goal = hash['fundraising_goal'] giving_deadline = hash['giving_deadline'] uri = hash['uri'] description = hash['description'] photo_uris = hash['photo_uris'] campaign_category = hash['campaign_category'] campaign_team = hash['campaign_team'] # Create object from extracted values. FundraisingEvent.new(name, currency, event_time, fundraising_goal, giving_deadline, uri, description, photo_uris, campaign_category, campaign_team) end
A mapping from model property names to API property names.
# File lib/beaver/models/fundraising_event.rb, line 50 def self.names @_hash = {} if @_hash.nil? @_hash['currency'] = 'currency' @_hash['event_time'] = 'event_time' @_hash['fundraising_goal'] = 'fundraising_goal' @_hash['giving_deadline'] = 'giving_deadline' @_hash['name'] = 'name' @_hash['uri'] = 'uri' @_hash['description'] = 'description' @_hash['photo_uris'] = 'photo_uris' @_hash['campaign_category'] = 'campaign_category' @_hash['campaign_team'] = 'campaign_team' @_hash end
# File lib/beaver/models/fundraising_event.rb, line 65 def initialize(name = nil, currency = nil, event_time = nil, fundraising_goal = nil, giving_deadline = nil, uri = nil, description = nil, photo_uris = nil, campaign_category = nil, campaign_team = nil) @currency = currency @event_time = event_time @fundraising_goal = fundraising_goal @giving_deadline = giving_deadline @name = name @uri = uri @description = description @photo_uris = photo_uris @campaign_category = campaign_category @campaign_team = campaign_team end