Class: Gateway::ShoppingCartCollection
- Inherits:
-
Object
- Object
- Gateway::ShoppingCartCollection
- Defined in:
- lib/gateway/ShoppingCart/shopping_cart.rb
Instance Attribute Summary collapse
-
#DeliveryAddress ⇒ Object
Returns the value of attribute DeliveryAddress.
-
#DeliveryDeadline ⇒ Object
Returns the value of attribute DeliveryDeadline.
-
#EstimatedDeliveryDate ⇒ Object
Returns the value of attribute EstimatedDeliveryDate.
-
#FreighCostInCents ⇒ Object
Returns the value of attribute FreighCostInCents.
-
#ShippingCompany ⇒ Object
Returns the value of attribute ShippingCompany.
-
#ShoppingCartItemCollection ⇒ Object
Returns the value of attribute ShoppingCartItemCollection.
Instance Method Summary collapse
-
#initialize ⇒ ShoppingCartCollection
constructor
A new instance of ShoppingCartCollection.
- #to_json ⇒ Object
Constructor Details
#initialize ⇒ ShoppingCartCollection
Returns a new instance of ShoppingCartCollection.
17 18 19 20 |
# File 'lib/gateway/ShoppingCart/shopping_cart.rb', line 17 def initialize @ShoppingCartItemCollection = Array.new @DeliveryAddress = DeliveryAddress.new end |
Instance Attribute Details
#DeliveryAddress ⇒ Object
Returns the value of attribute DeliveryAddress.
13 14 15 |
# File 'lib/gateway/ShoppingCart/shopping_cart.rb', line 13 def DeliveryAddress @DeliveryAddress end |
#DeliveryDeadline ⇒ Object
Returns the value of attribute DeliveryDeadline.
9 10 11 |
# File 'lib/gateway/ShoppingCart/shopping_cart.rb', line 9 def DeliveryDeadline @DeliveryDeadline end |
#EstimatedDeliveryDate ⇒ Object
Returns the value of attribute EstimatedDeliveryDate.
7 8 9 |
# File 'lib/gateway/ShoppingCart/shopping_cart.rb', line 7 def EstimatedDeliveryDate @EstimatedDeliveryDate end |
#FreighCostInCents ⇒ Object
Returns the value of attribute FreighCostInCents.
5 6 7 |
# File 'lib/gateway/ShoppingCart/shopping_cart.rb', line 5 def FreighCostInCents @FreighCostInCents end |
#ShippingCompany ⇒ Object
Returns the value of attribute ShippingCompany.
11 12 13 |
# File 'lib/gateway/ShoppingCart/shopping_cart.rb', line 11 def ShippingCompany @ShippingCompany end |
#ShoppingCartItemCollection ⇒ Object
Returns the value of attribute ShoppingCartItemCollection.
15 16 17 |
# File 'lib/gateway/ShoppingCart/shopping_cart.rb', line 15 def ShoppingCartItemCollection @ShoppingCartItemCollection end |
Instance Method Details
#to_json ⇒ Object
22 23 24 25 26 |
# File 'lib/gateway/ShoppingCart/shopping_cart.rb', line 22 def to_json hash = {} instance_variables.each { |var| hash[var.to_s.delete('@')] = instance_variable_get(var) } hash end |