Skip to content

Commit da13f09

Browse files
author
Recurly Integrations
authored
Generated Latest Changes for v2021-02-25
1 parent 1d0a52d commit da13f09

23 files changed

+1306
-21
lines changed

lib/recurly/client/operations.rb

Lines changed: 106 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1806,7 +1806,7 @@ def list_custom_field_definitions(**options)
18061806
# @param custom_field_definition_id [String] Custom Field Definition ID
18071807
# @param params [Hash] Optional query string parameters:
18081808
#
1809-
# @return [Resources::CustomFieldDefinition] An custom field definition.
1809+
# @return [Resources::CustomFieldDefinition] A custom field definition.
18101810
# @example
18111811
# begin
18121812
# custom_field_definition = @client.get_custom_field_definition(
@@ -1824,6 +1824,108 @@ def get_custom_field_definition(custom_field_definition_id:, **options)
18241824
get(path, **options)
18251825
end
18261826

1827+
# Create a new general ledger account
1828+
#
1829+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_general_ledger_account create_general_ledger_account api documentation}
1830+
#
1831+
# @param body [Requests::GeneralLedgerAccountCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::GeneralLedgerAccountCreate}
1832+
# @param params [Hash] Optional query string parameters:
1833+
#
1834+
# @return [Resources::GeneralLedgerAccount] A new general ledger account.
1835+
#
1836+
def create_general_ledger_account(body:, **options)
1837+
path = "/general_ledger_accounts"
1838+
post(path, body, Requests::GeneralLedgerAccountCreate, **options)
1839+
end
1840+
1841+
# List a site's general ledger accounts
1842+
#
1843+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_general_ledger_accounts list_general_ledger_accounts api documentation}
1844+
#
1845+
# @param params [Hash] Optional query string parameters:
1846+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
1847+
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
1848+
#
1849+
# *Important notes:*
1850+
#
1851+
# * The +ids+ parameter cannot be used with any other ordering or filtering
1852+
# parameters (+limit+, +order+, +sort+, +begin_time+, +end_time+, etc)
1853+
# * Invalid or unknown IDs will be ignored, so you should check that the
1854+
# results correspond to your request.
1855+
# * Records are returned in an arbitrary order. Since results are all
1856+
# returned at once you can sort the records yourself.
1857+
#
1858+
# :limit [Integer] Limit number of records 1-200.
1859+
# :order [String] Sort order.
1860+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
1861+
# order. In descending order updated records will move behind the cursor and could
1862+
# prevent some records from being returned.
1863+
#
1864+
# :account_type [String] General Ledger Account type by which to filter the response.
1865+
#
1866+
# @return [Pager<Resources::GeneralLedgerAccount>] A list of the site's general ledger accounts.
1867+
#
1868+
def list_general_ledger_accounts(**options)
1869+
path = "/general_ledger_accounts"
1870+
pager(path, **options)
1871+
end
1872+
1873+
# Fetch a general ledger account
1874+
#
1875+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_general_ledger_account get_general_ledger_account api documentation}
1876+
#
1877+
# @param general_ledger_account_id [String] General Ledger Account ID
1878+
# @param params [Hash] Optional query string parameters:
1879+
#
1880+
# @return [Resources::GeneralLedgerAccount] A general ledger account.
1881+
#
1882+
def get_general_ledger_account(general_ledger_account_id:, **options)
1883+
path = interpolate_path("/general_ledger_accounts/{general_ledger_account_id}", general_ledger_account_id: general_ledger_account_id)
1884+
get(path, **options)
1885+
end
1886+
1887+
# Update a general ledger account
1888+
#
1889+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_general_ledger_account update_general_ledger_account api documentation}
1890+
#
1891+
# @param general_ledger_account_id [String] General Ledger Account ID
1892+
# @param body [Requests::GeneralLedgerAccountUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::GeneralLedgerAccountUpdate}
1893+
# @param params [Hash] Optional query string parameters:
1894+
#
1895+
# @return [Resources::GeneralLedgerAccount] The updated general ledger account.
1896+
#
1897+
def update_general_ledger_account(general_ledger_account_id:, body:, **options)
1898+
path = interpolate_path("/general_ledger_accounts/{general_ledger_account_id}", general_ledger_account_id: general_ledger_account_id)
1899+
put(path, body, Requests::GeneralLedgerAccountUpdate, **options)
1900+
end
1901+
1902+
# Get a single Performance Obligation.
1903+
#
1904+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_performance_obligation get_performance_obligation api documentation}
1905+
#
1906+
# @param performance_obligation_id [String] Performance Obligation id.
1907+
# @param params [Hash] Optional query string parameters:
1908+
#
1909+
# @return [Resources::PerformanceObligation] A single Performance Obligation.
1910+
#
1911+
def get_performance_obligation(performance_obligation_id:, **options)
1912+
path = interpolate_path("/performance_obligations/{performance_obligation_id}", performance_obligation_id: performance_obligation_id)
1913+
get(path, **options)
1914+
end
1915+
1916+
# Get a site's Performance Obligations
1917+
#
1918+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_performance_obligations get_performance_obligations api documentation}
1919+
#
1920+
# @param params [Hash] Optional query string parameters:
1921+
#
1922+
# @return [Pager<Resources::PerformanceObligation>] A list of Performance Obligations.
1923+
#
1924+
def get_performance_obligations(**options)
1925+
path = "/performance_obligations"
1926+
pager(path, **options)
1927+
end
1928+
18271929
# List an invoice template's associated accounts
18281930
#
18291931
# {https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_template_accounts list_invoice_template_accounts api documentation}
@@ -2301,7 +2403,7 @@ def list_external_subscriptions(**options)
23012403
#
23022404
# {https://developers.recurly.com/api/v2021-02-25#operation/get_external_subscription get_external_subscription api documentation}
23032405
#
2304-
# @param external_subscription_id [String] External subscription id
2406+
# @param external_subscription_id [String] External subscription ID or external_id. For ID no prefix is used e.g. +e28zov4fw0v2+. For external_id use prefix +external-id-+, e.g. +external-id-123456+.
23052407
# @param params [Hash] Optional query string parameters:
23062408
#
23072409
# @return [Resources::ExternalSubscription] Settings for an external subscription.
@@ -4498,15 +4600,15 @@ def list_external_subscription_external_payment_phases(external_subscription_id:
44984600
pager(path, **options)
44994601
end
45004602

4501-
# Fetch an external payment_phase
4603+
# Fetch an external payment phase
45024604
#
45034605
# {https://developers.recurly.com/api/v2021-02-25#operation/get_external_subscription_external_payment_phase get_external_subscription_external_payment_phase api documentation}
45044606
#
45054607
# @param external_subscription_id [String] External subscription id
45064608
# @param external_payment_phase_id [String] External payment phase ID, e.g. +a34ypb2ef9w1+.
45074609
# @param params [Hash] Optional query string parameters:
45084610
#
4509-
# @return [Resources::ExternalPaymentPhase] Details for an external payment_phase.
4611+
# @return [Resources::ExternalPaymentPhase] Details for an external payment phase.
45104612
#
45114613
def get_external_subscription_external_payment_phase(external_subscription_id:, external_payment_phase_id:, **options)
45124614
path = interpolate_path("/external_subscriptions/{external_subscription_id}/external_payment_phases/{external_payment_phase_id}", external_subscription_id: external_subscription_id, external_payment_phase_id: external_payment_phase_id)

lib/recurly/requests/add_on_create.rb

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class AddOnCreate < Request
2727
define_attribute :code, String
2828

2929
# @!attribute currencies
30-
# @return [Array[AddOnPricing]] * If `item_code`/`item_id` is part of the request and the item has a default currency then `currencies` is optional. If the item does not have a default currency, then `currencies` is required. If `item_code`/`item_id` is not present `currencies` is required. * If the add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `currencies` must be absent. * Must be absent if `add_on_type` is `usage` and `usage_type` is `percentage`.
30+
# @return [Array[AddOnPricing]] * If `item_code`/`item_id` is part of the request and the item has a default currency, then `currencies` is optional. If the item does not have a default currency, then `currencies` is required. If `item_code`/`item_id` is not present `currencies` is required. * If the add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `currencies` must be absent. * Must be absent if `add_on_type` is `usage` and `usage_type` is `percentage`.
3131
define_attribute :currencies, Array, { :item_type => :AddOnPricing }
3232

3333
# @!attribute default_quantity
@@ -39,13 +39,17 @@ class AddOnCreate < Request
3939
define_attribute :display_quantity, :Boolean
4040

4141
# @!attribute item_code
42-
# @return [String] Unique code to identify an item. Available when the `Credit Invoices` feature are enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
42+
# @return [String] Unique code to identify an item. Available when the `Credit Invoices` feature is enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
4343
define_attribute :item_code, String
4444

4545
# @!attribute item_id
4646
# @return [String] System-generated unique identifier for an item. Available when the `Credit Invoices` feature is enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
4747
define_attribute :item_id, String
4848

49+
# @!attribute liability_gl_account_id
50+
# @return [String] The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
51+
define_attribute :liability_gl_account_id, String
52+
4953
# @!attribute measured_unit_id
5054
# @return [String] System-generated unique identifier for a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used.
5155
define_attribute :measured_unit_id, String
@@ -66,10 +70,18 @@ class AddOnCreate < Request
6670
# @return [Array[PercentageTiersByCurrency]] Array of objects which must have at least one set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent. There must be one tier without an `ending_amount` value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support.
6771
define_attribute :percentage_tiers, Array, { :item_type => :PercentageTiersByCurrency }
6872

73+
# @!attribute performance_obligation_id
74+
# @return [String] The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
75+
define_attribute :performance_obligation_id, String
76+
6977
# @!attribute plan_id
7078
# @return [String] Plan ID
7179
define_attribute :plan_id, String
7280

81+
# @!attribute revenue_gl_account_id
82+
# @return [String] The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
83+
define_attribute :revenue_gl_account_id, String
84+
7385
# @!attribute revenue_schedule_type
7486
# @return [String] When this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item.
7587
define_attribute :revenue_schedule_type, String

lib/recurly/requests/add_on_update.rb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ class AddOnUpdate < Request
3838
# @return [String] Add-on ID
3939
define_attribute :id, String
4040

41+
# @!attribute liability_gl_account_id
42+
# @return [String] The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
43+
define_attribute :liability_gl_account_id, String
44+
4145
# @!attribute measured_unit_id
4246
# @return [String] System-generated unique identifier for a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used.
4347
define_attribute :measured_unit_id, String
@@ -55,9 +59,17 @@ class AddOnUpdate < Request
5559
define_attribute :optional, :Boolean
5660

5761
# @!attribute percentage_tiers
58-
# @return [Array[PercentageTiersByCurrency]] `percentage_tiers` is an array of objects, which must have the set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent. There must be one tier without an `ending_amount` value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support.
62+
# @return [Array[PercentageTiersByCurrency]] `percentage_tiers` is an array of objects, which must have the set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent. There must be one tier without an `ending_amount` value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support.
5963
define_attribute :percentage_tiers, Array, { :item_type => :PercentageTiersByCurrency }
6064

65+
# @!attribute performance_obligation_id
66+
# @return [String] The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
67+
define_attribute :performance_obligation_id, String
68+
69+
# @!attribute revenue_gl_account_id
70+
# @return [String] The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
71+
define_attribute :revenue_gl_account_id, String
72+
6173
# @!attribute revenue_schedule_type
6274
# @return [String] When this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item.
6375
define_attribute :revenue_schedule_type, String
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This file is automatically created by Recurly's OpenAPI generation process
2+
# and thus any edits you make by hand will be lost. If you wish to make a
3+
# change to this file, please create a Github issue explaining the changes you
4+
# need and we will usher them to the appropriate places.
5+
module Recurly
6+
module Requests
7+
class GeneralLedgerAccountCreate < Request
8+
9+
# @!attribute account_type
10+
# @return [String]
11+
define_attribute :account_type, String
12+
13+
# @!attribute code
14+
# @return [String] Unique code to identify the ledger account. Each code must start with a letter or number. The following special characters are allowed: `-_.,:`
15+
define_attribute :code, String
16+
17+
# @!attribute description
18+
# @return [String] Optional description.
19+
define_attribute :description, String
20+
end
21+
end
22+
end
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# This file is automatically created by Recurly's OpenAPI generation process
2+
# and thus any edits you make by hand will be lost. If you wish to make a
3+
# change to this file, please create a Github issue explaining the changes you
4+
# need and we will usher them to the appropriate places.
5+
module Recurly
6+
module Requests
7+
class GeneralLedgerAccountUpdate < Request
8+
9+
# @!attribute code
10+
# @return [String] Unique code to identify the ledger account. Each code must start with a letter or number. The following special characters are allowed: `-_.,:`
11+
define_attribute :code, String
12+
13+
# @!attribute description
14+
# @return [String] Optional description.
15+
define_attribute :description, String
16+
end
17+
end
18+
end

lib/recurly/requests/item_create.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,22 @@ class ItemCreate < Request
3838
# @return [String] Optional, stock keeping unit to link the item to other inventory systems.
3939
define_attribute :external_sku, String
4040

41+
# @!attribute liability_gl_account_id
42+
# @return [String] The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
43+
define_attribute :liability_gl_account_id, String
44+
4145
# @!attribute name
4246
# @return [String] This name describes your item and will appear on the invoice when it's purchased on a one time basis.
4347
define_attribute :name, String
4448

49+
# @!attribute performance_obligation_id
50+
# @return [String] The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
51+
define_attribute :performance_obligation_id, String
52+
53+
# @!attribute revenue_gl_account_id
54+
# @return [String] The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
55+
define_attribute :revenue_gl_account_id, String
56+
4557
# @!attribute revenue_schedule_type
4658
# @return [String] Revenue schedule type
4759
define_attribute :revenue_schedule_type, String

lib/recurly/requests/item_update.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,22 @@ class ItemUpdate < Request
3838
# @return [String] Optional, stock keeping unit to link the item to other inventory systems.
3939
define_attribute :external_sku, String
4040

41+
# @!attribute liability_gl_account_id
42+
# @return [String] The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
43+
define_attribute :liability_gl_account_id, String
44+
4145
# @!attribute name
4246
# @return [String] This name describes your item and will appear on the invoice when it's purchased on a one time basis.
4347
define_attribute :name, String
4448

49+
# @!attribute performance_obligation_id
50+
# @return [String] The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
51+
define_attribute :performance_obligation_id, String
52+
53+
# @!attribute revenue_gl_account_id
54+
# @return [String] The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.
55+
define_attribute :revenue_gl_account_id, String
56+
4557
# @!attribute revenue_schedule_type
4658
# @return [String] Revenue schedule type
4759
define_attribute :revenue_schedule_type, String

0 commit comments

Comments
 (0)