-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[V2] Adds RevRec features to Item, GiftCard, and ShippingMethod #819
Merged
tilley-kyle
merged 1 commit into
add-revrec-features
from
add-revrec-settings-to-items-gcs-shipping-methods
Feb 12, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,32 @@ | ||
HTTP/1.1 200 OK | ||
Content-Type: application/xml; charset=utf-8 | ||
|
||
<?xml version="1.0" encoding="UTF-8"?> | ||
<gift_card href="https://api.recurly.com/v2/gift_cards/1998400800965102260"> | ||
<gifter_account href="https://api.recurly.com/v2/accounts/eteum"/> | ||
<purchase_invoice href="https://api.recurly.com/v2/invoices/1056"/> | ||
<id type="integer">1998400800965102260</id> | ||
<redemption_code>S2TNPI1Z4BRKM9U0</redemption_code> | ||
<product_code>first-gift-card</product_code> | ||
<unit_amount_in_cents type="integer">1000</unit_amount_in_cents> | ||
<currency>USD</currency> | ||
<delivery> | ||
<method>email</method> | ||
<email_address>[email protected]</email_address> | ||
<deliver_at nil="nil"></deliver_at> | ||
<first_name>Sally</first_name> | ||
<last_name>DuMonde</last_name> | ||
<address nil="nil"></address> | ||
<gifter_name>Benjamin</gifter_name> | ||
<personal_message>Happy birthday!</personal_message> | ||
</delivery> | ||
<created_at type="datetime">2024-02-08T17:48:38Z</created_at> | ||
<updated_at type="datetime">2024-02-08T17:48:38Z</updated_at> | ||
<delivered_at type="datetime">2024-02-08T17:48:38Z</delivered_at> | ||
<redeemed_at nil="nil"></redeemed_at> | ||
<canceled_at nil="nil"></canceled_at> | ||
<a name="redeem" href="https://api.recurly.com/v2/gift_cards/S2TNPI1Z4BRKM9U0/redeem" method="post"/> | ||
<liability_gl_account_id>suaz415ebc94</liability_gl_account_id> | ||
<revenue_gl_account_id>sxo2b1hpjrye</revenue_gl_account_id> | ||
<performance_obligation_id>7pu</performance_obligation_id> | ||
</gift_card> |
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,21 @@ | ||
HTTP/1.1 200 OK | ||
Content-Type: application/xml; charset=utf-8 | ||
|
||
<?xml version="1.0" encoding="UTF-8"?> | ||
<item href="https://api.recurly.com/v2/items/plastic_gloves"> | ||
<item_code>plastic_gloves</item_code> | ||
<name>Awesome Plastic Gloves</name> | ||
<description>Sleek Plastic</description> | ||
<external_sku>awesome-plastic-gloves</external_sku> | ||
<accounting_code>1569273944</accounting_code> | ||
<revenue_schedule_type>never</revenue_schedule_type> | ||
<tax_exempt type="boolean">true</tax_exempt> | ||
<tax_code nil="nil"/> | ||
<state>active</state> | ||
<liability_gl_account_id>suaz415ebc94</liability_gl_account_id> | ||
<revenue_gl_account_id>sxo2b1hpjrye</revenue_gl_account_id> | ||
<performance_obligation_id>7pu</performance_obligation_id> | ||
<created_at type="datetime">2019-09-23T21:25:45Z</created_at> | ||
<updated_at type="datetime">2019-09-23T21:25:45Z</updated_at> | ||
<deleted_at nil="nil"/> | ||
</item> |
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/ups-ground"> | ||
<code>ups-ground</code> | ||
<name>UPS - Ground</name> | ||
<accounting_code></accounting_code> | ||
<tax_code nil="nil"></tax_code> | ||
<liability_gl_account_id>suaz415ebc94</liability_gl_account_id> | ||
<revenue_gl_account_id>sxo2b1hpjrye</revenue_gl_account_id> | ||
<performance_obligation_id>7pu</performance_obligation_id> | ||
<created_at type="datetime">2023-07-10T19:54:21Z</created_at> | ||
<updated_at type="datetime">2023-12-04T18:54:45Z</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Xml; | ||
using FluentAssertions; | ||
using Recurly.Test.Fixtures; | ||
using Xunit; | ||
|
||
namespace Recurly.Test | ||
{ | ||
public class GiftCardTest : BaseTest | ||
{ | ||
[RecurlyFact(TestEnvironment.Type.Unit)] | ||
public void CheckForRevRecData() | ||
{ | ||
var giftCard = new GiftCard(); | ||
|
||
var xmlFixture = FixtureImporter.Get(FixtureType.GiftCards, "revrec.show-200").Xml; | ||
XmlTextReader reader = new XmlTextReader(new System.IO.StringReader(xmlFixture)); | ||
giftCard.ReadXml(reader); | ||
|
||
giftCard.LiabilityGlAccountId.Should().Be("suaz415ebc94"); | ||
giftCard.RevenueGlAccountId.Should().Be("sxo2b1hpjrye"); | ||
giftCard.PerformanceObligationId.Should().Be("7pu"); | ||
} | ||
} | ||
} |
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,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Xml; | ||
using FluentAssertions; | ||
using Recurly.Test.Fixtures; | ||
using Xunit; | ||
|
||
namespace Recurly.Test | ||
{ | ||
public class ShippingMethodTest : BaseTest | ||
{ | ||
[RecurlyFact(TestEnvironment.Type.Unit)] | ||
public void CheckForRevRecData() | ||
{ | ||
var shippingMethod = new ShippingMethod(); | ||
|
||
var xmlFixture = FixtureImporter.Get(FixtureType.ShippingMethods, "revrec.show-200").Xml; | ||
XmlTextReader reader = new XmlTextReader(new System.IO.StringReader(xmlFixture)); | ||
shippingMethod.ReadXml(reader); | ||
|
||
shippingMethod.LiabilityGlAccountId.Should().Be("suaz415ebc94"); | ||
shippingMethod.RevenueGlAccountId.Should().Be("sxo2b1hpjrye"); | ||
shippingMethod.PerformanceObligationId.Should().Be("7pu"); | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just doing some alphabetizing.. 😁