Class: Gateway::ShoppingCartItemCollection

Inherits:
Object
  • Object
show all
Defined in:
lib/gateway/ShoppingCart/shopping_cart_item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#DescriptionObject

Returns the value of attribute Description.



15
16
17
# File 'lib/gateway/ShoppingCart/shopping_cart_item.rb', line 15

def Description
  @Description
end

#DiscountAmountInCentsObject

Returns the value of attribute DiscountAmountInCents.



17
18
19
# File 'lib/gateway/ShoppingCart/shopping_cart_item.rb', line 17

def DiscountAmountInCents
  @DiscountAmountInCents
end

#ItemReferenceObject

Returns the value of attribute ItemReference.



5
6
7
# File 'lib/gateway/ShoppingCart/shopping_cart_item.rb', line 5

def ItemReference
  @ItemReference
end

#NameObject

Returns the value of attribute Name.



13
14
15
# File 'lib/gateway/ShoppingCart/shopping_cart_item.rb', line 13

def Name
  @Name
end

#QuantityObject

Returns the value of attribute Quantity.



7
8
9
# File 'lib/gateway/ShoppingCart/shopping_cart_item.rb', line 7

def Quantity
  @Quantity
end

#TotalCostInCentsObject

Returns the value of attribute TotalCostInCents.



11
12
13
# File 'lib/gateway/ShoppingCart/shopping_cart_item.rb', line 11

def TotalCostInCents
  @TotalCostInCents
end

#UnitCostInCentsObject

Returns the value of attribute UnitCostInCents.



9
10
11
# File 'lib/gateway/ShoppingCart/shopping_cart_item.rb', line 9

def UnitCostInCents
  @UnitCostInCents
end

Instance Method Details

#to_jsonObject



19
20
21
22
23
# File 'lib/gateway/ShoppingCart/shopping_cart_item.rb', line 19

def to_json
  hash = {}
  instance_variables.each { |var| hash[var.to_s.delete('@')] = instance_variable_get(var) }
  hash
end