-
Notifications
You must be signed in to change notification settings - Fork 93
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 #459 from recurly/dx-1017-convert-trial
Add convertTrial() to Subscription
- Loading branch information
Showing
4 changed files
with
174 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
HTTP/1.1 200 OK | ||
Content-Type: application/xml; charset=utf-8 | ||
|
||
<?xml version="1.0" encoding="UTF-8"?> | ||
<subscription href="https://api.recurly.com/v2/subscriptions/012345678901234567890123456789ab"> | ||
<account href="https://api.recurly.com/v2/accounts/verena"/> | ||
<redemptions href="https://api.recurly.com/v2/subscriptions/012345678901234567890123456789ab/redemptions"/> | ||
<plan href="https://api.recurly.com/v2/plans/silver"> | ||
<plan_code>silver</plan_code> | ||
<name>Silver Plan</name> | ||
</plan> | ||
<uuid>012345678901234567890123456789ab</uuid> | ||
<state>active</state> | ||
<net_terms type="integer">10</net_terms> | ||
<collection_method>manual</collection_method> | ||
<po_number>1000</po_number> | ||
<quantity type="integer">1</quantity> | ||
<total_amount_in_cents type="integer">1000</total_amount_in_cents> | ||
<activated_at type="datetime">2011-04-30T07:00:00Z</activated_at> | ||
<canceled_at nil="nil"></canceled_at> | ||
<expires_at nil="nil"></expires_at> | ||
<current_period_started_at type="datetime">2020-02-10T20:38:21Z</current_period_started_at> | ||
<current_period_ends_at type="datetime">2020-03-10T20:38:21Z</current_period_ends_at> | ||
<trial_started_at type="datetime">2020-02-10T20:38:17Z</trial_started_at> | ||
<trial_ends_at type="datetime">2020-02-10T20:38:21Z</trial_ends_at> | ||
<tax_in_cents type="integer">0</tax_in_cents> | ||
<tax_type>usst</tax_type> | ||
<terms_and_conditions>Some Terms and Conditions</terms_and_conditions> | ||
<customer_notes>Some Customer Notes</customer_notes> | ||
<vat_reverse_charge_notes>Some VAT Notes</vat_reverse_charge_notes> | ||
<started_with_gift type="boolean">false</started_with_gift> | ||
<no_billing_info_reason>plan_free_trial</no_billing_info_reason> | ||
<converted_at nil="nil"></converted_at> | ||
<remaining_pause_cycles type="integer">1</remaining_pause_cycles>> | ||
<paused_at type="datetime">2020-01-01T01:00:00Z</paused_at> | ||
<subscription_add_ons type="array"> | ||
<subscription_add_on> | ||
<add_on_type>usage</add_on_type> | ||
<measured_unit href="https://api.recurly.com/v2/measured_units/123456"/> | ||
<usage href="https://api.recurly.com/v2/subscriptions/012345678901234567890123456789ab/add_ons/marketing_emails/usage"/> | ||
<add_on_code>marketing_emails</add_on_code> | ||
<name>Marketing Emails</name> | ||
<unit_amount_in_cents type="integer">5</unit_amount_in_cents> | ||
<quantity type="integer">1</quantity> | ||
<usage_type>price</usage_type> | ||
<usage_percentage nil="nil"/> | ||
</subscription_add_on> | ||
</subscription_add_ons> | ||
<custom_fields type="array"> | ||
<custom_field> | ||
<name>shasta</name> | ||
<value>ate my tacos</value> | ||
</custom_field> | ||
<custom_field> | ||
<name>license-number</name> | ||
<value>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz</value> | ||
</custom_field> | ||
</custom_fields> | ||
<a name="cancel" href="https://api.recurly.com/v2/subscriptions/012345678901234567890123456789ab/cancel" method="put"/> | ||
<a name="terminate" href="https://api.recurly.com/v2/subscriptions/012345678901234567890123456789ab/terminate" method="put"/> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
HTTP/1.1 200 OK | ||
Content-Type: application/xml; charset=utf-8 | ||
|
||
<?xml version="1.0" encoding="UTF-8"?> | ||
<subscription href="https://api.recurly.com/v2/subscriptions/012345678901234567890123456789ab"> | ||
<account href="https://api.recurly.com/v2/accounts/verena"/> | ||
<redemptions href="https://api.recurly.com/v2/subscriptions/012345678901234567890123456789ab/redemptions"/> | ||
<plan href="https://api.recurly.com/v2/plans/silver"> | ||
<plan_code>silver</plan_code> | ||
<name>Silver Plan</name> | ||
</plan> | ||
<uuid>012345678901234567890123456789ab</uuid> | ||
<state>active</state> | ||
<net_terms type="integer">10</net_terms> | ||
<collection_method>manual</collection_method> | ||
<po_number>1000</po_number> | ||
<quantity type="integer">1</quantity> | ||
<total_amount_in_cents type="integer">1000</total_amount_in_cents> | ||
<activated_at type="datetime">2011-04-30T07:00:00Z</activated_at> | ||
<canceled_at nil="nil"></canceled_at> | ||
<expires_at nil="nil"></expires_at> | ||
<current_period_started_at type="datetime">2020-02-10T20:38:21Z</current_period_started_at> | ||
<current_period_ends_at type="datetime">2020-03-10T20:38:21Z</current_period_ends_at> | ||
<trial_started_at type="datetime">2020-02-10T20:38:17Z</trial_started_at> | ||
<trial_ends_at type="datetime">2020-03-10T20:38:21Z</trial_ends_at> | ||
<tax_in_cents type="integer">0</tax_in_cents> | ||
<tax_type>usst</tax_type> | ||
<terms_and_conditions>Some Terms and Conditions</terms_and_conditions> | ||
<customer_notes>Some Customer Notes</customer_notes> | ||
<vat_reverse_charge_notes>Some VAT Notes</vat_reverse_charge_notes> | ||
<started_with_gift type="boolean">false</started_with_gift> | ||
<no_billing_info_reason>plan_free_trial</no_billing_info_reason> | ||
<converted_at nil="nil"></converted_at> | ||
<remaining_pause_cycles type="integer">1</remaining_pause_cycles>> | ||
<paused_at type="datetime">2020-01-01T01:00:00Z</paused_at> | ||
<subscription_add_ons type="array"> | ||
<subscription_add_on> | ||
<add_on_type>usage</add_on_type> | ||
<measured_unit href="https://api.recurly.com/v2/measured_units/123456"/> | ||
<usage href="https://api.recurly.com/v2/subscriptions/012345678901234567890123456789ab/add_ons/marketing_emails/usage"/> | ||
<add_on_code>marketing_emails</add_on_code> | ||
<name>Marketing Emails</name> | ||
<unit_amount_in_cents type="integer">5</unit_amount_in_cents> | ||
<quantity type="integer">1</quantity> | ||
<usage_type>price</usage_type> | ||
<usage_percentage nil="nil"/> | ||
</subscription_add_on> | ||
</subscription_add_ons> | ||
<custom_fields type="array"> | ||
<custom_field> | ||
<name>shasta</name> | ||
<value>ate my tacos</value> | ||
</custom_field> | ||
<custom_field> | ||
<name>license-number</name> | ||
<value>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz</value> | ||
</custom_field> | ||
</custom_fields> | ||
<a name="cancel" href="https://api.recurly.com/v2/subscriptions/012345678901234567890123456789ab/cancel" method="put"/> | ||
<a name="terminate" href="https://api.recurly.com/v2/subscriptions/012345678901234567890123456789ab/terminate" method="put"/> | ||
</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