Skip to content

Commit

Permalink
Merge pull request #832 from recurly/AWE-479
Browse files Browse the repository at this point in the history
ExternalInvoice, ExternalCharge datatype fix
  • Loading branch information
Patrick-Duvall authored Apr 5, 2023
2 parents 4e5d16e + b420087 commit 6e10af5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions spec/fixtures/accounts/external_invoices/show-200.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Content-Type: application/xml; charset=utf-8
<external_id>abc123</external_id>
<state>paid</state>
<currency>USD</currency>
<total type="integer">0</total>
<total type="string">20.10</total>
<line_items type="array">
<external_charge>
<account href="https://pcc.recurly.dev:3000/v2/accounts/AWE-348dds"/>
Expand All @@ -22,7 +22,7 @@ Content-Type: application/xml; charset=utf-8
<updated_at type="datetime">2023-03-14T19:55:18Z</updated_at>
</external_product_reference>
<description>string</description>
<unit_amount type="integer">0</unit_amount>
<unit_amount type="string">20.10</unit_amount>
<currency>USD</currency>
<quantity>0</quantity>
<created_at type="datetime">2023-03-14T19:55:13Z</created_at>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Content-Type: application/xml; charset=utf-8
<external_id>abc123</external_id>
<state>paid</state>
<currency>USD</currency>
<total type="integer">0</total>
<total type="string">100.95</total>
<line_items type="array">
<external_charge>
<account href="https://pcc.recurly.dev:3000/v2/accounts/AWE-348dds"/>
Expand All @@ -23,7 +23,7 @@ Content-Type: application/xml; charset=utf-8
<updated_at type="datetime">2023-03-14T19:55:18Z</updated_at>
</external_product_reference>
<description>string</description>
<unit_amount type="integer">0</unit_amount>
<unit_amount type="string">100.95</unit_amount>
<currency>USD</currency>
<quantity>0</quantity>
<created_at type="datetime">2023-03-14T19:55:13Z</created_at>
Expand Down
4 changes: 2 additions & 2 deletions spec/recurly/external_charge_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
external_invoice: ExternalInvoice.new(),
account: Account.new(account_code: 'account_code'),
description: 'good',
unit_amount: 50,
unit_amount: '50.72',
currency: 'USD',
quantity: 2,
created_at: '2023-02-07T18:53:55Z',
Expand All @@ -32,7 +32,7 @@
describe "#methods" do
it "has correct attributes" do
expect(external_charge.description).must_equal('good')
expect(external_charge.unit_amount).must_equal(50)
expect(external_charge.unit_amount).must_equal('50.72')
expect(external_charge.currency).must_equal('USD')
expect(external_charge.quantity).must_equal(2)
expect(external_charge.created_at).must_equal('2023-02-07T18:53:55Z')
Expand Down
6 changes: 3 additions & 3 deletions spec/recurly/external_invoice_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
external_subscription: ExternalSubscription.new(id: '123abc'),
state: 'paid',
currency: 'USD',
total: 100,
total: '9.98',
line_items: [
ExternalCharge.new(
external_product_reference: ExternalProductReference.new(
Expand All @@ -18,7 +18,7 @@
updated_at: "2023-02-06T19:56:18Z"
),
description: 'good',
unit_amount: 50,
unit_amount: '4.99',
currency: 'USD',
quantity: 2,
created_at: '2023-02-07T18:53:55Z',
Expand All @@ -42,7 +42,7 @@
it "has correct attributes" do
expect(external_invoice.state).must_equal('paid')
expect(external_invoice.currency).must_equal('USD')
expect(external_invoice.total).must_equal(100)
expect(external_invoice.total).must_equal('9.98')
expect(external_invoice.purchased_at).must_equal('2023-01-13T17:28:02Z')
expect(external_invoice.created_at).must_equal('2022-10-10T21:40:57Z')
expect(external_invoice.updated_at).must_equal('2022-10-10T21:40:57Z')
Expand Down

0 comments on commit 6e10af5

Please sign in to comment.