Skip to content
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

Conversation

Smolations
Copy link

@Smolations Smolations commented Feb 8, 2024

Adds the following properties to the GiftCard, Item, and ShippingMethod entities for the V2 client:

  • LiabilityGlAccountId
  • RevenueGlAccountId
  • PerformanceObligationId

Examples

For gift cards and shipping methods, you will need to first create one of each and assign any desired GLA/POB settings in the Admin UI. Then just use the .Get()/.List() methods for those entities to gain access to the new properties. Item functionality is shown below.

//** create an item with default RevRec settings
var item = new Item();
// ...
item.Create();
Console.WriteLine("Liability ID: {0}", item.LiabilityGlAccountId); // => ""
Console.WriteLine("Revenue ID: {0}", item.RevenueGlAccountId);     // => ""
Console.WriteLine("POB ID: {0}", item.PerformanceObligationId);    // => "abc" (default POB)

//** change/remove RevRec settings from an item
var item = Items.Get(itemCode);

// var liabilityGla = ...
// var revenueGla = ...
// var pob = ...

item.LiabilityGlAccountId = liabilityGla.Id;
item.RevenueGlAccountId = RevenueGla.Id;
item.PerformanceObligationId = pob.Id;
item.Update();

// note that POB IDs cannot be removed, but they can be changed
item.LiabilityGlAccountId = null;
item.RevenueGlAccountId = null;
item.Update();

</Content>
<Content Include="Fixtures/external_payment_phases/show-200.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just doing some alphabetizing.. 😁

@Smolations Smolations force-pushed the add-revrec-settings-to-items-gcs-shipping-methods branch from 56001a4 to de2a847 Compare February 8, 2024 18:21
@Smolations Smolations added the V2 V2 Client label Feb 8, 2024
@Smolations Smolations marked this pull request as ready for review February 8, 2024 18:32
@Smolations Smolations mentioned this pull request Feb 8, 2024
@tilley-kyle
Copy link
Contributor

DevQA+1

@tilley-kyle tilley-kyle merged commit 757f18c into add-revrec-features Feb 12, 2024
4 of 5 checks passed
@tilley-kyle tilley-kyle deleted the add-revrec-settings-to-items-gcs-shipping-methods branch February 12, 2024 16:44
@Smolations Smolations changed the title Adds RevRec features to Item, GiftCard, and ShippingMethod [V2] Adds RevRec features to Item, GiftCard, and ShippingMethod Feb 15, 2024
recurly-integrations pushed a commit that referenced this pull request Mar 13, 2024
[Full Changelog](1.17.34...2.0.0)

**Merged Pull Requests**

- [V2] Add RevRec Settings to Adjustments [#822](#822) ([Smolations](https://github.com/Smolations))
- [V2] Adds RevRec features to AddOns [#821](#821) ([Smolations](https://github.com/Smolations))
- [V2] Adds RevRec features to Item, GiftCard, and ShippingMethod [#819](#819) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec settings to the Plan entity [#818](#818) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec settings to business entities [#817](#817) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec Performance Obligations Feature [#816](#816) ([Smolations](https://github.com/Smolations))
- Add revrec features [#815](#815) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec General Ledger Accounts Feature [#813](#813) ([Smolations](https://github.com/Smolations))
recurly-integrations pushed a commit that referenced this pull request Mar 13, 2024
[Full Changelog](1.17.34...1.17.35)

**Merged Pull Requests**

- [V2] Add RevRec Settings to Adjustments [#822](#822) ([Smolations](https://github.com/Smolations))
- [V2] Adds RevRec features to AddOns [#821](#821) ([Smolations](https://github.com/Smolations))
- [V2] Adds RevRec features to Item, GiftCard, and ShippingMethod [#819](#819) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec settings to the Plan entity [#818](#818) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec settings to business entities [#817](#817) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec Performance Obligations Feature [#816](#816) ([Smolations](https://github.com/Smolations))
- Add revrec features [#815](#815) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec General Ledger Accounts Feature [#813](#813) ([Smolations](https://github.com/Smolations))
recurly-integrations pushed a commit that referenced this pull request Mar 13, 2024
[Full Changelog](1.17.34...1.17.36)

**Merged Pull Requests**

- [V2] Add RevRec Settings to Adjustments [#822](#822) ([Smolations](https://github.com/Smolations))
- [V2] Adds RevRec features to AddOns [#821](#821) ([Smolations](https://github.com/Smolations))
- [V2] Adds RevRec features to Item, GiftCard, and ShippingMethod [#819](#819) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec settings to the Plan entity [#818](#818) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec settings to business entities [#817](#817) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec Performance Obligations Feature [#816](#816) ([Smolations](https://github.com/Smolations))
- Add revrec features [#815](#815) ([Smolations](https://github.com/Smolations))
- [V2] Add RevRec General Ledger Accounts Feature [#813](#813) ([Smolations](https://github.com/Smolations))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V2 V2 Client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants