Class: Suretax::Api::Group
- Inherits:
-
Object
- Object
- Suretax::Api::Group
- Defined in:
- lib/suretax/api/group.rb
Instance Attribute Summary collapse
-
#customer ⇒ Object
readonly
Returns the value of attribute customer.
-
#invoice ⇒ Object
readonly
Returns the value of attribute invoice.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#taxes ⇒ Object
readonly
Returns the value of attribute taxes.
Instance Method Summary collapse
-
#initialize(response_params) ⇒ Group
constructor
A new instance of Group.
Constructor Details
#initialize(response_params) ⇒ Group
Returns a new instance of Group.
6 7 8 9 10 11 12 |
# File 'lib/suretax/api/group.rb', line 6 def initialize(response_params) @state = response_params.fetch("StateCode") @invoice = response_params.fetch("InvoiceNumber") @line = response_params["LineNumber"] @customer = response_params.fetch("CustomerNumber") @taxes = response_params.fetch("TaxList").map { |tax| Tax.new(tax) } end |
Instance Attribute Details
#customer ⇒ Object (readonly)
Returns the value of attribute customer.
4 5 6 |
# File 'lib/suretax/api/group.rb', line 4 def customer @customer end |
#invoice ⇒ Object (readonly)
Returns the value of attribute invoice.
4 5 6 |
# File 'lib/suretax/api/group.rb', line 4 def invoice @invoice end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
4 5 6 |
# File 'lib/suretax/api/group.rb', line 4 def line @line end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
4 5 6 |
# File 'lib/suretax/api/group.rb', line 4 def state @state end |
#taxes ⇒ Object (readonly)
Returns the value of attribute taxes.
4 5 6 |
# File 'lib/suretax/api/group.rb', line 4 def taxes @taxes end |