Skip to content

Commit

Permalink
Add used_tax_service to Invoice response
Browse files Browse the repository at this point in the history
Invoice response format has changed:

Added <used_tax_service>. Field is present if taxes are enabled.
Value is `true` or `false` based on a successful response from the
tax service.
  • Loading branch information
judith committed Apr 18, 2023
1 parent f4506b9 commit f9695f6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/recurly/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def invoice_number_with_prefix
billing_info_uuid
dunning_campaign_id
refundable_total_in_cents
used_tax_service
)
alias to_param invoice_number_with_prefix

Expand Down
1 change: 1 addition & 0 deletions spec/fixtures/invoices/show-200-taxed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Content-Type: application/xml; charset=utf-8
<tax_in_cents type="integer">20</tax_in_cents>
</tax_detail>
</tax_details>
<used_tax_service type="boolean">true</used_tax_service>
<!-- /Vertex -->
<line_items>
<adjustment href="https://api.recurly.com/v2/adjustments/charge" type="charge">
Expand Down
4 changes: 4 additions & 0 deletions spec/recurly/invoice_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
invoice.tax_type.must_equal 'usst'
end

it 'used_tax_service is true' do
invoice.used_tax_service.must_equal true
end

it 'has a vertex fields' do
invoice.refund_tax_date.must_equal DateTime.new(2017, 04, 30)
invoice.refund_geo_code.must_equal 'ABC123'
Expand Down

0 comments on commit f9695f6

Please sign in to comment.