Class: FastSpring::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/fastspring-saasy/item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(details) ⇒ Item

Returns a new instance of Item.



4
5
6
7
8
9
# File 'lib/fastspring-saasy/item.rb', line 4

def initialize(details)
  @product_display = details.fetch('productDisplay')
  @product_name = details.fetch('productName')
  @quantity = details.fetch('quantity')
  @subscription_reference = details.fetch('subscriptionReference')
end

Instance Attribute Details

#product_displayObject (readonly)

Returns the value of attribute product_display.



3
4
5
# File 'lib/fastspring-saasy/item.rb', line 3

def product_display
  @product_display
end

#product_nameObject (readonly)

Returns the value of attribute product_name.



3
4
5
# File 'lib/fastspring-saasy/item.rb', line 3

def product_name
  @product_name
end

#quantityObject (readonly)

Returns the value of attribute quantity.



3
4
5
# File 'lib/fastspring-saasy/item.rb', line 3

def quantity
  @quantity
end

#subscription_referenceObject (readonly)

Returns the value of attribute subscription_reference.



3
4
5
# File 'lib/fastspring-saasy/item.rb', line 3

def subscription_reference
  @subscription_reference
end