Class: Gateway::ShoppingCartCollection

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeShoppingCartCollection

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

#DeliveryAddressObject

Returns the value of attribute DeliveryAddress.



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

def DeliveryAddress
  @DeliveryAddress
end

#DeliveryDeadlineObject

Returns the value of attribute DeliveryDeadline.



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

def DeliveryDeadline
  @DeliveryDeadline
end

#EstimatedDeliveryDateObject

Returns the value of attribute EstimatedDeliveryDate.



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

def EstimatedDeliveryDate
  @EstimatedDeliveryDate
end

#FreighCostInCentsObject

Returns the value of attribute FreighCostInCents.



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

def FreighCostInCents
  @FreighCostInCents
end

#ShippingCompanyObject

Returns the value of attribute ShippingCompany.



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

def ShippingCompany
  @ShippingCompany
end

#ShoppingCartItemCollectionObject

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_jsonObject



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