Class: TaxCloud::Responses::TaxCodeGroups
- Defined in:
- lib/tax_cloud/responses/tax_code_groups.rb
Overview
Response to a TaxCloud getTICGroups API call.
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
-
.parse(savon_response) ⇒ Object
Parse a TaxCloud response.
Methods inherited from Base
error_message, error_number, #initialize, #match, response_type, set_dsl
Constructor Details
This class inherits a constructor from TaxCloud::Responses::Base
Class Method Details
.parse(savon_response) ⇒ Object
Parse a TaxCloud response.
Parameters
- savon_response
-
SOAP response.
Returns an array of Tax Code Groups.
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/tax_cloud/responses/tax_code_groups.rb', line 17 def parse(savon_response) response = new(savon_response) tax_code_groups = response.match('get_tic_groups_response/get_tic_groups_result/tic_groups/tic_group') tax_code_groups.map do |tax_code_group| TaxCloud::TaxCodeGroup.new( group_id: tax_code_group[:group_id].to_i, description: tax_code_group[:description].strip ) end end |