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.
15 16 17 18 |
# File 'lib/tax_cloud/responses/cart_item.rb', line 15 def initialize(savon_response) self.cart_item_index = savon_response[:cart_item_index].to_i self.tax_amount = savon_response[:tax_amount].to_f end |
Instance Attribute Details
#cart_item_index ⇒ Object
The index of the cart item.
8 9 10 |
# File 'lib/tax_cloud/responses/cart_item.rb', line 8 def cart_item_index @cart_item_index end |
#tax_amount ⇒ Object
Tax amount for this cart item.
11 12 13 |
# File 'lib/tax_cloud/responses/cart_item.rb', line 11 def tax_amount @tax_amount end |