Skip to content

Commit

Permalink
BILL-112: adds create and edit specs
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny committed Oct 28, 2024
1 parent d650721 commit 80c5da9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Tests/Recurly/Plan_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ public function testCreateXml() {
$plan->total_billing_cycles = 6;
$plan->auto_renew = false;
$plan->dunning_campaign_id = '1234abcd';
$plan->vertex_transaction_type = 'lease';

$this->assertEquals(
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<plan><auto_renew>false</auto_renew><dunning_campaign_id>1234abcd</dunning_campaign_id><name>Platinum &amp; Gold Plan</name><plan_code>platinum</plan_code><pricing_model>fixed</pricing_model><setup_fee_in_cents><EUR>500</EUR></setup_fee_in_cents><total_billing_cycles>6</total_billing_cycles><trial_requires_billing_info>false</trial_requires_billing_info><unit_amount_in_cents><USD>1500</USD><EUR>1200</EUR></unit_amount_in_cents></plan>\n",
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<plan><auto_renew>false</auto_renew><dunning_campaign_id>1234abcd</dunning_campaign_id><name>Platinum &amp; Gold Plan</name><plan_code>platinum</plan_code><pricing_model>fixed</pricing_model><setup_fee_in_cents><EUR>500</EUR></setup_fee_in_cents><vertex_transaction_type>lease</vertex_transaction_type><total_billing_cycles>6</total_billing_cycles><trial_requires_billing_info>false</trial_requires_billing_info><unit_amount_in_cents><USD>1500</USD><EUR>1200</EUR></unit_amount_in_cents></plan>\n",
$plan->xml()
);
}
Expand Down Expand Up @@ -145,9 +146,10 @@ public function testUpdateXml() {
$plan->trial_requires_billing_info = false;
$plan->tax_code = 'fake-tax-code';
$plan->dunning_campaign_id = '1234abcd';
$plan->vertex_transaction_type = 'rental';

$this->assertEquals(
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<plan><dunning_campaign_id>1234abcd</dunning_campaign_id><name>Platinum Plan</name><plan_code>platinum</plan_code><setup_fee_in_cents><USD>500</USD><EUR>500</EUR></setup_fee_in_cents><tax_code>fake-tax-code</tax_code><tax_exempt>false</tax_exempt><total_billing_cycles nil=\"nil\"></total_billing_cycles><trial_requires_billing_info>false</trial_requires_billing_info><unit_amount_in_cents><USD>1500</USD><EUR>1200</EUR></unit_amount_in_cents></plan>\n",
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<plan><dunning_campaign_id>1234abcd</dunning_campaign_id><name>Platinum Plan</name><plan_code>platinum</plan_code><setup_fee_in_cents><USD>500</USD><EUR>500</EUR></setup_fee_in_cents><tax_code>fake-tax-code</tax_code><vertex_transaction_type>rental</vertex_transaction_type><tax_exempt>false</tax_exempt><total_billing_cycles nil=\"nil\"></total_billing_cycles><trial_requires_billing_info>false</trial_requires_billing_info><unit_amount_in_cents><USD>1500</USD><EUR>1200</EUR></unit_amount_in_cents></plan>\n",
$plan->xml()
);
}
Expand Down

0 comments on commit 80c5da9

Please sign in to comment.