-
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.
Add RevRec attributes to shipping methods
- Loading branch information
Showing
3 changed files
with
41 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
class Recurly_ShippingMethodTest extends Recurly_TestCase | ||
{ | ||
function defaultResponses() { | ||
return array( | ||
array('GET', '/shipping_methods/fedex_ground', 'shipping_methods/show-200.xml'), | ||
); | ||
} | ||
|
||
public function testPerformanceObligation() { | ||
$shipping_method = Recurly_ShippingMethod::get('fedex_ground', $this->client); | ||
|
||
$this->assertInstanceOf('Recurly_ShippingMethod', $shipping_method); | ||
$this->assertEquals('fedex_ground', $shipping_method->code); | ||
$this->assertEquals('FedEx Ground', $shipping_method->name); | ||
$this->assertEquals('twywqfr48v9l', $shipping_method->liability_gl_account_id); | ||
$this->assertEquals('thproqnpcuwp', $shipping_method->revenue_gl_account_id); | ||
$this->assertEquals('4', $shipping_method->performance_obligation_id); | ||
$this->assertInstanceOf('DateTime', $shipping_method->created_at); | ||
$this->assertInstanceOf('DateTime', $shipping_method->updated_at); | ||
} | ||
} |
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,15 @@ | ||
HTTP/1.1 200 OK | ||
Content-Type: application/xml; charset=utf-8 | ||
|
||
<?xml version="1.0" encoding="UTF-8"?> | ||
<shipping_method href="https://api.recurly.com/v2/shipping_methods/fedex_ground"> | ||
<code>fedex_ground</code> | ||
<name>FedEx Ground</name> | ||
<accounting_code></accounting_code> | ||
<liability_gl_account_id>twywqfr48v9l</liability_gl_account_id> | ||
<revenue_gl_account_id>thproqnpcuwp</revenue_gl_account_id> | ||
<performance_obligation_id>4</performance_obligation_id> | ||
<tax_code></tax_code> | ||
<created_at type="datetime">2019-05-07T16:36:22Z</created_at> | ||
<updated_at type="datetime">2019-05-07T16:36:22Z</updated_at> | ||
</shipping_method> |
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