Class: TaxCloud::Responses::CartItem
- Inherits:
-
Object
- Object
- TaxCloud::Responses::CartItem
- Defined in:
- lib/tax_cloud/responses/cart_item.rb
Overview
A single item in the response to a TaxCloud Lookup API call.
Instance Attribute Summary collapse
-
#cart_item_index ⇒ Object
The index of the cart item.
-
#tax_amount ⇒ Object
Tax amount for this cart item.
Instance Method Summary collapse
-
#initialize(savon_response) ⇒ CartItem
constructor
Parameters [savon_response] SOAP response.
Constructor Details
#initialize(savon_response) ⇒ CartItem
Parameters
- savon_response
-
SOAP response.
17 18 19 20 |
# File 'lib/tax_cloud/responses/cart_item.rb', line 17 def initialize(savon_response) self.cart_item_index = savon_response[:cart_item_index].to_i self.tax_amount = BigDecimal.new(savon_response[:tax_amount]) end |
Instance Attribute Details
#cart_item_index ⇒ Object
The index of the cart item.
10 11 12 |
# File 'lib/tax_cloud/responses/cart_item.rb', line 10 def cart_item_index @cart_item_index end |
#tax_amount ⇒ Object
Tax amount for this cart item.
13 14 15 |
# File 'lib/tax_cloud/responses/cart_item.rb', line 13 def tax_amount @tax_amount end |