class TaxCloud::Responses::TaxCodes
Response to a TaxCloud
getTICs API call.
Public Class Methods
parse(savon_response)
click to toggle source
Parse a TaxCloud
response.
Parameters¶ ↑
- savon_response
-
SOAP response.
Returns an array of tax codes.
# File lib/tax_cloud/responses/tax_codes.rb, line 17 def parse(savon_response) response = new(savon_response) tax_codes = response.match('get_ti_cs_response/get_ti_cs_result/ti_cs/tic') tax_codes.map do |tax_code| TaxCloud::TaxCode.new( ticid: tax_code[:ticid].to_i, description: tax_code[:description].strip ) end end