Class: RallyUp::Partner::CampaignItem
- Inherits:
-
Object
- Object
- RallyUp::Partner::CampaignItem
- Defined in:
- lib/rally_up/partner/campaign_item.rb
Instance Attribute Summary collapse
-
#associated_prize_id ⇒ Object
Returns the value of attribute associated_prize_id.
-
#associated_prize_title ⇒ Object
Returns the value of attribute associated_prize_title.
-
#availability ⇒ Object
Returns the value of attribute availability.
-
#available_start_date ⇒ Object
Returns the value of attribute available_start_date.
-
#availableend_date ⇒ Object
Returns the value of attribute availableend_date.
-
#bundle_quantity ⇒ Object
Returns the value of attribute bundle_quantity.
-
#campaign_id ⇒ Object
Returns the value of attribute campaign_id.
-
#campaign_type ⇒ Object
Returns the value of attribute campaign_type.
-
#category ⇒ Object
Returns the value of attribute category.
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#price ⇒ Object
Returns the value of attribute price.
-
#terminology_plural ⇒ Object
Returns the value of attribute terminology_plural.
-
#terminology_singular ⇒ Object
Returns the value of attribute terminology_singular.
-
#thumbnail_url ⇒ Object
Returns the value of attribute thumbnail_url.
-
#title ⇒ Object
Returns the value of attribute title.
-
#total_quantity_available ⇒ Object
Returns the value of attribute total_quantity_available.
-
#total_sold ⇒ Object
Returns the value of attribute total_sold.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(json) ⇒ CampaignItem
constructor
A new instance of CampaignItem.
Constructor Details
#initialize(json) ⇒ CampaignItem
Returns a new instance of CampaignItem.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/rally_up/partner/campaign_item.rb', line 13 def initialize(json) @id = json[:Id] @campaign_id = json[:CampaignId] @campaign_type = json[:CampaignType] @title = json[:Title] @type = json[:Type] @terminology_singular = json[:TerminologySingular] @terminology_plural = json[:TerminologyPlural] @thumbnail_url = json[:ThumbnailUrl] @price = json[:Price] @description = json[:Description] @bundle_quantity = json[:BundleQuantity] @total_quantity_available = json[:TotalQuantityAvailable] @total_sold = json[:TotalSold] @available_start_date = json[:AvailableStartDate] @availableend_date = json[:AvailableEndDate] @availability = json[:Availability] @category = json[:Category] @associated_prize_id = json[:AssociatedPrizeId] @associated_prize_title = json[:AssociatedPrizeTitle] end |
Instance Attribute Details
#associated_prize_id ⇒ Object
Returns the value of attribute associated_prize_id.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def associated_prize_id @associated_prize_id end |
#associated_prize_title ⇒ Object
Returns the value of attribute associated_prize_title.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def associated_prize_title @associated_prize_title end |
#availability ⇒ Object
Returns the value of attribute availability.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def availability @availability end |
#available_start_date ⇒ Object
Returns the value of attribute available_start_date.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def available_start_date @available_start_date end |
#availableend_date ⇒ Object
Returns the value of attribute availableend_date.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def availableend_date @availableend_date end |
#bundle_quantity ⇒ Object
Returns the value of attribute bundle_quantity.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def bundle_quantity @bundle_quantity end |
#campaign_id ⇒ Object
Returns the value of attribute campaign_id.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def campaign_id @campaign_id end |
#campaign_type ⇒ Object
Returns the value of attribute campaign_type.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def campaign_type @campaign_type end |
#category ⇒ Object
Returns the value of attribute category.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def category @category end |
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def id @id end |
#price ⇒ Object
Returns the value of attribute price.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def price @price end |
#terminology_plural ⇒ Object
Returns the value of attribute terminology_plural.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def terminology_plural @terminology_plural end |
#terminology_singular ⇒ Object
Returns the value of attribute terminology_singular.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def terminology_singular @terminology_singular end |
#thumbnail_url ⇒ Object
Returns the value of attribute thumbnail_url.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def thumbnail_url @thumbnail_url end |
#title ⇒ Object
Returns the value of attribute title.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def title @title end |
#total_quantity_available ⇒ Object
Returns the value of attribute total_quantity_available.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def total_quantity_available @total_quantity_available end |
#total_sold ⇒ Object
Returns the value of attribute total_sold.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def total_sold @total_sold end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/rally_up/partner/campaign_item.rb', line 6 def type @type end |
Class Method Details
.list(campaign_id) ⇒ Object
36 37 38 39 40 41 |
# File 'lib/rally_up/partner/campaign_item.rb', line 36 def list(campaign_id) json = RallyUp::Partner.json(:get, '/v1/partnerapi/campaignitems', params: { campaignID: campaign_id }) RallyUp::ListObject.new(json, self) end |