-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #257 from recurly/api_version_2_14
Bump to 2.8.7 / API version 2.14
- Loading branch information
Showing
5 changed files
with
251 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
PUT https://api.recurly.com/v2/invoices/6019 HTTP/1.1 | ||
X-Api-Version: {api-version} | ||
Accept: application/xml | ||
Authorization: Basic YXBpa2V5Og== | ||
User-Agent: {user-agent} | ||
Content-Type: application/xml; charset=utf-8 | ||
|
||
<?xml version="1.0" encoding="UTF-8"?> | ||
<invoice> | ||
<po_number>1234</po_number> | ||
<terms_and_conditions>School staff is not responsible for items left at Hogwarts School of Witchcraft and Wizardry.</terms_and_conditions> | ||
<customer_notes>It's levi-O-sa, not levio-SA!</customer_notes> | ||
<vat_reverse_charge_notes>can't be changed when invoice was not a reverse charge</vat_reverse_charge_notes> | ||
<address> | ||
<first_name>Harry</first_name> | ||
<last_name>Potter</last_name> | ||
<name_on_account>Albus Dumbledore</name_on_account> | ||
<company>Hogwarts</company> | ||
<address1>4 Privet Drive</address1> | ||
<address2>Little Whinging</address2> | ||
<city>Surrey</city> | ||
<state>England</state> | ||
<zip>YO8 9FX</zip> | ||
<country>Great Britain</country> | ||
<phone>781-452-4077</phone> | ||
</address> | ||
<net_terms type="integer">1</net_terms> | ||
</invoice> | ||
|
||
HTTP/1.1 200 OK | ||
Content-Type: application/xml; charset=utf-8 | ||
|
||
<?xml version="1.0" encoding="UTF-8"?> | ||
<invoice href="https://api.recurly.com/v2/invoices/6019"> | ||
<account href="https://api.recurly.com/v2/accounts/aa463d59-a618-4b71-b1f4-0410f835fe74"/> | ||
<address> | ||
<first_name>Harry</first_name> | ||
<last_name>Potter</last_name> | ||
<name_on_account>Albus Dumbledore</name_on_account> | ||
<company>Hogwarts</company> | ||
<address1>4 Privet Drive</address1> | ||
<address2>Little Whinging</address2> | ||
<city>Surrey</city> | ||
<state>England</state> | ||
<zip>YO8 9FX</zip> | ||
<country>Great Britain</country> | ||
<phone>781-452-4077</phone> | ||
</address> | ||
<uuid>46036dca820357dae40c94420ab52632</uuid> | ||
<state>pending</state> | ||
<invoice_number_prefix></invoice_number_prefix> | ||
<invoice_number type="integer">6019</invoice_number> | ||
<vat_number nil="nil"></vat_number> | ||
<vat_reverse_charge_notes>can't be changed when invoice was not a reverse charge</vat_reverse_charge_notes> | ||
<tax_in_cents type="integer">0</tax_in_cents> | ||
<total_in_cents type="integer">5000</total_in_cents> | ||
<currency>USD</currency> | ||
<created_at type="datetime">2018-07-13T17:13:57Z</created_at> | ||
<updated_at type="datetime">2018-07-13T17:13:57Z</updated_at> | ||
<attempt_next_collection_at type="datetime">2018-07-14T17:13:57Z</attempt_next_collection_at> | ||
<closed_at nil="nil"></closed_at> | ||
<customer_notes>It's levi-O-sa, not levio-SA!</customer_notes> | ||
<recovery_reason nil="nil"></recovery_reason> | ||
<subtotal_before_discount_in_cents type="integer">5000</subtotal_before_discount_in_cents> | ||
<subtotal_in_cents type="integer">5000</subtotal_in_cents> | ||
<discount_in_cents type="integer">0</discount_in_cents> | ||
<due_on type="datetime">2018-07-14T17:13:57Z</due_on> | ||
<balance_in_cents type="integer">5000</balance_in_cents> | ||
<type>charge</type> | ||
<origin>purchase</origin> | ||
<credit_invoices href="https://api.recurly.com/v2/invoices/6019/credit_invoices"/> | ||
<refundable_total_in_cents type="integer">5000</refundable_total_in_cents> | ||
<credit_payments type="array"> | ||
</credit_payments> | ||
<net_terms type="integer">1</net_terms> | ||
<collection_method>manual</collection_method> | ||
<po_number>1234</po_number> | ||
<terms_and_conditions>School staff is not responsible for items left at Hogwarts School of Witchcraft and Wizardry.</terms_and_conditions> | ||
<line_items type="array"> | ||
<adjustment href="https://api.recurly.com/v2/adjustments/46036dc9823500f96f43ef44769df449" type="charge"> | ||
<account href="https://api.recurly.com/v2/accounts/aa463d59-a618-4b71-b1f4-0410f835fe74"/> | ||
<invoice href="https://api.recurly.com/v2/invoices/6019"/> | ||
<credit_adjustments href="https://api.recurly.com/v2/adjustments/46036dc9823500f96f43ef44769df449/credit_adjustments"/> | ||
<refundable_total_in_cents type="integer">5000</refundable_total_in_cents> | ||
<uuid>46036dc9823500f96f43ef44769df449</uuid> | ||
<state>invoiced</state> | ||
<description>Charge for extra bandwidth</description> | ||
<accounting_code>bandwidth</accounting_code> | ||
<product_code nil="nil"></product_code> | ||
<origin>debit</origin> | ||
<unit_amount_in_cents type="integer">5000</unit_amount_in_cents> | ||
<quantity type="integer">1</quantity> | ||
<discount_in_cents type="integer">0</discount_in_cents> | ||
<tax_in_cents type="integer">0</tax_in_cents> | ||
<total_in_cents type="integer">5000</total_in_cents> | ||
<currency>USD</currency> | ||
<proration_rate nil="nil"></proration_rate> | ||
<taxable type="boolean">false</taxable> | ||
<tax_exempt type="boolean">false</tax_exempt> | ||
<tax_code nil="nil"></tax_code> | ||
<start_date type="datetime">2018-07-13T17:13:57Z</start_date> | ||
<end_date nil="nil"></end_date> | ||
<created_at type="datetime">2018-07-13T17:13:57Z</created_at> | ||
<updated_at type="datetime">2018-07-13T17:13:57Z</updated_at> | ||
<revenue_schedule_type></revenue_schedule_type> | ||
</adjustment> | ||
</line_items> | ||
<transactions type="array"> | ||
</transactions> | ||
<a name="mark_successful" href="https://api.recurly.com/v2/invoices/6019/mark_successful" method="put"/> | ||
<a name="mark_failed" href="https://api.recurly.com/v2/invoices/6019/mark_failed" method="put"/> | ||
</invoice> |
50 changes: 50 additions & 0 deletions
50
tests/fixtures/subscription/subscribe-custom-fields-notes.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
PUT https://api.recurly.com/v2/subscriptions/123456789012345678901234567890ab/notes HTTP/1.1 | ||
X-Api-Version: {api-version} | ||
Accept: application/xml | ||
Authorization: Basic YXBpa2V5Og== | ||
User-Agent: {user-agent} | ||
Content-Type: application/xml; charset=utf-8 | ||
|
||
<?xml version="1.0" encoding="UTF-8"?> | ||
<subscription> | ||
<custom_fields> | ||
<custom_field> | ||
<name>my_sub_field</name> | ||
<value>A new sub value</value> | ||
</custom_field> | ||
</custom_fields> | ||
</subscription> | ||
HTTP/1.1 200 OK | ||
Content-Type: application/xml; charset=utf-8 | ||
Location: https://api.recurly.com/v2/plans/basicplan | ||
|
||
<?xml version="1.0" encoding="UTF-8"?> | ||
<subscription | ||
href="https://api.recurly.com/v2/subscriptions/123456789012345678901234567890ab"> | ||
<uuid>123456789012345678901234567890ab</uuid> | ||
<account href="https://api.recurly.com/v2/accounts/subscribe-mock-2"/> | ||
<plan href="https://api.recurly.com/v2/plans/basicplan"> | ||
<plan_code>basicplan</plan_code> | ||
<name>Basic Plan</name> | ||
</plan> | ||
<state>active</state> | ||
<quantity type="integer">1</quantity> | ||
<currency>EUR</currency> | ||
<unit_amount_in_cents type="integer">1000</unit_amount_in_cents> | ||
<activated_at type="datetime">2011-05-27T07:00:00Z</activated_at> | ||
<canceled_at nil="nil"></canceled_at> | ||
<expires_at nil="nil"></expires_at> | ||
<current_period_started_at type="datetime">2011-06-27T07:00:00Z</current_period_started_at> | ||
<current_period_ends_at type="datetime">2010-07-27T07:00:00Z</current_period_ends_at> | ||
<trial_started_at nil="nil"></trial_started_at> | ||
<trial_ends_at nil="nil"></trial_ends_at> | ||
<subscription_add_ons type="array"> | ||
</subscription_add_ons> | ||
<custom_fields type="array"> | ||
<custom_field> | ||
<name>my_sub_field</name> | ||
<value>A new sub value</value> | ||
</custom_field> | ||
</custom_fields> | ||
</subscription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters