From 2a9dba71b9c7a09569603e4b8e11806c87775e49 Mon Sep 17 00:00:00 2001 From: Faiber Rodriguez Date: Tue, 13 Feb 2024 16:32:15 -0500 Subject: [PATCH] Add RevRec attributes to shipping methods --- Tests/Recurly/ShippingMethod_Test.php | 23 ++++++++++++++++++++ Tests/fixtures/shipping_methods/show-200.xml | 15 +++++++++++++ lib/recurly/shipping_method.php | 3 +++ 3 files changed, 41 insertions(+) create mode 100644 Tests/Recurly/ShippingMethod_Test.php create mode 100644 Tests/fixtures/shipping_methods/show-200.xml diff --git a/Tests/Recurly/ShippingMethod_Test.php b/Tests/Recurly/ShippingMethod_Test.php new file mode 100644 index 00000000..5ed8209d --- /dev/null +++ b/Tests/Recurly/ShippingMethod_Test.php @@ -0,0 +1,23 @@ +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); + } +} diff --git a/Tests/fixtures/shipping_methods/show-200.xml b/Tests/fixtures/shipping_methods/show-200.xml new file mode 100644 index 00000000..f9130787 --- /dev/null +++ b/Tests/fixtures/shipping_methods/show-200.xml @@ -0,0 +1,15 @@ +HTTP/1.1 200 OK +Content-Type: application/xml; charset=utf-8 + + + + fedex_ground + FedEx Ground + + twywqfr48v9l + thproqnpcuwp + 4 + + 2019-05-07T16:36:22Z + 2019-05-07T16:36:22Z + \ No newline at end of file diff --git a/lib/recurly/shipping_method.php b/lib/recurly/shipping_method.php index 40959309..4ba8a626 100644 --- a/lib/recurly/shipping_method.php +++ b/lib/recurly/shipping_method.php @@ -6,6 +6,9 @@ * @property string $name The name of the shipping method. * @property string $accounting_code The accounting code of the shipping method. * @property string $tax_code The tax code of the shipping method. + * @property string $liability_gl_account_id The ID of the liability general ledger account associated with the plan. + * @property string $revenue_gl_account_id The ID of the revenue general ledger account associated with the plan. + * @property string $performance_obligation_id The ID of the performance obligation associated with the plan. * @property DateTime $created_at The date and time the shipping method was created. * @property DateTime $updated_at The date and time the shipping method was last updated. */