recurly 3.28.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bumpversion.cfg +1 -1
- data/.github/workflows/docs.yml +1 -1
- data/.github_changelog_generator +8 -0
- data/.travis.yml +13 -0
- data/CHANGELOG.md +202 -369
- data/CONTRIBUTING.md +0 -4
- data/GETTING_STARTED.md +20 -17
- data/README.md +0 -3
- data/lib/recurly/client/operations.rb +778 -659
- data/lib/recurly/client.rb +44 -28
- data/lib/recurly/errors/api_errors.rb +3 -2
- data/lib/recurly/errors.rb +5 -23
- data/lib/recurly/pager.rb +5 -15
- data/lib/recurly/requests/{account_acquisition_updatable.rb → account_acquisition_update.rb} +1 -1
- data/lib/recurly/requests/account_create.rb +2 -10
- data/lib/recurly/requests/account_purchase.rb +2 -10
- data/lib/recurly/requests/account_update.rb +0 -8
- data/lib/recurly/requests/add_on_create.rb +4 -4
- data/lib/recurly/requests/add_on_pricing.rb +5 -5
- data/lib/recurly/requests/add_on_update.rb +2 -2
- data/lib/recurly/requests/address.rb +1 -9
- data/lib/recurly/requests/billing_info_create.rb +3 -39
- data/lib/recurly/requests/coupon_create.rb +1 -1
- data/lib/recurly/requests/external_transaction.rb +1 -1
- data/lib/recurly/requests/invoice_address.rb +1 -1
- data/lib/recurly/requests/invoice_collect.rb +1 -1
- data/lib/recurly/requests/{invoice_updatable.rb → invoice_update.rb} +1 -1
- data/lib/recurly/requests/line_item_create.rb +2 -10
- data/lib/recurly/requests/line_item_refund.rb +0 -4
- data/lib/recurly/requests/plan_create.rb +0 -16
- data/lib/recurly/requests/plan_pricing.rb +1 -5
- data/lib/recurly/requests/plan_update.rb +0 -12
- data/lib/recurly/requests/pricing.rb +0 -4
- data/lib/recurly/requests/purchase_create.rb +1 -1
- data/lib/recurly/requests/shipping_address_create.rb +1 -1
- data/lib/recurly/requests/shipping_address_update.rb +1 -1
- data/lib/recurly/requests/subscription_add_on_create.rb +8 -4
- data/lib/recurly/requests/subscription_add_on_tier.rb +5 -1
- data/lib/recurly/requests/subscription_add_on_update.rb +6 -2
- data/lib/recurly/requests/subscription_change_create.rb +1 -13
- data/lib/recurly/requests/subscription_create.rb +5 -13
- data/lib/recurly/requests/subscription_pause.rb +1 -1
- data/lib/recurly/requests/subscription_purchase.rb +2 -10
- data/lib/recurly/requests/subscription_update.rb +1 -5
- data/lib/recurly/requests/tier.rb +2 -2
- data/lib/recurly/requests/{plan_ramp_pricing.rb → tier_pricing.rb} +6 -2
- data/lib/recurly/requests/usage_create.rb +1 -1
- data/lib/recurly/resources/account.rb +0 -8
- data/lib/recurly/resources/account_balance_amount.rb +0 -8
- data/lib/recurly/resources/account_mini.rb +0 -4
- data/lib/recurly/resources/add_on.rb +1 -1
- data/lib/recurly/resources/add_on_pricing.rb +5 -5
- data/lib/recurly/resources/address.rb +1 -9
- data/lib/recurly/resources/address_with_name.rb +46 -0
- data/lib/recurly/resources/billing_info.rb +1 -5
- data/lib/recurly/resources/billing_info_updated_by.rb +1 -1
- data/lib/recurly/resources/coupon.rb +5 -17
- data/lib/recurly/resources/custom_field_definition.rb +1 -1
- data/lib/recurly/resources/invoice.rb +8 -12
- data/lib/recurly/resources/invoice_address.rb +1 -1
- data/lib/recurly/resources/line_item.rb +7 -23
- data/lib/recurly/resources/payment_method.rb +0 -8
- data/lib/recurly/resources/plan.rb +1 -17
- data/lib/recurly/resources/plan_pricing.rb +1 -5
- data/lib/recurly/resources/pricing.rb +0 -4
- data/lib/recurly/resources/shipping_address.rb +1 -1
- data/lib/recurly/resources/subscription.rb +0 -12
- data/lib/recurly/resources/subscription_add_on.rb +6 -2
- data/lib/recurly/resources/subscription_add_on_tier.rb +5 -1
- data/lib/recurly/resources/subscription_change.rb +0 -16
- data/lib/recurly/resources/tax_info.rb +3 -7
- data/lib/recurly/resources/tier.rb +2 -2
- data/lib/recurly/resources/{plan_ramp_pricing.rb → tier_pricing.rb} +6 -2
- data/lib/recurly/resources/transaction.rb +3 -7
- data/lib/recurly/resources/unique_coupon_code_params.rb +26 -0
- data/lib/recurly/resources/usage.rb +6 -2
- data/lib/recurly/version.rb +1 -1
- data/openapi/api.yaml +2030 -3058
- data/scripts/build +2 -2
- data/scripts/bump +11 -0
- data/scripts/changelog +14 -0
- data/scripts/format +2 -2
- data/scripts/prepare-release +29 -43
- data/scripts/release +20 -5
- metadata +16 -31
- data/.changelog_config.yaml +0 -11
- data/.github/workflows/ci.yml +0 -29
- data/CODE_OF_CONDUCT.md +0 -130
- data/lib/recurly/errors/network_errors.rb +0 -10
- data/lib/recurly/requests/billing_info_verify.rb +0 -14
- data/lib/recurly/requests/dunning_campaigns_bulk_update.rb +0 -18
- data/lib/recurly/requests/gateway_attributes.rb +0 -14
- data/lib/recurly/requests/plan_ramp_interval.rb +0 -18
- data/lib/recurly/requests/subscription_change_billing_info_create.rb +0 -14
- data/lib/recurly/requests/subscription_ramp_interval.rb +0 -18
- data/lib/recurly/resources/dunning_campaign.rb +0 -50
- data/lib/recurly/resources/dunning_campaigns_bulk_update_response.rb +0 -18
- data/lib/recurly/resources/dunning_cycle.rb +0 -58
- data/lib/recurly/resources/dunning_interval.rb +0 -18
- data/lib/recurly/resources/gateway_attributes.rb +0 -14
- data/lib/recurly/resources/line_item_list.rb +0 -26
- data/lib/recurly/resources/plan_ramp_interval.rb +0 -18
- data/lib/recurly/resources/subscription_change_billing_info.rb +0 -14
- data/lib/recurly/resources/subscription_change_preview.rb +0 -90
- data/lib/recurly/resources/subscription_ramp_interval_response.rb +0 -22
- data/lib/recurly/resources/tax_detail.rb +0 -38
@@ -5,14 +5,15 @@
|
|
5
5
|
module Recurly
|
6
6
|
class Client
|
7
7
|
def api_version
|
8
|
-
"
|
8
|
+
"v2021-02-25"
|
9
9
|
end
|
10
10
|
|
11
11
|
# List sites
|
12
12
|
#
|
13
|
-
# {https://developers.recurly.com/api/
|
13
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_sites list_sites api documenation}
|
14
14
|
#
|
15
|
-
# @param
|
15
|
+
# @param params [Hash] Optional query string parameters:
|
16
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
16
17
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
17
18
|
#
|
18
19
|
# *Important notes:*
|
@@ -24,17 +25,20 @@ module Recurly
|
|
24
25
|
# * Records are returned in an arbitrary order. Since results are all
|
25
26
|
# returned at once you can sort the records yourself.
|
26
27
|
#
|
27
|
-
#
|
28
|
-
#
|
29
|
-
#
|
28
|
+
# :limit [Integer] Limit number of records 1-200.
|
29
|
+
# :order [String] Sort order.
|
30
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
30
31
|
# order. In descending order updated records will move behind the cursor and could
|
31
32
|
# prevent some records from being returned.
|
32
33
|
#
|
33
|
-
#
|
34
|
+
# :state [String] Filter by state.
|
34
35
|
#
|
35
36
|
# @return [Pager<Resources::Site>] A list of sites.
|
36
37
|
# @example
|
37
|
-
#
|
38
|
+
# params = {
|
39
|
+
# limit: 200
|
40
|
+
# }
|
41
|
+
# sites = @client.list_sites(params: params)
|
38
42
|
# sites.each do |site|
|
39
43
|
# puts "Site: #{site.subdomain}"
|
40
44
|
# end
|
@@ -46,9 +50,10 @@ module Recurly
|
|
46
50
|
|
47
51
|
# Fetch a site
|
48
52
|
#
|
49
|
-
# {https://developers.recurly.com/api/
|
53
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_site get_site api documenation}
|
50
54
|
#
|
51
55
|
# @param site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
56
|
+
# @param params [Hash] Optional query string parameters:
|
52
57
|
#
|
53
58
|
# @return [Resources::Site] A site.
|
54
59
|
# @example
|
@@ -61,16 +66,17 @@ module Recurly
|
|
61
66
|
# puts "Resource Not Found"
|
62
67
|
# end
|
63
68
|
#
|
64
|
-
def get_site(site_id
|
69
|
+
def get_site(site_id:, **options)
|
65
70
|
path = interpolate_path("/sites/{site_id}", site_id: site_id)
|
66
|
-
get(path)
|
71
|
+
get(path, **options)
|
67
72
|
end
|
68
73
|
|
69
74
|
# List a site's accounts
|
70
75
|
#
|
71
|
-
# {https://developers.recurly.com/api/
|
76
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_accounts list_accounts api documenation}
|
72
77
|
#
|
73
|
-
# @param
|
78
|
+
# @param params [Hash] Optional query string parameters:
|
79
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
74
80
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
75
81
|
#
|
76
82
|
# *Important notes:*
|
@@ -82,28 +88,31 @@ module Recurly
|
|
82
88
|
# * Records are returned in an arbitrary order. Since results are all
|
83
89
|
# returned at once you can sort the records yourself.
|
84
90
|
#
|
85
|
-
#
|
86
|
-
#
|
87
|
-
#
|
91
|
+
# :limit [Integer] Limit number of records 1-200.
|
92
|
+
# :order [String] Sort order.
|
93
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
88
94
|
# order. In descending order updated records will move behind the cursor and could
|
89
95
|
# prevent some records from being returned.
|
90
96
|
#
|
91
|
-
#
|
97
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
92
98
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
93
99
|
#
|
94
|
-
#
|
100
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
95
101
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
96
102
|
#
|
97
|
-
#
|
98
|
-
#
|
103
|
+
# :email [String] Filter for accounts with this exact email address. A blank value will return accounts with both +null+ and +""+ email addresses. Note that multiple accounts can share one email address.
|
104
|
+
# :subscriber [Boolean] Filter for accounts with or without a subscription in the +active+,
|
99
105
|
# +canceled+, or +future+ state.
|
100
106
|
#
|
101
|
-
#
|
102
|
-
#
|
107
|
+
# :past_due [String] Filter for accounts with an invoice in the +past_due+ state.
|
108
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
103
109
|
#
|
104
110
|
# @return [Pager<Resources::Account>] A list of the site's accounts.
|
105
111
|
# @example
|
106
|
-
#
|
112
|
+
# params = {
|
113
|
+
# limit: 200
|
114
|
+
# }
|
115
|
+
# accounts = @client.list_accounts(params: params)
|
107
116
|
# accounts.each do |account|
|
108
117
|
# puts "Account: #{account.code}"
|
109
118
|
# end
|
@@ -115,10 +124,11 @@ module Recurly
|
|
115
124
|
|
116
125
|
# Create an account
|
117
126
|
#
|
118
|
-
# {https://developers.recurly.com/api/
|
127
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_account create_account api documenation}
|
119
128
|
#
|
120
129
|
# @param body [Requests::AccountCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::AccountCreate}
|
121
|
-
# @param
|
130
|
+
# @param params [Hash] Optional query string parameters:
|
131
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
122
132
|
#
|
123
133
|
# @return [Resources::Account] An account.
|
124
134
|
# @example
|
@@ -127,7 +137,6 @@ module Recurly
|
|
127
137
|
# code: account_code,
|
128
138
|
# first_name: "Benjamin",
|
129
139
|
# last_name: "Du Monde",
|
130
|
-
# preferred_time_zone: "America/Chicago",
|
131
140
|
# acquisition: {
|
132
141
|
# campaign: "podcast-marketing",
|
133
142
|
# channel: "social_media",
|
@@ -165,10 +174,11 @@ module Recurly
|
|
165
174
|
|
166
175
|
# Fetch an account
|
167
176
|
#
|
168
|
-
# {https://developers.recurly.com/api/
|
177
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_account get_account api documenation}
|
169
178
|
#
|
170
179
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
171
|
-
# @param
|
180
|
+
# @param params [Hash] Optional query string parameters:
|
181
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
172
182
|
#
|
173
183
|
# @return [Resources::Account] An account.
|
174
184
|
# @example
|
@@ -186,13 +196,14 @@ module Recurly
|
|
186
196
|
get(path, **options)
|
187
197
|
end
|
188
198
|
|
189
|
-
#
|
199
|
+
# Update an account
|
190
200
|
#
|
191
|
-
# {https://developers.recurly.com/api/
|
201
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_account update_account api documenation}
|
192
202
|
#
|
193
203
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
194
204
|
# @param body [Requests::AccountUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::AccountUpdate}
|
195
|
-
# @param
|
205
|
+
# @param params [Hash] Optional query string parameters:
|
206
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
196
207
|
#
|
197
208
|
# @return [Resources::Account] An account.
|
198
209
|
# @example
|
@@ -219,10 +230,11 @@ module Recurly
|
|
219
230
|
|
220
231
|
# Deactivate an account
|
221
232
|
#
|
222
|
-
# {https://developers.recurly.com/api/
|
233
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/deactivate_account deactivate_account api documenation}
|
223
234
|
#
|
224
235
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
225
|
-
# @param
|
236
|
+
# @param params [Hash] Optional query string parameters:
|
237
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
226
238
|
#
|
227
239
|
# @return [Resources::Account] An account.
|
228
240
|
# @example
|
@@ -242,10 +254,11 @@ module Recurly
|
|
242
254
|
|
243
255
|
# Fetch an account's acquisition data
|
244
256
|
#
|
245
|
-
# {https://developers.recurly.com/api/
|
257
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_account_acquisition get_account_acquisition api documenation}
|
246
258
|
#
|
247
259
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
248
|
-
# @param
|
260
|
+
# @param params [Hash] Optional query string parameters:
|
261
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
249
262
|
#
|
250
263
|
# @return [Resources::AccountAcquisition] An account's acquisition data.
|
251
264
|
# @example
|
@@ -265,11 +278,12 @@ module Recurly
|
|
265
278
|
|
266
279
|
# Update an account's acquisition data
|
267
280
|
#
|
268
|
-
# {https://developers.recurly.com/api/
|
281
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_account_acquisition update_account_acquisition api documenation}
|
269
282
|
#
|
270
283
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
271
|
-
# @param body [Requests::
|
272
|
-
# @param
|
284
|
+
# @param body [Requests::AccountAcquisitionUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::AccountAcquisitionUpdate}
|
285
|
+
# @param params [Hash] Optional query string parameters:
|
286
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
273
287
|
#
|
274
288
|
# @return [Resources::AccountAcquisition] An account's updated acquisition data.
|
275
289
|
# @example
|
@@ -296,15 +310,16 @@ module Recurly
|
|
296
310
|
#
|
297
311
|
def update_account_acquisition(account_id:, body:, **options)
|
298
312
|
path = interpolate_path("/accounts/{account_id}/acquisition", account_id: account_id)
|
299
|
-
put(path, body, Requests::
|
313
|
+
put(path, body, Requests::AccountAcquisitionUpdate, **options)
|
300
314
|
end
|
301
315
|
|
302
316
|
# Remove an account's acquisition data
|
303
317
|
#
|
304
|
-
# {https://developers.recurly.com/api/
|
318
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_account_acquisition remove_account_acquisition api documenation}
|
305
319
|
#
|
306
320
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
307
|
-
# @param
|
321
|
+
# @param params [Hash] Optional query string parameters:
|
322
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
308
323
|
#
|
309
324
|
# @return [Resources::Empty] Acquisition data was succesfully deleted.
|
310
325
|
# @example
|
@@ -324,10 +339,11 @@ module Recurly
|
|
324
339
|
|
325
340
|
# Reactivate an inactive account
|
326
341
|
#
|
327
|
-
# {https://developers.recurly.com/api/
|
342
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/reactivate_account reactivate_account api documenation}
|
328
343
|
#
|
329
344
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
330
|
-
# @param
|
345
|
+
# @param params [Hash] Optional query string parameters:
|
346
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
331
347
|
#
|
332
348
|
# @return [Resources::Account] An account.
|
333
349
|
# @example
|
@@ -347,10 +363,11 @@ module Recurly
|
|
347
363
|
|
348
364
|
# Fetch an account's balance and past due status
|
349
365
|
#
|
350
|
-
# {https://developers.recurly.com/api/
|
366
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_account_balance get_account_balance api documenation}
|
351
367
|
#
|
352
368
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
353
|
-
# @param
|
369
|
+
# @param params [Hash] Optional query string parameters:
|
370
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
354
371
|
#
|
355
372
|
# @return [Resources::AccountBalance] An account's balance.
|
356
373
|
# @example
|
@@ -370,10 +387,11 @@ module Recurly
|
|
370
387
|
|
371
388
|
# Fetch an account's billing information
|
372
389
|
#
|
373
|
-
# {https://developers.recurly.com/api/
|
390
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_billing_info get_billing_info api documenation}
|
374
391
|
#
|
375
392
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
376
|
-
# @param
|
393
|
+
# @param params [Hash] Optional query string parameters:
|
394
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
377
395
|
#
|
378
396
|
# @return [Resources::BillingInfo] An account's billing information.
|
379
397
|
# @example
|
@@ -393,11 +411,12 @@ module Recurly
|
|
393
411
|
|
394
412
|
# Set an account's billing information
|
395
413
|
#
|
396
|
-
# {https://developers.recurly.com/api/
|
414
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_billing_info update_billing_info api documenation}
|
397
415
|
#
|
398
416
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
399
417
|
# @param body [Requests::BillingInfoCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::BillingInfoCreate}
|
400
|
-
# @param
|
418
|
+
# @param params [Hash] Optional query string parameters:
|
419
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
401
420
|
#
|
402
421
|
# @return [Resources::BillingInfo] Updated billing information.
|
403
422
|
# @example
|
@@ -424,10 +443,11 @@ module Recurly
|
|
424
443
|
|
425
444
|
# Remove an account's billing information
|
426
445
|
#
|
427
|
-
# {https://developers.recurly.com/api/
|
446
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_billing_info remove_billing_info api documenation}
|
428
447
|
#
|
429
448
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
430
|
-
# @param
|
449
|
+
# @param params [Hash] Optional query string parameters:
|
450
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
431
451
|
#
|
432
452
|
# @return [Resources::Empty] Billing information deleted
|
433
453
|
# @example
|
@@ -445,36 +465,13 @@ module Recurly
|
|
445
465
|
delete(path, **options)
|
446
466
|
end
|
447
467
|
|
448
|
-
# Verify an account's credit card billing information
|
449
|
-
#
|
450
|
-
# {https://developers.recurly.com/api/v2019-10-10#operation/verify_billing_info verify_billing_info api documentation}
|
451
|
-
#
|
452
|
-
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
453
|
-
# @param body [Requests::BillingInfoVerify] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::BillingInfoVerify}
|
454
|
-
# @param site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
455
|
-
#
|
456
|
-
# @return [Resources::Transaction] Transaction information from verify.
|
457
|
-
# @example
|
458
|
-
# begin
|
459
|
-
# transaction = @client.verify_billing_info(account_id: account_id)
|
460
|
-
# puts "Got Transaction #{transaction}"
|
461
|
-
# rescue Recurly::Errors::NotFoundError
|
462
|
-
# # If the resource was not found, you may want to alert the user or
|
463
|
-
# # just return nil
|
464
|
-
# puts "Resource Not Found"
|
465
|
-
# end
|
466
|
-
#
|
467
|
-
def verify_billing_info(account_id:, **options)
|
468
|
-
path = interpolate_path("/accounts/{account_id}/billing_info/verify", account_id: account_id)
|
469
|
-
post(path, options[:body], Requests::BillingInfoVerify, **options)
|
470
|
-
end
|
471
|
-
|
472
468
|
# Get the list of billing information associated with an account
|
473
469
|
#
|
474
|
-
# {https://developers.recurly.com/api/
|
470
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_billing_infos list_billing_infos api documenation}
|
475
471
|
#
|
476
472
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
477
|
-
# @param
|
473
|
+
# @param params [Hash] Optional query string parameters:
|
474
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
478
475
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
479
476
|
#
|
480
477
|
# *Important notes:*
|
@@ -486,17 +483,17 @@ module Recurly
|
|
486
483
|
# * Records are returned in an arbitrary order. Since results are all
|
487
484
|
# returned at once you can sort the records yourself.
|
488
485
|
#
|
489
|
-
#
|
486
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
490
487
|
# order. In descending order updated records will move behind the cursor and could
|
491
488
|
# prevent some records from being returned.
|
492
489
|
#
|
493
|
-
#
|
490
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
494
491
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
495
492
|
#
|
496
|
-
#
|
493
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
497
494
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
498
495
|
#
|
499
|
-
#
|
496
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
500
497
|
#
|
501
498
|
# @return [Pager<Resources::BillingInfo>] A list of the the billing information for an account's
|
502
499
|
#
|
@@ -505,13 +502,14 @@ module Recurly
|
|
505
502
|
pager(path, **options)
|
506
503
|
end
|
507
504
|
|
508
|
-
#
|
505
|
+
# Set an account's billing information when the wallet feature is enabled
|
509
506
|
#
|
510
|
-
# {https://developers.recurly.com/api/
|
507
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_billing_info create_billing_info api documenation}
|
511
508
|
#
|
512
509
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
513
510
|
# @param body [Requests::BillingInfoCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::BillingInfoCreate}
|
514
|
-
# @param
|
511
|
+
# @param params [Hash] Optional query string parameters:
|
512
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
515
513
|
#
|
516
514
|
# @return [Resources::BillingInfo] Updated billing information.
|
517
515
|
#
|
@@ -522,11 +520,12 @@ module Recurly
|
|
522
520
|
|
523
521
|
# Fetch a billing info
|
524
522
|
#
|
525
|
-
# {https://developers.recurly.com/api/
|
523
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_a_billing_info get_a_billing_info api documenation}
|
526
524
|
#
|
527
525
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
528
|
-
# @param billing_info_id [String] Billing Info ID.
|
529
|
-
# @param
|
526
|
+
# @param billing_info_id [String] Billing Info ID.
|
527
|
+
# @param params [Hash] Optional query string parameters:
|
528
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
530
529
|
#
|
531
530
|
# @return [Resources::BillingInfo] A billing info.
|
532
531
|
#
|
@@ -537,12 +536,13 @@ module Recurly
|
|
537
536
|
|
538
537
|
# Update an account's billing information
|
539
538
|
#
|
540
|
-
# {https://developers.recurly.com/api/
|
539
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_a_billing_info update_a_billing_info api documenation}
|
541
540
|
#
|
542
541
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
543
|
-
# @param billing_info_id [String] Billing Info ID.
|
542
|
+
# @param billing_info_id [String] Billing Info ID.
|
544
543
|
# @param body [Requests::BillingInfoCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::BillingInfoCreate}
|
545
|
-
# @param
|
544
|
+
# @param params [Hash] Optional query string parameters:
|
545
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
546
546
|
#
|
547
547
|
# @return [Resources::BillingInfo] Updated billing information.
|
548
548
|
#
|
@@ -553,11 +553,12 @@ module Recurly
|
|
553
553
|
|
554
554
|
# Remove an account's billing information
|
555
555
|
#
|
556
|
-
# {https://developers.recurly.com/api/
|
556
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_a_billing_info remove_a_billing_info api documenation}
|
557
557
|
#
|
558
558
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
559
|
-
# @param billing_info_id [String] Billing Info ID.
|
560
|
-
# @param
|
559
|
+
# @param billing_info_id [String] Billing Info ID.
|
560
|
+
# @param params [Hash] Optional query string parameters:
|
561
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
561
562
|
#
|
562
563
|
# @return [Resources::Empty] Billing information deleted
|
563
564
|
#
|
@@ -566,12 +567,13 @@ module Recurly
|
|
566
567
|
delete(path, **options)
|
567
568
|
end
|
568
569
|
|
569
|
-
#
|
570
|
+
# Show the coupon redemptions for an account
|
570
571
|
#
|
571
|
-
# {https://developers.recurly.com/api/
|
572
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_account_coupon_redemptions list_account_coupon_redemptions api documenation}
|
572
573
|
#
|
573
574
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
574
|
-
# @param
|
575
|
+
# @param params [Hash] Optional query string parameters:
|
576
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
575
577
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
576
578
|
#
|
577
579
|
# *Important notes:*
|
@@ -583,24 +585,27 @@ module Recurly
|
|
583
585
|
# * Records are returned in an arbitrary order. Since results are all
|
584
586
|
# returned at once you can sort the records yourself.
|
585
587
|
#
|
586
|
-
#
|
588
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
587
589
|
# order. In descending order updated records will move behind the cursor and could
|
588
590
|
# prevent some records from being returned.
|
589
591
|
#
|
590
|
-
#
|
592
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
591
593
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
592
594
|
#
|
593
|
-
#
|
595
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
594
596
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
595
597
|
#
|
596
|
-
#
|
597
|
-
#
|
598
|
+
# :state [String] Filter by state.
|
599
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
598
600
|
#
|
599
601
|
# @return [Pager<Resources::CouponRedemption>] A list of the the coupon redemptions on an account.
|
600
602
|
# @example
|
603
|
+
# params = {
|
604
|
+
# limit: 200
|
605
|
+
# }
|
601
606
|
# redemptions = @client.list_account_coupon_redemptions(
|
602
607
|
# account_id: account_id,
|
603
|
-
#
|
608
|
+
# params: params
|
604
609
|
# )
|
605
610
|
# redemptions.each do |redemption|
|
606
611
|
# puts "CouponRedemption: #{redemption.id}"
|
@@ -611,36 +616,37 @@ module Recurly
|
|
611
616
|
pager(path, **options)
|
612
617
|
end
|
613
618
|
|
614
|
-
#
|
619
|
+
# Show the coupon redemptions that are active on an account
|
615
620
|
#
|
616
|
-
# {https://developers.recurly.com/api/
|
621
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_active_coupon_redemptions list_active_coupon_redemptions api documenation}
|
617
622
|
#
|
618
623
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
619
|
-
# @param
|
624
|
+
# @param params [Hash] Optional query string parameters:
|
625
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
620
626
|
#
|
621
|
-
# @return [Resources::CouponRedemption]
|
627
|
+
# @return [Pager<Resources::CouponRedemption>] Active coupon redemptions on an account.
|
622
628
|
# @example
|
623
|
-
#
|
624
|
-
#
|
625
|
-
#
|
626
|
-
#
|
627
|
-
#
|
628
|
-
#
|
629
|
-
# puts "Resource Not Found"
|
629
|
+
# params = {
|
630
|
+
# limit: 200
|
631
|
+
# }
|
632
|
+
# redemptions = @client.list_active_coupon_redemptions(account_id: account_id, params: params)
|
633
|
+
# redemptions.each do |redemption|
|
634
|
+
# puts "Redemption: #{redemption.id}"
|
630
635
|
# end
|
631
636
|
#
|
632
|
-
def
|
637
|
+
def list_active_coupon_redemptions(account_id:, **options)
|
633
638
|
path = interpolate_path("/accounts/{account_id}/coupon_redemptions/active", account_id: account_id)
|
634
|
-
|
639
|
+
pager(path, **options)
|
635
640
|
end
|
636
641
|
|
637
642
|
# Generate an active coupon redemption on an account or subscription
|
638
643
|
#
|
639
|
-
# {https://developers.recurly.com/api/
|
644
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_coupon_redemption create_coupon_redemption api documenation}
|
640
645
|
#
|
641
646
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
642
647
|
# @param body [Requests::CouponRedemptionCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::CouponRedemptionCreate}
|
643
|
-
# @param
|
648
|
+
# @param params [Hash] Optional query string parameters:
|
649
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
644
650
|
#
|
645
651
|
# @return [Resources::CouponRedemption] Returns the new coupon redemption.
|
646
652
|
# @example
|
@@ -667,10 +673,11 @@ module Recurly
|
|
667
673
|
|
668
674
|
# Delete the active coupon redemption from an account
|
669
675
|
#
|
670
|
-
# {https://developers.recurly.com/api/
|
676
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_coupon_redemption remove_coupon_redemption api documenation}
|
671
677
|
#
|
672
678
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
673
|
-
# @param
|
679
|
+
# @param params [Hash] Optional query string parameters:
|
680
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
674
681
|
#
|
675
682
|
# @return [Resources::CouponRedemption] Coupon redemption deleted.
|
676
683
|
# @example
|
@@ -690,28 +697,32 @@ module Recurly
|
|
690
697
|
|
691
698
|
# List an account's credit payments
|
692
699
|
#
|
693
|
-
# {https://developers.recurly.com/api/
|
700
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_account_credit_payments list_account_credit_payments api documenation}
|
694
701
|
#
|
695
702
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
696
|
-
# @param
|
697
|
-
#
|
698
|
-
#
|
703
|
+
# @param params [Hash] Optional query string parameters:
|
704
|
+
# :limit [Integer] Limit number of records 1-200.
|
705
|
+
# :order [String] Sort order.
|
706
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
699
707
|
# order. In descending order updated records will move behind the cursor and could
|
700
708
|
# prevent some records from being returned.
|
701
709
|
#
|
702
|
-
#
|
710
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
703
711
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
704
712
|
#
|
705
|
-
#
|
713
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
706
714
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
707
715
|
#
|
708
|
-
#
|
716
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
709
717
|
#
|
710
718
|
# @return [Pager<Resources::CreditPayment>] A list of the account's credit payments.
|
711
719
|
# @example
|
720
|
+
# params = {
|
721
|
+
# limit: 200
|
722
|
+
# }
|
712
723
|
# payments = @client.list_account_credit_payments(
|
713
724
|
# account_id: account_id,
|
714
|
-
#
|
725
|
+
# params: params
|
715
726
|
# )
|
716
727
|
# payments.each do |payment|
|
717
728
|
# puts "CreditPayment: #{payment.id}"
|
@@ -724,10 +735,11 @@ module Recurly
|
|
724
735
|
|
725
736
|
# List an account's invoices
|
726
737
|
#
|
727
|
-
# {https://developers.recurly.com/api/
|
738
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_account_invoices list_account_invoices api documenation}
|
728
739
|
#
|
729
740
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
730
|
-
# @param
|
741
|
+
# @param params [Hash] Optional query string parameters:
|
742
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
731
743
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
732
744
|
#
|
733
745
|
# *Important notes:*
|
@@ -739,31 +751,34 @@ module Recurly
|
|
739
751
|
# * Records are returned in an arbitrary order. Since results are all
|
740
752
|
# returned at once you can sort the records yourself.
|
741
753
|
#
|
742
|
-
#
|
743
|
-
#
|
744
|
-
#
|
754
|
+
# :limit [Integer] Limit number of records 1-200.
|
755
|
+
# :order [String] Sort order.
|
756
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
745
757
|
# order. In descending order updated records will move behind the cursor and could
|
746
758
|
# prevent some records from being returned.
|
747
759
|
#
|
748
|
-
#
|
760
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
749
761
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
750
762
|
#
|
751
|
-
#
|
763
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
752
764
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
753
765
|
#
|
754
|
-
#
|
766
|
+
# :type [String] Filter by type when:
|
755
767
|
# - +type=charge+, only charge invoices will be returned.
|
756
768
|
# - +type=credit+, only credit invoices will be returned.
|
757
769
|
# - +type=non-legacy+, only charge and credit invoices will be returned.
|
758
770
|
# - +type=legacy+, only legacy invoices will be returned.
|
759
771
|
#
|
760
|
-
#
|
772
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
761
773
|
#
|
762
774
|
# @return [Pager<Resources::Invoice>] A list of the account's invoices.
|
763
775
|
# @example
|
776
|
+
# params = {
|
777
|
+
# limit: 200
|
778
|
+
# }
|
764
779
|
# invoices = @client.list_account_invoices(
|
765
780
|
# account_id: account_id,
|
766
|
-
#
|
781
|
+
# params: params
|
767
782
|
# )
|
768
783
|
# invoices.each do |invoice|
|
769
784
|
# puts "Invoice: #{invoice.number}"
|
@@ -776,11 +791,12 @@ module Recurly
|
|
776
791
|
|
777
792
|
# Create an invoice for pending line items
|
778
793
|
#
|
779
|
-
# {https://developers.recurly.com/api/
|
794
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_invoice create_invoice api documenation}
|
780
795
|
#
|
781
796
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
782
797
|
# @param body [Requests::InvoiceCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::InvoiceCreate}
|
783
|
-
# @param
|
798
|
+
# @param params [Hash] Optional query string parameters:
|
799
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
784
800
|
#
|
785
801
|
# @return [Resources::InvoiceCollection] Returns the new invoices.
|
786
802
|
# @example
|
@@ -807,11 +823,12 @@ module Recurly
|
|
807
823
|
|
808
824
|
# Preview new invoice for pending line items
|
809
825
|
#
|
810
|
-
# {https://developers.recurly.com/api/
|
826
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/preview_invoice preview_invoice api documenation}
|
811
827
|
#
|
812
828
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
813
829
|
# @param body [Requests::InvoiceCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::InvoiceCreate}
|
814
|
-
# @param
|
830
|
+
# @param params [Hash] Optional query string parameters:
|
831
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
815
832
|
#
|
816
833
|
# @return [Resources::InvoiceCollection] Returns the invoice previews.
|
817
834
|
# @example
|
@@ -838,10 +855,11 @@ module Recurly
|
|
838
855
|
|
839
856
|
# List an account's line items
|
840
857
|
#
|
841
|
-
# {https://developers.recurly.com/api/
|
858
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_account_line_items list_account_line_items api documenation}
|
842
859
|
#
|
843
860
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
844
|
-
# @param
|
861
|
+
# @param params [Hash] Optional query string parameters:
|
862
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
845
863
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
846
864
|
#
|
847
865
|
# *Important notes:*
|
@@ -853,28 +871,31 @@ module Recurly
|
|
853
871
|
# * Records are returned in an arbitrary order. Since results are all
|
854
872
|
# returned at once you can sort the records yourself.
|
855
873
|
#
|
856
|
-
#
|
857
|
-
#
|
858
|
-
#
|
874
|
+
# :limit [Integer] Limit number of records 1-200.
|
875
|
+
# :order [String] Sort order.
|
876
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
859
877
|
# order. In descending order updated records will move behind the cursor and could
|
860
878
|
# prevent some records from being returned.
|
861
879
|
#
|
862
|
-
#
|
880
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
863
881
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
864
882
|
#
|
865
|
-
#
|
883
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
866
884
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
867
885
|
#
|
868
|
-
#
|
869
|
-
#
|
870
|
-
#
|
871
|
-
#
|
886
|
+
# :original [String] Filter by original field.
|
887
|
+
# :state [String] Filter by state field.
|
888
|
+
# :type [String] Filter by type field.
|
889
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
872
890
|
#
|
873
891
|
# @return [Pager<Resources::LineItem>] A list of the account's line items.
|
874
892
|
# @example
|
893
|
+
# params = {
|
894
|
+
# limit: 200
|
895
|
+
# }
|
875
896
|
# line_items = @client.list_account_line_items(
|
876
897
|
# account_id: account_id,
|
877
|
-
#
|
898
|
+
# params: params
|
878
899
|
# )
|
879
900
|
# line_items.each do |line_item|
|
880
901
|
# puts "LineItem: #{line_item.id}"
|
@@ -887,11 +908,12 @@ module Recurly
|
|
887
908
|
|
888
909
|
# Create a new line item for the account
|
889
910
|
#
|
890
|
-
# {https://developers.recurly.com/api/
|
911
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_line_item create_line_item api documenation}
|
891
912
|
#
|
892
913
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
893
914
|
# @param body [Requests::LineItemCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::LineItemCreate}
|
894
|
-
# @param
|
915
|
+
# @param params [Hash] Optional query string parameters:
|
916
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
895
917
|
#
|
896
918
|
# @return [Resources::LineItem] Returns the new line item.
|
897
919
|
# @example
|
@@ -917,12 +939,13 @@ module Recurly
|
|
917
939
|
post(path, body, Requests::LineItemCreate, **options)
|
918
940
|
end
|
919
941
|
|
920
|
-
#
|
942
|
+
# Fetch a list of an account's notes
|
921
943
|
#
|
922
|
-
# {https://developers.recurly.com/api/
|
944
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_account_notes list_account_notes api documenation}
|
923
945
|
#
|
924
946
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
925
|
-
# @param
|
947
|
+
# @param params [Hash] Optional query string parameters:
|
948
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
926
949
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
927
950
|
#
|
928
951
|
# *Important notes:*
|
@@ -934,11 +957,14 @@ module Recurly
|
|
934
957
|
# * Records are returned in an arbitrary order. Since results are all
|
935
958
|
# returned at once you can sort the records yourself.
|
936
959
|
#
|
937
|
-
#
|
960
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
938
961
|
#
|
939
962
|
# @return [Pager<Resources::AccountNote>] A list of an account's notes.
|
940
963
|
# @example
|
941
|
-
#
|
964
|
+
# params = {
|
965
|
+
# limit: 200
|
966
|
+
# }
|
967
|
+
# account_notes = @client.list_account_notes(account_id: account_id, params: params)
|
942
968
|
# account_notes.each do |note|
|
943
969
|
# puts "AccountNote: #{note.message}"
|
944
970
|
# end
|
@@ -950,11 +976,12 @@ module Recurly
|
|
950
976
|
|
951
977
|
# Fetch an account note
|
952
978
|
#
|
953
|
-
# {https://developers.recurly.com/api/
|
979
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_account_note get_account_note api documenation}
|
954
980
|
#
|
955
981
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
956
982
|
# @param account_note_id [String] Account Note ID.
|
957
|
-
# @param
|
983
|
+
# @param params [Hash] Optional query string parameters:
|
984
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
958
985
|
#
|
959
986
|
# @return [Resources::AccountNote] An account note.
|
960
987
|
# @example
|
@@ -977,10 +1004,11 @@ module Recurly
|
|
977
1004
|
|
978
1005
|
# Fetch a list of an account's shipping addresses
|
979
1006
|
#
|
980
|
-
# {https://developers.recurly.com/api/
|
1007
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_shipping_addresses list_shipping_addresses api documenation}
|
981
1008
|
#
|
982
1009
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
983
|
-
# @param
|
1010
|
+
# @param params [Hash] Optional query string parameters:
|
1011
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
984
1012
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
985
1013
|
#
|
986
1014
|
# *Important notes:*
|
@@ -992,25 +1020,28 @@ module Recurly
|
|
992
1020
|
# * Records are returned in an arbitrary order. Since results are all
|
993
1021
|
# returned at once you can sort the records yourself.
|
994
1022
|
#
|
995
|
-
#
|
996
|
-
#
|
997
|
-
#
|
1023
|
+
# :limit [Integer] Limit number of records 1-200.
|
1024
|
+
# :order [String] Sort order.
|
1025
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
998
1026
|
# order. In descending order updated records will move behind the cursor and could
|
999
1027
|
# prevent some records from being returned.
|
1000
1028
|
#
|
1001
|
-
#
|
1029
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1002
1030
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1003
1031
|
#
|
1004
|
-
#
|
1032
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1005
1033
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1006
1034
|
#
|
1007
|
-
#
|
1035
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1008
1036
|
#
|
1009
1037
|
# @return [Pager<Resources::ShippingAddress>] A list of an account's shipping addresses.
|
1010
1038
|
# @example
|
1039
|
+
# params = {
|
1040
|
+
# limit: 200
|
1041
|
+
# }
|
1011
1042
|
# shipping_addresses = @client.list_shipping_addresses(
|
1012
1043
|
# account_id: account_id,
|
1013
|
-
#
|
1044
|
+
# params: params
|
1014
1045
|
# )
|
1015
1046
|
# shipping_addresses.each do |addr|
|
1016
1047
|
# puts "ShippingAddress: #{addr.nickname} - #{addr.street1}"
|
@@ -1023,11 +1054,12 @@ module Recurly
|
|
1023
1054
|
|
1024
1055
|
# Create a new shipping address for the account
|
1025
1056
|
#
|
1026
|
-
# {https://developers.recurly.com/api/
|
1057
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_shipping_address create_shipping_address api documenation}
|
1027
1058
|
#
|
1028
1059
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
1029
1060
|
# @param body [Requests::ShippingAddressCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::ShippingAddressCreate}
|
1030
|
-
# @param
|
1061
|
+
# @param params [Hash] Optional query string parameters:
|
1062
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1031
1063
|
#
|
1032
1064
|
# @return [Resources::ShippingAddress] Returns the new shipping address.
|
1033
1065
|
# @example
|
@@ -1057,11 +1089,12 @@ module Recurly
|
|
1057
1089
|
|
1058
1090
|
# Fetch an account's shipping address
|
1059
1091
|
#
|
1060
|
-
# {https://developers.recurly.com/api/
|
1092
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_shipping_address get_shipping_address api documenation}
|
1061
1093
|
#
|
1062
1094
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
1063
1095
|
# @param shipping_address_id [String] Shipping Address ID.
|
1064
|
-
# @param
|
1096
|
+
# @param params [Hash] Optional query string parameters:
|
1097
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1065
1098
|
#
|
1066
1099
|
# @return [Resources::ShippingAddress] A shipping address.
|
1067
1100
|
# @example
|
@@ -1084,12 +1117,13 @@ module Recurly
|
|
1084
1117
|
|
1085
1118
|
# Update an account's shipping address
|
1086
1119
|
#
|
1087
|
-
# {https://developers.recurly.com/api/
|
1120
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_shipping_address update_shipping_address api documenation}
|
1088
1121
|
#
|
1089
1122
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
1090
1123
|
# @param shipping_address_id [String] Shipping Address ID.
|
1091
1124
|
# @param body [Requests::ShippingAddressUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::ShippingAddressUpdate}
|
1092
|
-
# @param
|
1125
|
+
# @param params [Hash] Optional query string parameters:
|
1126
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1093
1127
|
#
|
1094
1128
|
# @return [Resources::ShippingAddress] The updated shipping address.
|
1095
1129
|
# @example
|
@@ -1118,11 +1152,12 @@ module Recurly
|
|
1118
1152
|
|
1119
1153
|
# Remove an account's shipping address
|
1120
1154
|
#
|
1121
|
-
# {https://developers.recurly.com/api/
|
1155
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_shipping_address remove_shipping_address api documenation}
|
1122
1156
|
#
|
1123
1157
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
1124
1158
|
# @param shipping_address_id [String] Shipping Address ID.
|
1125
|
-
# @param
|
1159
|
+
# @param params [Hash] Optional query string parameters:
|
1160
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1126
1161
|
#
|
1127
1162
|
# @return [Resources::Empty] Shipping address deleted.
|
1128
1163
|
# @example
|
@@ -1145,10 +1180,11 @@ module Recurly
|
|
1145
1180
|
|
1146
1181
|
# List an account's subscriptions
|
1147
1182
|
#
|
1148
|
-
# {https://developers.recurly.com/api/
|
1183
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_account_subscriptions list_account_subscriptions api documenation}
|
1149
1184
|
#
|
1150
1185
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
1151
|
-
# @param
|
1186
|
+
# @param params [Hash] Optional query string parameters:
|
1187
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
1152
1188
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1153
1189
|
#
|
1154
1190
|
# *Important notes:*
|
@@ -1160,31 +1196,34 @@ module Recurly
|
|
1160
1196
|
# * Records are returned in an arbitrary order. Since results are all
|
1161
1197
|
# returned at once you can sort the records yourself.
|
1162
1198
|
#
|
1163
|
-
#
|
1164
|
-
#
|
1165
|
-
#
|
1199
|
+
# :limit [Integer] Limit number of records 1-200.
|
1200
|
+
# :order [String] Sort order.
|
1201
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
1166
1202
|
# order. In descending order updated records will move behind the cursor and could
|
1167
1203
|
# prevent some records from being returned.
|
1168
1204
|
#
|
1169
|
-
#
|
1205
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1170
1206
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1171
1207
|
#
|
1172
|
-
#
|
1208
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1173
1209
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1174
1210
|
#
|
1175
|
-
#
|
1211
|
+
# :state [String] Filter by state.
|
1176
1212
|
#
|
1177
1213
|
# - When +state=active+, +state=canceled+, +state=expired+, or +state=future+, subscriptions with states that match the query and only those subscriptions will be returned.
|
1178
1214
|
# - When +state=in_trial+, only subscriptions that have a trial_started_at date earlier than now and a trial_ends_at date later than now will be returned.
|
1179
1215
|
# - When +state=live+, only subscriptions that are in an active, canceled, or future state or are in trial will be returned.
|
1180
1216
|
#
|
1181
|
-
#
|
1217
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1182
1218
|
#
|
1183
1219
|
# @return [Pager<Resources::Subscription>] A list of the account's subscriptions.
|
1184
1220
|
# @example
|
1221
|
+
# params = {
|
1222
|
+
# limit: 200
|
1223
|
+
# }
|
1185
1224
|
# subscriptions = @client.list_account_subscriptions(
|
1186
1225
|
# account_id: account_id,
|
1187
|
-
#
|
1226
|
+
# params: params
|
1188
1227
|
# )
|
1189
1228
|
# subscriptions.each do |subscription|
|
1190
1229
|
# puts "Subscription: #{subscription.uuid}"
|
@@ -1197,10 +1236,11 @@ module Recurly
|
|
1197
1236
|
|
1198
1237
|
# List an account's transactions
|
1199
1238
|
#
|
1200
|
-
# {https://developers.recurly.com/api/
|
1239
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_account_transactions list_account_transactions api documenation}
|
1201
1240
|
#
|
1202
1241
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
1203
|
-
# @param
|
1242
|
+
# @param params [Hash] Optional query string parameters:
|
1243
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
1204
1244
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1205
1245
|
#
|
1206
1246
|
# *Important notes:*
|
@@ -1212,27 +1252,30 @@ module Recurly
|
|
1212
1252
|
# * Records are returned in an arbitrary order. Since results are all
|
1213
1253
|
# returned at once you can sort the records yourself.
|
1214
1254
|
#
|
1215
|
-
#
|
1216
|
-
#
|
1217
|
-
#
|
1255
|
+
# :limit [Integer] Limit number of records 1-200.
|
1256
|
+
# :order [String] Sort order.
|
1257
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
1218
1258
|
# order. In descending order updated records will move behind the cursor and could
|
1219
1259
|
# prevent some records from being returned.
|
1220
1260
|
#
|
1221
|
-
#
|
1261
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1222
1262
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1223
1263
|
#
|
1224
|
-
#
|
1264
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1225
1265
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1226
1266
|
#
|
1227
|
-
#
|
1228
|
-
#
|
1229
|
-
#
|
1267
|
+
# :type [String] Filter by type field. The value +payment+ will return both +purchase+ and +capture+ transactions.
|
1268
|
+
# :success [String] Filter by success field.
|
1269
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1230
1270
|
#
|
1231
1271
|
# @return [Pager<Resources::Transaction>] A list of the account's transactions.
|
1232
1272
|
# @example
|
1273
|
+
# params = {
|
1274
|
+
# limit: 200
|
1275
|
+
# }
|
1233
1276
|
# transactions = @client.list_account_transactions(
|
1234
1277
|
# account_id: account_id,
|
1235
|
-
#
|
1278
|
+
# params: params
|
1236
1279
|
# )
|
1237
1280
|
# transactions.each do |transaction|
|
1238
1281
|
# puts "Transaction: #{transaction.uuid}"
|
@@ -1245,10 +1288,11 @@ module Recurly
|
|
1245
1288
|
|
1246
1289
|
# List an account's child accounts
|
1247
1290
|
#
|
1248
|
-
# {https://developers.recurly.com/api/
|
1291
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_child_accounts list_child_accounts api documenation}
|
1249
1292
|
#
|
1250
1293
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
1251
|
-
# @param
|
1294
|
+
# @param params [Hash] Optional query string parameters:
|
1295
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
1252
1296
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1253
1297
|
#
|
1254
1298
|
# *Important notes:*
|
@@ -1260,30 +1304,33 @@ module Recurly
|
|
1260
1304
|
# * Records are returned in an arbitrary order. Since results are all
|
1261
1305
|
# returned at once you can sort the records yourself.
|
1262
1306
|
#
|
1263
|
-
#
|
1264
|
-
#
|
1265
|
-
#
|
1307
|
+
# :limit [Integer] Limit number of records 1-200.
|
1308
|
+
# :order [String] Sort order.
|
1309
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
1266
1310
|
# order. In descending order updated records will move behind the cursor and could
|
1267
1311
|
# prevent some records from being returned.
|
1268
1312
|
#
|
1269
|
-
#
|
1313
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1270
1314
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1271
1315
|
#
|
1272
|
-
#
|
1316
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1273
1317
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1274
1318
|
#
|
1275
|
-
#
|
1276
|
-
#
|
1319
|
+
# :email [String] Filter for accounts with this exact email address. A blank value will return accounts with both +null+ and +""+ email addresses. Note that multiple accounts can share one email address.
|
1320
|
+
# :subscriber [Boolean] Filter for accounts with or without a subscription in the +active+,
|
1277
1321
|
# +canceled+, or +future+ state.
|
1278
1322
|
#
|
1279
|
-
#
|
1280
|
-
#
|
1323
|
+
# :past_due [String] Filter for accounts with an invoice in the +past_due+ state.
|
1324
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1281
1325
|
#
|
1282
1326
|
# @return [Pager<Resources::Account>] A list of an account's child accounts.
|
1283
1327
|
# @example
|
1328
|
+
# params = {
|
1329
|
+
# limit: 200
|
1330
|
+
# }
|
1284
1331
|
# child_accounts = @client.list_child_accounts(
|
1285
1332
|
# account_id: account_id,
|
1286
|
-
#
|
1333
|
+
# params: params
|
1287
1334
|
# )
|
1288
1335
|
# child_accounts.each do |child|
|
1289
1336
|
# puts "Account: #{child.code}"
|
@@ -1296,9 +1343,10 @@ module Recurly
|
|
1296
1343
|
|
1297
1344
|
# List a site's account acquisition data
|
1298
1345
|
#
|
1299
|
-
# {https://developers.recurly.com/api/
|
1346
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_account_acquisition list_account_acquisition api documenation}
|
1300
1347
|
#
|
1301
|
-
# @param
|
1348
|
+
# @param params [Hash] Optional query string parameters:
|
1349
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
1302
1350
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1303
1351
|
#
|
1304
1352
|
# *Important notes:*
|
@@ -1310,23 +1358,26 @@ module Recurly
|
|
1310
1358
|
# * Records are returned in an arbitrary order. Since results are all
|
1311
1359
|
# returned at once you can sort the records yourself.
|
1312
1360
|
#
|
1313
|
-
#
|
1314
|
-
#
|
1315
|
-
#
|
1361
|
+
# :limit [Integer] Limit number of records 1-200.
|
1362
|
+
# :order [String] Sort order.
|
1363
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
1316
1364
|
# order. In descending order updated records will move behind the cursor and could
|
1317
1365
|
# prevent some records from being returned.
|
1318
1366
|
#
|
1319
|
-
#
|
1367
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1320
1368
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1321
1369
|
#
|
1322
|
-
#
|
1370
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1323
1371
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1324
1372
|
#
|
1325
|
-
#
|
1373
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1326
1374
|
#
|
1327
1375
|
# @return [Pager<Resources::AccountAcquisition>] A list of the site's account acquisition data.
|
1328
1376
|
# @example
|
1329
|
-
#
|
1377
|
+
# params = {
|
1378
|
+
# limit: 200
|
1379
|
+
# }
|
1380
|
+
# acquisitions = @client.list_account_acquisition(params: params)
|
1330
1381
|
# acquisitions.each do |acquisition|
|
1331
1382
|
# puts "AccountAcquisition: #{acquisition.cost}"
|
1332
1383
|
# end
|
@@ -1338,9 +1389,10 @@ module Recurly
|
|
1338
1389
|
|
1339
1390
|
# List a site's coupons
|
1340
1391
|
#
|
1341
|
-
# {https://developers.recurly.com/api/
|
1392
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_coupons list_coupons api documenation}
|
1342
1393
|
#
|
1343
|
-
# @param
|
1394
|
+
# @param params [Hash] Optional query string parameters:
|
1395
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
1344
1396
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1345
1397
|
#
|
1346
1398
|
# *Important notes:*
|
@@ -1352,23 +1404,26 @@ module Recurly
|
|
1352
1404
|
# * Records are returned in an arbitrary order. Since results are all
|
1353
1405
|
# returned at once you can sort the records yourself.
|
1354
1406
|
#
|
1355
|
-
#
|
1356
|
-
#
|
1357
|
-
#
|
1407
|
+
# :limit [Integer] Limit number of records 1-200.
|
1408
|
+
# :order [String] Sort order.
|
1409
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
1358
1410
|
# order. In descending order updated records will move behind the cursor and could
|
1359
1411
|
# prevent some records from being returned.
|
1360
1412
|
#
|
1361
|
-
#
|
1413
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1362
1414
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1363
1415
|
#
|
1364
|
-
#
|
1416
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1365
1417
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1366
1418
|
#
|
1367
|
-
#
|
1419
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1368
1420
|
#
|
1369
1421
|
# @return [Pager<Resources::Coupon>] A list of the site's coupons.
|
1370
1422
|
# @example
|
1371
|
-
#
|
1423
|
+
# params = {
|
1424
|
+
# limit: 200
|
1425
|
+
# }
|
1426
|
+
# coupons = @client.list_coupons(params: params)
|
1372
1427
|
# coupons.each do |coupon|
|
1373
1428
|
# puts "coupon: #{coupon.code}"
|
1374
1429
|
# end
|
@@ -1380,10 +1435,11 @@ module Recurly
|
|
1380
1435
|
|
1381
1436
|
# Create a new coupon
|
1382
1437
|
#
|
1383
|
-
# {https://developers.recurly.com/api/
|
1438
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_coupon create_coupon api documenation}
|
1384
1439
|
#
|
1385
1440
|
# @param body [Requests::CouponCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::CouponCreate}
|
1386
|
-
# @param
|
1441
|
+
# @param params [Hash] Optional query string parameters:
|
1442
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1387
1443
|
#
|
1388
1444
|
# @return [Resources::Coupon] A new coupon.
|
1389
1445
|
# @example
|
@@ -1416,10 +1472,11 @@ module Recurly
|
|
1416
1472
|
|
1417
1473
|
# Fetch a coupon
|
1418
1474
|
#
|
1419
|
-
# {https://developers.recurly.com/api/
|
1475
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_coupon get_coupon api documenation}
|
1420
1476
|
#
|
1421
1477
|
# @param coupon_id [String] Coupon ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-10off+.
|
1422
|
-
# @param
|
1478
|
+
# @param params [Hash] Optional query string parameters:
|
1479
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1423
1480
|
#
|
1424
1481
|
# @return [Resources::Coupon] A coupon.
|
1425
1482
|
# @example
|
@@ -1439,11 +1496,12 @@ module Recurly
|
|
1439
1496
|
|
1440
1497
|
# Update an active coupon
|
1441
1498
|
#
|
1442
|
-
# {https://developers.recurly.com/api/
|
1499
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_coupon update_coupon api documenation}
|
1443
1500
|
#
|
1444
1501
|
# @param coupon_id [String] Coupon ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-10off+.
|
1445
1502
|
# @param body [Requests::CouponUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::CouponUpdate}
|
1446
|
-
# @param
|
1503
|
+
# @param params [Hash] Optional query string parameters:
|
1504
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1447
1505
|
#
|
1448
1506
|
# @return [Resources::Coupon] The updated coupon.
|
1449
1507
|
# @example
|
@@ -1466,10 +1524,11 @@ module Recurly
|
|
1466
1524
|
|
1467
1525
|
# Expire a coupon
|
1468
1526
|
#
|
1469
|
-
# {https://developers.recurly.com/api/
|
1527
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/deactivate_coupon deactivate_coupon api documenation}
|
1470
1528
|
#
|
1471
1529
|
# @param coupon_id [String] Coupon ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-10off+.
|
1472
|
-
# @param
|
1530
|
+
# @param params [Hash] Optional query string parameters:
|
1531
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1473
1532
|
#
|
1474
1533
|
# @return [Resources::Coupon] The expired Coupon
|
1475
1534
|
# @example
|
@@ -1487,26 +1546,32 @@ module Recurly
|
|
1487
1546
|
delete(path, **options)
|
1488
1547
|
end
|
1489
1548
|
|
1549
|
+
# Generate unique coupon codes
|
1550
|
+
#
|
1551
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/generate_unique_coupon_codes generate_unique_coupon_codes api documenation}
|
1552
|
+
#
|
1553
|
+
# @param coupon_id [String] Coupon ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-10off+.
|
1554
|
+
# @param body [Requests::CouponBulkCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::CouponBulkCreate}
|
1555
|
+
# @param params [Hash] Optional query string parameters:
|
1556
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1557
|
+
#
|
1558
|
+
# @return [Resources::UniqueCouponCodeParams] A set of parameters that can be passed to the `list_unique_coupon_codes` endpoint to obtain only the newly generated `UniqueCouponCodes`.
|
1559
|
+
#
|
1560
|
+
def generate_unique_coupon_codes(coupon_id:, body:, **options)
|
1561
|
+
path = interpolate_path("/coupons/{coupon_id}/generate", coupon_id: coupon_id)
|
1562
|
+
post(path, body, Requests::CouponBulkCreate, **options)
|
1563
|
+
end
|
1564
|
+
|
1490
1565
|
# Restore an inactive coupon
|
1491
1566
|
#
|
1492
|
-
# {https://developers.recurly.com/api/
|
1567
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/restore_coupon restore_coupon api documenation}
|
1493
1568
|
#
|
1494
1569
|
# @param coupon_id [String] Coupon ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-10off+.
|
1495
1570
|
# @param body [Requests::CouponUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::CouponUpdate}
|
1496
|
-
# @param
|
1571
|
+
# @param params [Hash] Optional query string parameters:
|
1572
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1497
1573
|
#
|
1498
1574
|
# @return [Resources::Coupon] The restored coupon.
|
1499
|
-
# @example
|
1500
|
-
# begin
|
1501
|
-
# coupon = @client.restore_coupon(coupon_id: coupon_id, body: {
|
1502
|
-
# name: "New Coupon Name"
|
1503
|
-
# })
|
1504
|
-
# puts "Restored coupon #{coupon}"
|
1505
|
-
# rescue Recurly::Errors::NotFoundError
|
1506
|
-
# # If the resource was not found, you may want to alert the user or
|
1507
|
-
# # just return nil
|
1508
|
-
# puts "Resource Not Found"
|
1509
|
-
# end
|
1510
1575
|
#
|
1511
1576
|
def restore_coupon(coupon_id:, body:, **options)
|
1512
1577
|
path = interpolate_path("/coupons/{coupon_id}/restore", coupon_id: coupon_id)
|
@@ -1515,10 +1580,11 @@ module Recurly
|
|
1515
1580
|
|
1516
1581
|
# List unique coupon codes associated with a bulk coupon
|
1517
1582
|
#
|
1518
|
-
# {https://developers.recurly.com/api/
|
1583
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_unique_coupon_codes list_unique_coupon_codes api documenation}
|
1519
1584
|
#
|
1520
1585
|
# @param coupon_id [String] Coupon ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-10off+.
|
1521
|
-
# @param
|
1586
|
+
# @param params [Hash] Optional query string parameters:
|
1587
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
1522
1588
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1523
1589
|
#
|
1524
1590
|
# *Important notes:*
|
@@ -1530,19 +1596,19 @@ module Recurly
|
|
1530
1596
|
# * Records are returned in an arbitrary order. Since results are all
|
1531
1597
|
# returned at once you can sort the records yourself.
|
1532
1598
|
#
|
1533
|
-
#
|
1534
|
-
#
|
1535
|
-
#
|
1599
|
+
# :limit [Integer] Limit number of records 1-200.
|
1600
|
+
# :order [String] Sort order.
|
1601
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
1536
1602
|
# order. In descending order updated records will move behind the cursor and could
|
1537
1603
|
# prevent some records from being returned.
|
1538
1604
|
#
|
1539
|
-
#
|
1605
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1540
1606
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1541
1607
|
#
|
1542
|
-
#
|
1608
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1543
1609
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1544
1610
|
#
|
1545
|
-
#
|
1611
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1546
1612
|
#
|
1547
1613
|
# @return [Pager<Resources::UniqueCouponCode>] A list of unique coupon codes that were generated
|
1548
1614
|
#
|
@@ -1553,25 +1619,29 @@ module Recurly
|
|
1553
1619
|
|
1554
1620
|
# List a site's credit payments
|
1555
1621
|
#
|
1556
|
-
# {https://developers.recurly.com/api/
|
1622
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_credit_payments list_credit_payments api documenation}
|
1557
1623
|
#
|
1558
|
-
# @param
|
1559
|
-
#
|
1560
|
-
#
|
1624
|
+
# @param params [Hash] Optional query string parameters:
|
1625
|
+
# :limit [Integer] Limit number of records 1-200.
|
1626
|
+
# :order [String] Sort order.
|
1627
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
1561
1628
|
# order. In descending order updated records will move behind the cursor and could
|
1562
1629
|
# prevent some records from being returned.
|
1563
1630
|
#
|
1564
|
-
#
|
1631
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1565
1632
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1566
1633
|
#
|
1567
|
-
#
|
1634
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1568
1635
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1569
1636
|
#
|
1570
|
-
#
|
1637
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1571
1638
|
#
|
1572
1639
|
# @return [Pager<Resources::CreditPayment>] A list of the site's credit payments.
|
1573
1640
|
# @example
|
1574
|
-
#
|
1641
|
+
# params = {
|
1642
|
+
# limit: 200
|
1643
|
+
# }
|
1644
|
+
# payments = @client.list_credit_payments(params: params)
|
1575
1645
|
# payments.each do |payment|
|
1576
1646
|
# puts "CreditPayment: #{payment.id}"
|
1577
1647
|
# end
|
@@ -1583,10 +1653,11 @@ module Recurly
|
|
1583
1653
|
|
1584
1654
|
# Fetch a credit payment
|
1585
1655
|
#
|
1586
|
-
# {https://developers.recurly.com/api/
|
1656
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_credit_payment get_credit_payment api documenation}
|
1587
1657
|
#
|
1588
1658
|
# @param credit_payment_id [String] Credit Payment ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
1589
|
-
# @param
|
1659
|
+
# @param params [Hash] Optional query string parameters:
|
1660
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1590
1661
|
#
|
1591
1662
|
# @return [Resources::CreditPayment] A credit payment.
|
1592
1663
|
#
|
@@ -1597,9 +1668,10 @@ module Recurly
|
|
1597
1668
|
|
1598
1669
|
# List a site's custom field definitions
|
1599
1670
|
#
|
1600
|
-
# {https://developers.recurly.com/api/
|
1671
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_custom_field_definitions list_custom_field_definitions api documenation}
|
1601
1672
|
#
|
1602
|
-
# @param
|
1673
|
+
# @param params [Hash] Optional query string parameters:
|
1674
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
1603
1675
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1604
1676
|
#
|
1605
1677
|
# *Important notes:*
|
@@ -1611,24 +1683,27 @@ module Recurly
|
|
1611
1683
|
# * Records are returned in an arbitrary order. Since results are all
|
1612
1684
|
# returned at once you can sort the records yourself.
|
1613
1685
|
#
|
1614
|
-
#
|
1615
|
-
#
|
1616
|
-
#
|
1686
|
+
# :limit [Integer] Limit number of records 1-200.
|
1687
|
+
# :order [String] Sort order.
|
1688
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
1617
1689
|
# order. In descending order updated records will move behind the cursor and could
|
1618
1690
|
# prevent some records from being returned.
|
1619
1691
|
#
|
1620
|
-
#
|
1692
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1621
1693
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1622
1694
|
#
|
1623
|
-
#
|
1695
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1624
1696
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1625
1697
|
#
|
1626
|
-
#
|
1627
|
-
#
|
1698
|
+
# :related_type [String] Filter by related type.
|
1699
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1628
1700
|
#
|
1629
1701
|
# @return [Pager<Resources::CustomFieldDefinition>] A list of the site's custom field definitions.
|
1630
1702
|
# @example
|
1631
|
-
#
|
1703
|
+
# params = {
|
1704
|
+
# limit: 200
|
1705
|
+
# }
|
1706
|
+
# custom_fields = @client.list_custom_field_definitions(params: params)
|
1632
1707
|
# custom_fields.each do |field|
|
1633
1708
|
# puts "CustomFieldDefinition: #{field.name}"
|
1634
1709
|
# end
|
@@ -1640,10 +1715,11 @@ module Recurly
|
|
1640
1715
|
|
1641
1716
|
# Fetch an custom field definition
|
1642
1717
|
#
|
1643
|
-
# {https://developers.recurly.com/api/
|
1718
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_custom_field_definition get_custom_field_definition api documenation}
|
1644
1719
|
#
|
1645
1720
|
# @param custom_field_definition_id [String] Custom Field Definition ID
|
1646
|
-
# @param
|
1721
|
+
# @param params [Hash] Optional query string parameters:
|
1722
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1647
1723
|
#
|
1648
1724
|
# @return [Resources::CustomFieldDefinition] An custom field definition.
|
1649
1725
|
# @example
|
@@ -1665,9 +1741,10 @@ module Recurly
|
|
1665
1741
|
|
1666
1742
|
# List a site's items
|
1667
1743
|
#
|
1668
|
-
# {https://developers.recurly.com/api/
|
1744
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_items list_items api documenation}
|
1669
1745
|
#
|
1670
|
-
# @param
|
1746
|
+
# @param params [Hash] Optional query string parameters:
|
1747
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
1671
1748
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1672
1749
|
#
|
1673
1750
|
# *Important notes:*
|
@@ -1679,24 +1756,27 @@ module Recurly
|
|
1679
1756
|
# * Records are returned in an arbitrary order. Since results are all
|
1680
1757
|
# returned at once you can sort the records yourself.
|
1681
1758
|
#
|
1682
|
-
#
|
1683
|
-
#
|
1684
|
-
#
|
1759
|
+
# :limit [Integer] Limit number of records 1-200.
|
1760
|
+
# :order [String] Sort order.
|
1761
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
1685
1762
|
# order. In descending order updated records will move behind the cursor and could
|
1686
1763
|
# prevent some records from being returned.
|
1687
1764
|
#
|
1688
|
-
#
|
1765
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1689
1766
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1690
1767
|
#
|
1691
|
-
#
|
1768
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1692
1769
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1693
1770
|
#
|
1694
|
-
#
|
1695
|
-
#
|
1771
|
+
# :state [String] Filter by state.
|
1772
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1696
1773
|
#
|
1697
1774
|
# @return [Pager<Resources::Item>] A list of the site's items.
|
1698
1775
|
# @example
|
1699
|
-
#
|
1776
|
+
# params = {
|
1777
|
+
# limit: 200
|
1778
|
+
# }
|
1779
|
+
# items = @client.list_items(params: params)
|
1700
1780
|
# items.each do |item|
|
1701
1781
|
# puts "Item: #{item.code}"
|
1702
1782
|
# end
|
@@ -1708,10 +1788,11 @@ module Recurly
|
|
1708
1788
|
|
1709
1789
|
# Create a new item
|
1710
1790
|
#
|
1711
|
-
# {https://developers.recurly.com/api/
|
1791
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_item create_item api documenation}
|
1712
1792
|
#
|
1713
1793
|
# @param body [Requests::ItemCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::ItemCreate}
|
1714
|
-
# @param
|
1794
|
+
# @param params [Hash] Optional query string parameters:
|
1795
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1715
1796
|
#
|
1716
1797
|
# @return [Resources::Item] A new item.
|
1717
1798
|
# @example
|
@@ -1743,10 +1824,11 @@ module Recurly
|
|
1743
1824
|
|
1744
1825
|
# Fetch an item
|
1745
1826
|
#
|
1746
|
-
# {https://developers.recurly.com/api/
|
1827
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_item get_item api documenation}
|
1747
1828
|
#
|
1748
1829
|
# @param item_id [String] Item ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-red+.
|
1749
|
-
# @param
|
1830
|
+
# @param params [Hash] Optional query string parameters:
|
1831
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1750
1832
|
#
|
1751
1833
|
# @return [Resources::Item] An item.
|
1752
1834
|
# @example
|
@@ -1766,11 +1848,12 @@ module Recurly
|
|
1766
1848
|
|
1767
1849
|
# Update an active item
|
1768
1850
|
#
|
1769
|
-
# {https://developers.recurly.com/api/
|
1851
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_item update_item api documenation}
|
1770
1852
|
#
|
1771
1853
|
# @param item_id [String] Item ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-red+.
|
1772
1854
|
# @param body [Requests::ItemUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::ItemUpdate}
|
1773
|
-
# @param
|
1855
|
+
# @param params [Hash] Optional query string parameters:
|
1856
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1774
1857
|
#
|
1775
1858
|
# @return [Resources::Item] The updated item.
|
1776
1859
|
# @example
|
@@ -1797,10 +1880,11 @@ module Recurly
|
|
1797
1880
|
|
1798
1881
|
# Deactivate an item
|
1799
1882
|
#
|
1800
|
-
# {https://developers.recurly.com/api/
|
1883
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/deactivate_item deactivate_item api documenation}
|
1801
1884
|
#
|
1802
1885
|
# @param item_id [String] Item ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-red+.
|
1803
|
-
# @param
|
1886
|
+
# @param params [Hash] Optional query string parameters:
|
1887
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1804
1888
|
#
|
1805
1889
|
# @return [Resources::Item] An item.
|
1806
1890
|
# @example
|
@@ -1820,10 +1904,11 @@ module Recurly
|
|
1820
1904
|
|
1821
1905
|
# Reactivate an inactive item
|
1822
1906
|
#
|
1823
|
-
# {https://developers.recurly.com/api/
|
1907
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/reactivate_item reactivate_item api documenation}
|
1824
1908
|
#
|
1825
1909
|
# @param item_id [String] Item ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-red+.
|
1826
|
-
# @param
|
1910
|
+
# @param params [Hash] Optional query string parameters:
|
1911
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1827
1912
|
#
|
1828
1913
|
# @return [Resources::Item] An item.
|
1829
1914
|
# @example
|
@@ -1843,9 +1928,10 @@ module Recurly
|
|
1843
1928
|
|
1844
1929
|
# List a site's measured units
|
1845
1930
|
#
|
1846
|
-
# {https://developers.recurly.com/api/
|
1931
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_measured_unit list_measured_unit api documenation}
|
1847
1932
|
#
|
1848
|
-
# @param
|
1933
|
+
# @param params [Hash] Optional query string parameters:
|
1934
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
1849
1935
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1850
1936
|
#
|
1851
1937
|
# *Important notes:*
|
@@ -1857,20 +1943,20 @@ module Recurly
|
|
1857
1943
|
# * Records are returned in an arbitrary order. Since results are all
|
1858
1944
|
# returned at once you can sort the records yourself.
|
1859
1945
|
#
|
1860
|
-
#
|
1861
|
-
#
|
1862
|
-
#
|
1946
|
+
# :limit [Integer] Limit number of records 1-200.
|
1947
|
+
# :order [String] Sort order.
|
1948
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
1863
1949
|
# order. In descending order updated records will move behind the cursor and could
|
1864
1950
|
# prevent some records from being returned.
|
1865
1951
|
#
|
1866
|
-
#
|
1952
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1867
1953
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1868
1954
|
#
|
1869
|
-
#
|
1955
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1870
1956
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1871
1957
|
#
|
1872
|
-
#
|
1873
|
-
#
|
1958
|
+
# :state [String] Filter by state.
|
1959
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1874
1960
|
#
|
1875
1961
|
# @return [Pager<Resources::MeasuredUnit>] A list of the site's measured units.
|
1876
1962
|
#
|
@@ -1881,10 +1967,11 @@ module Recurly
|
|
1881
1967
|
|
1882
1968
|
# Create a new measured unit
|
1883
1969
|
#
|
1884
|
-
# {https://developers.recurly.com/api/
|
1970
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_measured_unit create_measured_unit api documenation}
|
1885
1971
|
#
|
1886
1972
|
# @param body [Requests::MeasuredUnitCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::MeasuredUnitCreate}
|
1887
|
-
# @param
|
1973
|
+
# @param params [Hash] Optional query string parameters:
|
1974
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1888
1975
|
#
|
1889
1976
|
# @return [Resources::MeasuredUnit] A new measured unit.
|
1890
1977
|
#
|
@@ -1895,10 +1982,11 @@ module Recurly
|
|
1895
1982
|
|
1896
1983
|
# Fetch a measured unit
|
1897
1984
|
#
|
1898
|
-
# {https://developers.recurly.com/api/
|
1985
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_measured_unit get_measured_unit api documenation}
|
1899
1986
|
#
|
1900
1987
|
# @param measured_unit_id [String] Measured unit ID or name. For ID no prefix is used e.g. +e28zov4fw0v2+. For name use prefix +name-+, e.g. +name-Storage+.
|
1901
|
-
# @param
|
1988
|
+
# @param params [Hash] Optional query string parameters:
|
1989
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1902
1990
|
#
|
1903
1991
|
# @return [Resources::MeasuredUnit] An item.
|
1904
1992
|
#
|
@@ -1909,11 +1997,12 @@ module Recurly
|
|
1909
1997
|
|
1910
1998
|
# Update a measured unit
|
1911
1999
|
#
|
1912
|
-
# {https://developers.recurly.com/api/
|
2000
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_measured_unit update_measured_unit api documenation}
|
1913
2001
|
#
|
1914
2002
|
# @param measured_unit_id [String] Measured unit ID or name. For ID no prefix is used e.g. +e28zov4fw0v2+. For name use prefix +name-+, e.g. +name-Storage+.
|
1915
2003
|
# @param body [Requests::MeasuredUnitUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::MeasuredUnitUpdate}
|
1916
|
-
# @param
|
2004
|
+
# @param params [Hash] Optional query string parameters:
|
2005
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1917
2006
|
#
|
1918
2007
|
# @return [Resources::MeasuredUnit] The updated measured_unit.
|
1919
2008
|
#
|
@@ -1924,10 +2013,11 @@ module Recurly
|
|
1924
2013
|
|
1925
2014
|
# Remove a measured unit
|
1926
2015
|
#
|
1927
|
-
# {https://developers.recurly.com/api/
|
2016
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_measured_unit remove_measured_unit api documenation}
|
1928
2017
|
#
|
1929
2018
|
# @param measured_unit_id [String] Measured unit ID or name. For ID no prefix is used e.g. +e28zov4fw0v2+. For name use prefix +name-+, e.g. +name-Storage+.
|
1930
|
-
# @param
|
2019
|
+
# @param params [Hash] Optional query string parameters:
|
2020
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1931
2021
|
#
|
1932
2022
|
# @return [Resources::MeasuredUnit] A measured unit.
|
1933
2023
|
#
|
@@ -1938,9 +2028,10 @@ module Recurly
|
|
1938
2028
|
|
1939
2029
|
# List a site's invoices
|
1940
2030
|
#
|
1941
|
-
# {https://developers.recurly.com/api/
|
2031
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_invoices list_invoices api documenation}
|
1942
2032
|
#
|
1943
|
-
# @param
|
2033
|
+
# @param params [Hash] Optional query string parameters:
|
2034
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
1944
2035
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1945
2036
|
#
|
1946
2037
|
# *Important notes:*
|
@@ -1952,29 +2043,32 @@ module Recurly
|
|
1952
2043
|
# * Records are returned in an arbitrary order. Since results are all
|
1953
2044
|
# returned at once you can sort the records yourself.
|
1954
2045
|
#
|
1955
|
-
#
|
1956
|
-
#
|
1957
|
-
#
|
2046
|
+
# :limit [Integer] Limit number of records 1-200.
|
2047
|
+
# :order [String] Sort order.
|
2048
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
1958
2049
|
# order. In descending order updated records will move behind the cursor and could
|
1959
2050
|
# prevent some records from being returned.
|
1960
2051
|
#
|
1961
|
-
#
|
2052
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1962
2053
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1963
2054
|
#
|
1964
|
-
#
|
2055
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1965
2056
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1966
2057
|
#
|
1967
|
-
#
|
2058
|
+
# :type [String] Filter by type when:
|
1968
2059
|
# - +type=charge+, only charge invoices will be returned.
|
1969
2060
|
# - +type=credit+, only credit invoices will be returned.
|
1970
2061
|
# - +type=non-legacy+, only charge and credit invoices will be returned.
|
1971
2062
|
# - +type=legacy+, only legacy invoices will be returned.
|
1972
2063
|
#
|
1973
|
-
#
|
2064
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1974
2065
|
#
|
1975
2066
|
# @return [Pager<Resources::Invoice>] A list of the site's invoices.
|
1976
2067
|
# @example
|
1977
|
-
#
|
2068
|
+
# params = {
|
2069
|
+
# limit: 200
|
2070
|
+
# }
|
2071
|
+
# invoices = @client.list_invoices(params: params)
|
1978
2072
|
# invoices.each do |invoice|
|
1979
2073
|
# puts "Invoice: #{invoice.number}"
|
1980
2074
|
# end
|
@@ -1986,10 +2080,11 @@ module Recurly
|
|
1986
2080
|
|
1987
2081
|
# Fetch an invoice
|
1988
2082
|
#
|
1989
|
-
# {https://developers.recurly.com/api/
|
2083
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_invoice get_invoice api documenation}
|
1990
2084
|
#
|
1991
2085
|
# @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
|
1992
|
-
# @param
|
2086
|
+
# @param params [Hash] Optional query string parameters:
|
2087
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
1993
2088
|
#
|
1994
2089
|
# @return [Resources::Invoice] An invoice.
|
1995
2090
|
# @example
|
@@ -2009,11 +2104,12 @@ module Recurly
|
|
2009
2104
|
|
2010
2105
|
# Update an invoice
|
2011
2106
|
#
|
2012
|
-
# {https://developers.recurly.com/api/
|
2107
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_invoice update_invoice api documenation}
|
2013
2108
|
#
|
2014
2109
|
# @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
|
2015
|
-
# @param body [Requests::
|
2016
|
-
# @param
|
2110
|
+
# @param body [Requests::InvoiceUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::InvoiceUpdate}
|
2111
|
+
# @param params [Hash] Optional query string parameters:
|
2112
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2017
2113
|
#
|
2018
2114
|
# @return [Resources::Invoice] An invoice.
|
2019
2115
|
# @example
|
@@ -2022,7 +2118,7 @@ module Recurly
|
|
2022
2118
|
# customer_notes: "New Notes",
|
2023
2119
|
# terms_and_conditions: "New Terms and Conditions"
|
2024
2120
|
# }
|
2025
|
-
# invoice = @client.
|
2121
|
+
# invoice = @client.update_invoice(invoice_id: invoice_id, body: invoice_update)
|
2026
2122
|
# puts "Updated invoice #{invoice}"
|
2027
2123
|
# rescue Recurly::Errors::NotFoundError
|
2028
2124
|
# # If the resource was not found, you may want to alert the user or
|
@@ -2030,17 +2126,18 @@ module Recurly
|
|
2030
2126
|
# puts "Resource Not Found"
|
2031
2127
|
# end
|
2032
2128
|
#
|
2033
|
-
def
|
2129
|
+
def update_invoice(invoice_id:, body:, **options)
|
2034
2130
|
path = interpolate_path("/invoices/{invoice_id}", invoice_id: invoice_id)
|
2035
|
-
put(path, body, Requests::
|
2131
|
+
put(path, body, Requests::InvoiceUpdate, **options)
|
2036
2132
|
end
|
2037
2133
|
|
2038
2134
|
# Fetch an invoice as a PDF
|
2039
2135
|
#
|
2040
|
-
# {https://developers.recurly.com/api/
|
2136
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_invoice_pdf get_invoice_pdf api documenation}
|
2041
2137
|
#
|
2042
2138
|
# @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
|
2043
|
-
# @param
|
2139
|
+
# @param params [Hash] Optional query string parameters:
|
2140
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2044
2141
|
#
|
2045
2142
|
# @return [Resources::BinaryFile] An invoice as a PDF.
|
2046
2143
|
# @example
|
@@ -2061,36 +2158,14 @@ module Recurly
|
|
2061
2158
|
get(path, **options)
|
2062
2159
|
end
|
2063
2160
|
|
2064
|
-
# Apply available credit to a pending or past due charge invoice
|
2065
|
-
#
|
2066
|
-
# {https://developers.recurly.com/api/v2019-10-10#operation/apply_credit_balance apply_credit_balance api documentation}
|
2067
|
-
#
|
2068
|
-
# @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
|
2069
|
-
# @param site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2070
|
-
#
|
2071
|
-
# @return [Resources::Invoice] The updated invoice.
|
2072
|
-
# @example
|
2073
|
-
# begin
|
2074
|
-
# invoice = @client.apply_credit_balance(invoice_id: invoice_id)
|
2075
|
-
# puts "Applied credit balance to invoice #{invoice}"
|
2076
|
-
# rescue Recurly::Errors::NotFoundError
|
2077
|
-
# # If the resource was not found, you may want to alert the user or
|
2078
|
-
# # just return nil
|
2079
|
-
# puts "Resource Not Found"
|
2080
|
-
# end
|
2081
|
-
#
|
2082
|
-
def apply_credit_balance(invoice_id:, **options)
|
2083
|
-
path = interpolate_path("/invoices/{invoice_id}/apply_credit_balance", invoice_id: invoice_id)
|
2084
|
-
put(path, **options)
|
2085
|
-
end
|
2086
|
-
|
2087
2161
|
# Collect a pending or past due, automatic invoice
|
2088
2162
|
#
|
2089
|
-
# {https://developers.recurly.com/api/
|
2163
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/collect_invoice collect_invoice api documenation}
|
2090
2164
|
#
|
2091
2165
|
# @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
|
2092
|
-
# @param
|
2093
|
-
#
|
2166
|
+
# @param params [Hash] Optional query string parameters:
|
2167
|
+
# :body [Requests::InvoiceCollect] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::InvoiceCollect}
|
2168
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2094
2169
|
#
|
2095
2170
|
# @return [Resources::Invoice] The updated invoice.
|
2096
2171
|
# @example
|
@@ -2110,15 +2185,16 @@ module Recurly
|
|
2110
2185
|
|
2111
2186
|
# Mark an open invoice as failed
|
2112
2187
|
#
|
2113
|
-
# {https://developers.recurly.com/api/
|
2188
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/mark_invoice_failed mark_invoice_failed api documenation}
|
2114
2189
|
#
|
2115
2190
|
# @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
|
2116
|
-
# @param
|
2191
|
+
# @param params [Hash] Optional query string parameters:
|
2192
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2117
2193
|
#
|
2118
2194
|
# @return [Resources::Invoice] The updated invoice.
|
2119
2195
|
# @example
|
2120
2196
|
# begin
|
2121
|
-
# invoice = @client.
|
2197
|
+
# invoice = @client.mark_invoice_failed(invoice_id: invoice_id)
|
2122
2198
|
# puts "Failed invoice #{invoice}"
|
2123
2199
|
# rescue Recurly::Errors::NotFoundError
|
2124
2200
|
# # If the resource was not found, you may want to alert the user or
|
@@ -2126,17 +2202,18 @@ module Recurly
|
|
2126
2202
|
# puts "Resource Not Found"
|
2127
2203
|
# end
|
2128
2204
|
#
|
2129
|
-
def
|
2205
|
+
def mark_invoice_failed(invoice_id:, **options)
|
2130
2206
|
path = interpolate_path("/invoices/{invoice_id}/mark_failed", invoice_id: invoice_id)
|
2131
2207
|
put(path, **options)
|
2132
2208
|
end
|
2133
2209
|
|
2134
2210
|
# Mark an open invoice as successful
|
2135
2211
|
#
|
2136
|
-
# {https://developers.recurly.com/api/
|
2212
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/mark_invoice_successful mark_invoice_successful api documenation}
|
2137
2213
|
#
|
2138
2214
|
# @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
|
2139
|
-
# @param
|
2215
|
+
# @param params [Hash] Optional query string parameters:
|
2216
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2140
2217
|
#
|
2141
2218
|
# @return [Resources::Invoice] The updated invoice.
|
2142
2219
|
# @example
|
@@ -2156,10 +2233,11 @@ module Recurly
|
|
2156
2233
|
|
2157
2234
|
# Reopen a closed, manual invoice
|
2158
2235
|
#
|
2159
|
-
# {https://developers.recurly.com/api/
|
2236
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/reopen_invoice reopen_invoice api documenation}
|
2160
2237
|
#
|
2161
2238
|
# @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
|
2162
|
-
# @param
|
2239
|
+
# @param params [Hash] Optional query string parameters:
|
2240
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2163
2241
|
#
|
2164
2242
|
# @return [Resources::Invoice] The updated invoice.
|
2165
2243
|
# @example
|
@@ -2179,10 +2257,11 @@ module Recurly
|
|
2179
2257
|
|
2180
2258
|
# Void a credit invoice.
|
2181
2259
|
#
|
2182
|
-
# {https://developers.recurly.com/api/
|
2260
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/void_invoice void_invoice api documenation}
|
2183
2261
|
#
|
2184
2262
|
# @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
|
2185
|
-
# @param
|
2263
|
+
# @param params [Hash] Optional query string parameters:
|
2264
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2186
2265
|
#
|
2187
2266
|
# @return [Resources::Invoice] The updated invoice.
|
2188
2267
|
# @example
|
@@ -2202,11 +2281,12 @@ module Recurly
|
|
2202
2281
|
|
2203
2282
|
# Record an external payment for a manual invoices.
|
2204
2283
|
#
|
2205
|
-
# {https://developers.recurly.com/api/
|
2284
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/record_external_transaction record_external_transaction api documenation}
|
2206
2285
|
#
|
2207
2286
|
# @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
|
2208
2287
|
# @param body [Requests::ExternalTransaction] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::ExternalTransaction}
|
2209
|
-
# @param
|
2288
|
+
# @param params [Hash] Optional query string parameters:
|
2289
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2210
2290
|
#
|
2211
2291
|
# @return [Resources::Transaction] The recorded transaction.
|
2212
2292
|
#
|
@@ -2217,10 +2297,11 @@ module Recurly
|
|
2217
2297
|
|
2218
2298
|
# List an invoice's line items
|
2219
2299
|
#
|
2220
|
-
# {https://developers.recurly.com/api/
|
2300
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_line_items list_invoice_line_items api documenation}
|
2221
2301
|
#
|
2222
2302
|
# @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
|
2223
|
-
# @param
|
2303
|
+
# @param params [Hash] Optional query string parameters:
|
2304
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
2224
2305
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
2225
2306
|
#
|
2226
2307
|
# *Important notes:*
|
@@ -2232,28 +2313,31 @@ module Recurly
|
|
2232
2313
|
# * Records are returned in an arbitrary order. Since results are all
|
2233
2314
|
# returned at once you can sort the records yourself.
|
2234
2315
|
#
|
2235
|
-
#
|
2236
|
-
#
|
2237
|
-
#
|
2316
|
+
# :limit [Integer] Limit number of records 1-200.
|
2317
|
+
# :order [String] Sort order.
|
2318
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
2238
2319
|
# order. In descending order updated records will move behind the cursor and could
|
2239
2320
|
# prevent some records from being returned.
|
2240
2321
|
#
|
2241
|
-
#
|
2322
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
2242
2323
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2243
2324
|
#
|
2244
|
-
#
|
2325
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
2245
2326
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2246
2327
|
#
|
2247
|
-
#
|
2248
|
-
#
|
2249
|
-
#
|
2250
|
-
#
|
2328
|
+
# :original [String] Filter by original field.
|
2329
|
+
# :state [String] Filter by state field.
|
2330
|
+
# :type [String] Filter by type field.
|
2331
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2251
2332
|
#
|
2252
2333
|
# @return [Pager<Resources::LineItem>] A list of the invoice's line items.
|
2253
2334
|
# @example
|
2335
|
+
# params = {
|
2336
|
+
# limit: 200
|
2337
|
+
# }
|
2254
2338
|
# line_items = @client.list_invoice_line_items(
|
2255
2339
|
# invoice_id: invoice_id,
|
2256
|
-
#
|
2340
|
+
# params: params
|
2257
2341
|
# )
|
2258
2342
|
# line_items.each do |line_item|
|
2259
2343
|
# puts "Line Item: #{line_item.id}"
|
@@ -2264,12 +2348,13 @@ module Recurly
|
|
2264
2348
|
pager(path, **options)
|
2265
2349
|
end
|
2266
2350
|
|
2267
|
-
#
|
2351
|
+
# Show the coupon redemptions applied to an invoice
|
2268
2352
|
#
|
2269
|
-
# {https://developers.recurly.com/api/
|
2353
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_coupon_redemptions list_invoice_coupon_redemptions api documenation}
|
2270
2354
|
#
|
2271
2355
|
# @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
|
2272
|
-
# @param
|
2356
|
+
# @param params [Hash] Optional query string parameters:
|
2357
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
2273
2358
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
2274
2359
|
#
|
2275
2360
|
# *Important notes:*
|
@@ -2281,23 +2366,26 @@ module Recurly
|
|
2281
2366
|
# * Records are returned in an arbitrary order. Since results are all
|
2282
2367
|
# returned at once you can sort the records yourself.
|
2283
2368
|
#
|
2284
|
-
#
|
2369
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
2285
2370
|
# order. In descending order updated records will move behind the cursor and could
|
2286
2371
|
# prevent some records from being returned.
|
2287
2372
|
#
|
2288
|
-
#
|
2373
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
2289
2374
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2290
2375
|
#
|
2291
|
-
#
|
2376
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
2292
2377
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2293
2378
|
#
|
2294
|
-
#
|
2379
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2295
2380
|
#
|
2296
2381
|
# @return [Pager<Resources::CouponRedemption>] A list of the the coupon redemptions associated with the invoice.
|
2297
2382
|
# @example
|
2383
|
+
# params = {
|
2384
|
+
# limit: 200
|
2385
|
+
# }
|
2298
2386
|
# coupon_redemptions = @client.list_invoice_coupon_redemptions(
|
2299
2387
|
# invoice_id: invoice_id,
|
2300
|
-
#
|
2388
|
+
# params: params
|
2301
2389
|
# )
|
2302
2390
|
# coupon_redemptions.each do |redemption|
|
2303
2391
|
# puts "CouponRedemption: #{redemption.id}"
|
@@ -2310,16 +2398,20 @@ module Recurly
|
|
2310
2398
|
|
2311
2399
|
# List an invoice's related credit or charge invoices
|
2312
2400
|
#
|
2313
|
-
# {https://developers.recurly.com/api/
|
2401
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_related_invoices list_related_invoices api documenation}
|
2314
2402
|
#
|
2315
2403
|
# @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
|
2316
|
-
# @param
|
2404
|
+
# @param params [Hash] Optional query string parameters:
|
2405
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2317
2406
|
#
|
2318
2407
|
# @return [Pager<Resources::Invoice>] A list of the credit or charge invoices associated with the invoice.
|
2319
2408
|
# @example
|
2409
|
+
# params = {
|
2410
|
+
# limit: 200
|
2411
|
+
# }
|
2320
2412
|
# invoices = @client.list_related_invoices(
|
2321
2413
|
# invoice_id: invoice_id,
|
2322
|
-
#
|
2414
|
+
# params: params
|
2323
2415
|
# )
|
2324
2416
|
# invoices.each do |invoice|
|
2325
2417
|
# puts "Invoice: #{invoice.number}"
|
@@ -2332,11 +2424,12 @@ module Recurly
|
|
2332
2424
|
|
2333
2425
|
# Refund an invoice
|
2334
2426
|
#
|
2335
|
-
# {https://developers.recurly.com/api/
|
2427
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/refund_invoice refund_invoice api documenation}
|
2336
2428
|
#
|
2337
2429
|
# @param invoice_id [String] Invoice ID or number. For ID no prefix is used e.g. +e28zov4fw0v2+. For number use prefix +number-+, e.g. +number-1000+.
|
2338
2430
|
# @param body [Requests::InvoiceRefund] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::InvoiceRefund}
|
2339
|
-
# @param
|
2431
|
+
# @param params [Hash] Optional query string parameters:
|
2432
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2340
2433
|
#
|
2341
2434
|
# @return [Resources::Invoice] Returns the new credit invoice.
|
2342
2435
|
# @example
|
@@ -2363,9 +2456,10 @@ module Recurly
|
|
2363
2456
|
|
2364
2457
|
# List a site's line items
|
2365
2458
|
#
|
2366
|
-
# {https://developers.recurly.com/api/
|
2459
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_line_items list_line_items api documenation}
|
2367
2460
|
#
|
2368
|
-
# @param
|
2461
|
+
# @param params [Hash] Optional query string parameters:
|
2462
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
2369
2463
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
2370
2464
|
#
|
2371
2465
|
# *Important notes:*
|
@@ -2377,27 +2471,30 @@ module Recurly
|
|
2377
2471
|
# * Records are returned in an arbitrary order. Since results are all
|
2378
2472
|
# returned at once you can sort the records yourself.
|
2379
2473
|
#
|
2380
|
-
#
|
2381
|
-
#
|
2382
|
-
#
|
2474
|
+
# :limit [Integer] Limit number of records 1-200.
|
2475
|
+
# :order [String] Sort order.
|
2476
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
2383
2477
|
# order. In descending order updated records will move behind the cursor and could
|
2384
2478
|
# prevent some records from being returned.
|
2385
2479
|
#
|
2386
|
-
#
|
2480
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
2387
2481
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2388
2482
|
#
|
2389
|
-
#
|
2483
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
2390
2484
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2391
2485
|
#
|
2392
|
-
#
|
2393
|
-
#
|
2394
|
-
#
|
2395
|
-
#
|
2486
|
+
# :original [String] Filter by original field.
|
2487
|
+
# :state [String] Filter by state field.
|
2488
|
+
# :type [String] Filter by type field.
|
2489
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2396
2490
|
#
|
2397
2491
|
# @return [Pager<Resources::LineItem>] A list of the site's line items.
|
2398
2492
|
# @example
|
2399
|
-
#
|
2493
|
+
# params = {
|
2400
2494
|
# limit: 200
|
2495
|
+
# }
|
2496
|
+
# line_items = @client.list_line_items(
|
2497
|
+
# params: params
|
2401
2498
|
# )
|
2402
2499
|
# line_items.each do |line_item|
|
2403
2500
|
# puts "LineItem: #{line_item.id}"
|
@@ -2410,10 +2507,11 @@ module Recurly
|
|
2410
2507
|
|
2411
2508
|
# Fetch a line item
|
2412
2509
|
#
|
2413
|
-
# {https://developers.recurly.com/api/
|
2510
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_line_item get_line_item api documenation}
|
2414
2511
|
#
|
2415
2512
|
# @param line_item_id [String] Line Item ID.
|
2416
|
-
# @param
|
2513
|
+
# @param params [Hash] Optional query string parameters:
|
2514
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2417
2515
|
#
|
2418
2516
|
# @return [Resources::LineItem] A line item.
|
2419
2517
|
# @example
|
@@ -2433,10 +2531,11 @@ module Recurly
|
|
2433
2531
|
|
2434
2532
|
# Delete an uninvoiced line item
|
2435
2533
|
#
|
2436
|
-
# {https://developers.recurly.com/api/
|
2534
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_line_item remove_line_item api documenation}
|
2437
2535
|
#
|
2438
2536
|
# @param line_item_id [String] Line Item ID.
|
2439
|
-
# @param
|
2537
|
+
# @param params [Hash] Optional query string parameters:
|
2538
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2440
2539
|
#
|
2441
2540
|
# @return [Resources::Empty] Line item deleted.
|
2442
2541
|
# @example
|
@@ -2458,9 +2557,10 @@ module Recurly
|
|
2458
2557
|
|
2459
2558
|
# List a site's plans
|
2460
2559
|
#
|
2461
|
-
# {https://developers.recurly.com/api/
|
2560
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_plans list_plans api documenation}
|
2462
2561
|
#
|
2463
|
-
# @param
|
2562
|
+
# @param params [Hash] Optional query string parameters:
|
2563
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
2464
2564
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
2465
2565
|
#
|
2466
2566
|
# *Important notes:*
|
@@ -2472,24 +2572,27 @@ module Recurly
|
|
2472
2572
|
# * Records are returned in an arbitrary order. Since results are all
|
2473
2573
|
# returned at once you can sort the records yourself.
|
2474
2574
|
#
|
2475
|
-
#
|
2476
|
-
#
|
2477
|
-
#
|
2575
|
+
# :limit [Integer] Limit number of records 1-200.
|
2576
|
+
# :order [String] Sort order.
|
2577
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
2478
2578
|
# order. In descending order updated records will move behind the cursor and could
|
2479
2579
|
# prevent some records from being returned.
|
2480
2580
|
#
|
2481
|
-
#
|
2581
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
2482
2582
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2483
2583
|
#
|
2484
|
-
#
|
2584
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
2485
2585
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2486
2586
|
#
|
2487
|
-
#
|
2488
|
-
#
|
2587
|
+
# :state [String] Filter by state.
|
2588
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2489
2589
|
#
|
2490
2590
|
# @return [Pager<Resources::Plan>] A list of plans.
|
2491
2591
|
# @example
|
2492
|
-
#
|
2592
|
+
# params = {
|
2593
|
+
# limit: 200
|
2594
|
+
# }
|
2595
|
+
# plans = @client.list_plans(params: params)
|
2493
2596
|
# plans.each do |plan|
|
2494
2597
|
# puts "Plan: #{plan.code}"
|
2495
2598
|
# end
|
@@ -2501,10 +2604,11 @@ module Recurly
|
|
2501
2604
|
|
2502
2605
|
# Create a plan
|
2503
2606
|
#
|
2504
|
-
# {https://developers.recurly.com/api/
|
2607
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_plan create_plan api documenation}
|
2505
2608
|
#
|
2506
2609
|
# @param body [Requests::PlanCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::PlanCreate}
|
2507
|
-
# @param
|
2610
|
+
# @param params [Hash] Optional query string parameters:
|
2611
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2508
2612
|
#
|
2509
2613
|
# @return [Resources::Plan] A plan.
|
2510
2614
|
# @example
|
@@ -2541,10 +2645,11 @@ module Recurly
|
|
2541
2645
|
|
2542
2646
|
# Fetch a plan
|
2543
2647
|
#
|
2544
|
-
# {https://developers.recurly.com/api/
|
2648
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_plan get_plan api documenation}
|
2545
2649
|
#
|
2546
2650
|
# @param plan_id [String] Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
|
2547
|
-
# @param
|
2651
|
+
# @param params [Hash] Optional query string parameters:
|
2652
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2548
2653
|
#
|
2549
2654
|
# @return [Resources::Plan] A plan.
|
2550
2655
|
# @example
|
@@ -2564,11 +2669,12 @@ module Recurly
|
|
2564
2669
|
|
2565
2670
|
# Update a plan
|
2566
2671
|
#
|
2567
|
-
# {https://developers.recurly.com/api/
|
2672
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_plan update_plan api documenation}
|
2568
2673
|
#
|
2569
2674
|
# @param plan_id [String] Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
|
2570
2675
|
# @param body [Requests::PlanUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::PlanUpdate}
|
2571
|
-
# @param
|
2676
|
+
# @param params [Hash] Optional query string parameters:
|
2677
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2572
2678
|
#
|
2573
2679
|
# @return [Resources::Plan] A plan.
|
2574
2680
|
# @example
|
@@ -2591,10 +2697,11 @@ module Recurly
|
|
2591
2697
|
|
2592
2698
|
# Remove a plan
|
2593
2699
|
#
|
2594
|
-
# {https://developers.recurly.com/api/
|
2700
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_plan remove_plan api documenation}
|
2595
2701
|
#
|
2596
2702
|
# @param plan_id [String] Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
|
2597
|
-
# @param
|
2703
|
+
# @param params [Hash] Optional query string parameters:
|
2704
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2598
2705
|
#
|
2599
2706
|
# @return [Resources::Plan] Plan deleted
|
2600
2707
|
# @example
|
@@ -2614,10 +2721,11 @@ module Recurly
|
|
2614
2721
|
|
2615
2722
|
# List a plan's add-ons
|
2616
2723
|
#
|
2617
|
-
# {https://developers.recurly.com/api/
|
2724
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_plan_add_ons list_plan_add_ons api documenation}
|
2618
2725
|
#
|
2619
2726
|
# @param plan_id [String] Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
|
2620
|
-
# @param
|
2727
|
+
# @param params [Hash] Optional query string parameters:
|
2728
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
2621
2729
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
2622
2730
|
#
|
2623
2731
|
# *Important notes:*
|
@@ -2629,26 +2737,29 @@ module Recurly
|
|
2629
2737
|
# * Records are returned in an arbitrary order. Since results are all
|
2630
2738
|
# returned at once you can sort the records yourself.
|
2631
2739
|
#
|
2632
|
-
#
|
2633
|
-
#
|
2634
|
-
#
|
2740
|
+
# :limit [Integer] Limit number of records 1-200.
|
2741
|
+
# :order [String] Sort order.
|
2742
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
2635
2743
|
# order. In descending order updated records will move behind the cursor and could
|
2636
2744
|
# prevent some records from being returned.
|
2637
2745
|
#
|
2638
|
-
#
|
2746
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
2639
2747
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2640
2748
|
#
|
2641
|
-
#
|
2749
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
2642
2750
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2643
2751
|
#
|
2644
|
-
#
|
2645
|
-
#
|
2752
|
+
# :state [String] Filter by state.
|
2753
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2646
2754
|
#
|
2647
2755
|
# @return [Pager<Resources::AddOn>] A list of add-ons.
|
2648
2756
|
# @example
|
2757
|
+
# params = {
|
2758
|
+
# limit: 200
|
2759
|
+
# }
|
2649
2760
|
# add_ons = @client.list_plan_add_ons(
|
2650
2761
|
# plan_id: plan_id,
|
2651
|
-
#
|
2762
|
+
# params: params
|
2652
2763
|
# )
|
2653
2764
|
# add_ons.each do |add_on|
|
2654
2765
|
# puts "AddOn: #{add_on.code}"
|
@@ -2661,11 +2772,12 @@ module Recurly
|
|
2661
2772
|
|
2662
2773
|
# Create an add-on
|
2663
2774
|
#
|
2664
|
-
# {https://developers.recurly.com/api/
|
2775
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_plan_add_on create_plan_add_on api documenation}
|
2665
2776
|
#
|
2666
2777
|
# @param plan_id [String] Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
|
2667
2778
|
# @param body [Requests::AddOnCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::AddOnCreate}
|
2668
|
-
# @param
|
2779
|
+
# @param params [Hash] Optional query string parameters:
|
2780
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2669
2781
|
#
|
2670
2782
|
# @return [Resources::AddOn] An add-on.
|
2671
2783
|
# @example
|
@@ -2696,11 +2808,12 @@ module Recurly
|
|
2696
2808
|
|
2697
2809
|
# Fetch a plan's add-on
|
2698
2810
|
#
|
2699
|
-
# {https://developers.recurly.com/api/
|
2811
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_plan_add_on get_plan_add_on api documenation}
|
2700
2812
|
#
|
2701
2813
|
# @param plan_id [String] Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
|
2702
2814
|
# @param add_on_id [String] Add-on ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
|
2703
|
-
# @param
|
2815
|
+
# @param params [Hash] Optional query string parameters:
|
2816
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2704
2817
|
#
|
2705
2818
|
# @return [Resources::AddOn] An add-on.
|
2706
2819
|
# @example
|
@@ -2722,12 +2835,13 @@ module Recurly
|
|
2722
2835
|
|
2723
2836
|
# Update an add-on
|
2724
2837
|
#
|
2725
|
-
# {https://developers.recurly.com/api/
|
2838
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_plan_add_on update_plan_add_on api documenation}
|
2726
2839
|
#
|
2727
2840
|
# @param plan_id [String] Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
|
2728
2841
|
# @param add_on_id [String] Add-on ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
|
2729
2842
|
# @param body [Requests::AddOnUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::AddOnUpdate}
|
2730
|
-
# @param
|
2843
|
+
# @param params [Hash] Optional query string parameters:
|
2844
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2731
2845
|
#
|
2732
2846
|
# @return [Resources::AddOn] An add-on.
|
2733
2847
|
# @example
|
@@ -2754,11 +2868,12 @@ module Recurly
|
|
2754
2868
|
|
2755
2869
|
# Remove an add-on
|
2756
2870
|
#
|
2757
|
-
# {https://developers.recurly.com/api/
|
2871
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_plan_add_on remove_plan_add_on api documenation}
|
2758
2872
|
#
|
2759
2873
|
# @param plan_id [String] Plan ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
|
2760
2874
|
# @param add_on_id [String] Add-on ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
|
2761
|
-
# @param
|
2875
|
+
# @param params [Hash] Optional query string parameters:
|
2876
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2762
2877
|
#
|
2763
2878
|
# @return [Resources::AddOn] Add-on deleted
|
2764
2879
|
# @example
|
@@ -2781,9 +2896,10 @@ module Recurly
|
|
2781
2896
|
|
2782
2897
|
# List a site's add-ons
|
2783
2898
|
#
|
2784
|
-
# {https://developers.recurly.com/api/
|
2899
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_add_ons list_add_ons api documenation}
|
2785
2900
|
#
|
2786
|
-
# @param
|
2901
|
+
# @param params [Hash] Optional query string parameters:
|
2902
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
2787
2903
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
2788
2904
|
#
|
2789
2905
|
# *Important notes:*
|
@@ -2795,25 +2911,28 @@ module Recurly
|
|
2795
2911
|
# * Records are returned in an arbitrary order. Since results are all
|
2796
2912
|
# returned at once you can sort the records yourself.
|
2797
2913
|
#
|
2798
|
-
#
|
2799
|
-
#
|
2800
|
-
#
|
2914
|
+
# :limit [Integer] Limit number of records 1-200.
|
2915
|
+
# :order [String] Sort order.
|
2916
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
2801
2917
|
# order. In descending order updated records will move behind the cursor and could
|
2802
2918
|
# prevent some records from being returned.
|
2803
2919
|
#
|
2804
|
-
#
|
2920
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
2805
2921
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2806
2922
|
#
|
2807
|
-
#
|
2923
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
2808
2924
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2809
2925
|
#
|
2810
|
-
#
|
2811
|
-
#
|
2926
|
+
# :state [String] Filter by state.
|
2927
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2812
2928
|
#
|
2813
2929
|
# @return [Pager<Resources::AddOn>] A list of add-ons.
|
2814
2930
|
# @example
|
2815
|
-
#
|
2931
|
+
# params = {
|
2816
2932
|
# limit: 200
|
2933
|
+
# }
|
2934
|
+
# add_ons = @client.list_add_ons(
|
2935
|
+
# params: params
|
2817
2936
|
# )
|
2818
2937
|
# add_ons.each do |add_on|
|
2819
2938
|
# puts "AddOn: #{add_on.code}"
|
@@ -2826,10 +2945,11 @@ module Recurly
|
|
2826
2945
|
|
2827
2946
|
# Fetch an add-on
|
2828
2947
|
#
|
2829
|
-
# {https://developers.recurly.com/api/
|
2948
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_add_on get_add_on api documenation}
|
2830
2949
|
#
|
2831
2950
|
# @param add_on_id [String] Add-on ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
|
2832
|
-
# @param
|
2951
|
+
# @param params [Hash] Optional query string parameters:
|
2952
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2833
2953
|
#
|
2834
2954
|
# @return [Resources::AddOn] An add-on.
|
2835
2955
|
# @example
|
@@ -2849,9 +2969,10 @@ module Recurly
|
|
2849
2969
|
|
2850
2970
|
# List a site's shipping methods
|
2851
2971
|
#
|
2852
|
-
# {https://developers.recurly.com/api/
|
2972
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_shipping_methods list_shipping_methods api documenation}
|
2853
2973
|
#
|
2854
|
-
# @param
|
2974
|
+
# @param params [Hash] Optional query string parameters:
|
2975
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
2855
2976
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
2856
2977
|
#
|
2857
2978
|
# *Important notes:*
|
@@ -2863,24 +2984,27 @@ module Recurly
|
|
2863
2984
|
# * Records are returned in an arbitrary order. Since results are all
|
2864
2985
|
# returned at once you can sort the records yourself.
|
2865
2986
|
#
|
2866
|
-
#
|
2867
|
-
#
|
2868
|
-
#
|
2987
|
+
# :limit [Integer] Limit number of records 1-200.
|
2988
|
+
# :order [String] Sort order.
|
2989
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
2869
2990
|
# order. In descending order updated records will move behind the cursor and could
|
2870
2991
|
# prevent some records from being returned.
|
2871
2992
|
#
|
2872
|
-
#
|
2993
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
2873
2994
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2874
2995
|
#
|
2875
|
-
#
|
2996
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
2876
2997
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2877
2998
|
#
|
2878
|
-
#
|
2999
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2879
3000
|
#
|
2880
3001
|
# @return [Pager<Resources::ShippingMethod>] A list of the site's shipping methods.
|
2881
3002
|
# @example
|
2882
|
-
#
|
3003
|
+
# params = {
|
2883
3004
|
# limit: 200
|
3005
|
+
# }
|
3006
|
+
# shipping_methods = @client.list_shipping_methods(
|
3007
|
+
# params: params
|
2884
3008
|
# )
|
2885
3009
|
# shipping_methods.each do |shipping_method|
|
2886
3010
|
# puts "Shipping Method: #{shipping_method.code}"
|
@@ -2893,10 +3017,11 @@ module Recurly
|
|
2893
3017
|
|
2894
3018
|
# Create a new shipping method
|
2895
3019
|
#
|
2896
|
-
# {https://developers.recurly.com/api/
|
3020
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_shipping_method create_shipping_method api documenation}
|
2897
3021
|
#
|
2898
3022
|
# @param body [Requests::ShippingMethodCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::ShippingMethodCreate}
|
2899
|
-
# @param
|
3023
|
+
# @param params [Hash] Optional query string parameters:
|
3024
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2900
3025
|
#
|
2901
3026
|
# @return [Resources::ShippingMethod] A new shipping method.
|
2902
3027
|
#
|
@@ -2907,25 +3032,27 @@ module Recurly
|
|
2907
3032
|
|
2908
3033
|
# Fetch a shipping method
|
2909
3034
|
#
|
2910
|
-
# {https://developers.recurly.com/api/
|
3035
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_shipping_method get_shipping_method api documenation}
|
2911
3036
|
#
|
2912
|
-
# @param
|
2913
|
-
# @param
|
3037
|
+
# @param shipping_method_id [String] Shipping Method ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-usps_2-day+.
|
3038
|
+
# @param params [Hash] Optional query string parameters:
|
3039
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2914
3040
|
#
|
2915
3041
|
# @return [Resources::ShippingMethod] A shipping method.
|
2916
3042
|
#
|
2917
|
-
def get_shipping_method(
|
2918
|
-
path = interpolate_path("/shipping_methods/{
|
3043
|
+
def get_shipping_method(shipping_method_id:, **options)
|
3044
|
+
path = interpolate_path("/shipping_methods/{shipping_method_id}", shipping_method_id: shipping_method_id)
|
2919
3045
|
get(path, **options)
|
2920
3046
|
end
|
2921
3047
|
|
2922
3048
|
# Update an active Shipping Method
|
2923
3049
|
#
|
2924
|
-
# {https://developers.recurly.com/api/
|
3050
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_shipping_method update_shipping_method api documenation}
|
2925
3051
|
#
|
2926
3052
|
# @param shipping_method_id [String] Shipping Method ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-usps_2-day+.
|
2927
3053
|
# @param body [Requests::ShippingMethodUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::ShippingMethodUpdate}
|
2928
|
-
# @param
|
3054
|
+
# @param params [Hash] Optional query string parameters:
|
3055
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2929
3056
|
#
|
2930
3057
|
# @return [Resources::ShippingMethod] The updated shipping method.
|
2931
3058
|
#
|
@@ -2936,10 +3063,11 @@ module Recurly
|
|
2936
3063
|
|
2937
3064
|
# Deactivate a shipping method
|
2938
3065
|
#
|
2939
|
-
# {https://developers.recurly.com/api/
|
3066
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/deactivate_shipping_method deactivate_shipping_method api documenation}
|
2940
3067
|
#
|
2941
3068
|
# @param shipping_method_id [String] Shipping Method ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-usps_2-day+.
|
2942
|
-
# @param
|
3069
|
+
# @param params [Hash] Optional query string parameters:
|
3070
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2943
3071
|
#
|
2944
3072
|
# @return [Resources::ShippingMethod] A shipping method.
|
2945
3073
|
#
|
@@ -2950,9 +3078,10 @@ module Recurly
|
|
2950
3078
|
|
2951
3079
|
# List a site's subscriptions
|
2952
3080
|
#
|
2953
|
-
# {https://developers.recurly.com/api/
|
3081
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_subscriptions list_subscriptions api documenation}
|
2954
3082
|
#
|
2955
|
-
# @param
|
3083
|
+
# @param params [Hash] Optional query string parameters:
|
3084
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
2956
3085
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
2957
3086
|
#
|
2958
3087
|
# *Important notes:*
|
@@ -2964,29 +3093,32 @@ module Recurly
|
|
2964
3093
|
# * Records are returned in an arbitrary order. Since results are all
|
2965
3094
|
# returned at once you can sort the records yourself.
|
2966
3095
|
#
|
2967
|
-
#
|
2968
|
-
#
|
2969
|
-
#
|
3096
|
+
# :limit [Integer] Limit number of records 1-200.
|
3097
|
+
# :order [String] Sort order.
|
3098
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
2970
3099
|
# order. In descending order updated records will move behind the cursor and could
|
2971
3100
|
# prevent some records from being returned.
|
2972
3101
|
#
|
2973
|
-
#
|
3102
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
2974
3103
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2975
3104
|
#
|
2976
|
-
#
|
3105
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
2977
3106
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2978
3107
|
#
|
2979
|
-
#
|
3108
|
+
# :state [String] Filter by state.
|
2980
3109
|
#
|
2981
3110
|
# - When +state=active+, +state=canceled+, +state=expired+, or +state=future+, subscriptions with states that match the query and only those subscriptions will be returned.
|
2982
3111
|
# - When +state=in_trial+, only subscriptions that have a trial_started_at date earlier than now and a trial_ends_at date later than now will be returned.
|
2983
3112
|
# - When +state=live+, only subscriptions that are in an active, canceled, or future state or are in trial will be returned.
|
2984
3113
|
#
|
2985
|
-
#
|
3114
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
2986
3115
|
#
|
2987
3116
|
# @return [Pager<Resources::Subscription>] A list of the site's subscriptions.
|
2988
3117
|
# @example
|
2989
|
-
#
|
3118
|
+
# params = {
|
3119
|
+
# limit: 200
|
3120
|
+
# }
|
3121
|
+
# subscriptions = @client.list_subscriptions(params: params)
|
2990
3122
|
# subscriptions.each do |subscription|
|
2991
3123
|
# puts "Subscription: #{subscription.uuid}"
|
2992
3124
|
# end
|
@@ -2998,10 +3130,11 @@ module Recurly
|
|
2998
3130
|
|
2999
3131
|
# Create a new subscription
|
3000
3132
|
#
|
3001
|
-
# {https://developers.recurly.com/api/
|
3133
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_subscription create_subscription api documenation}
|
3002
3134
|
#
|
3003
3135
|
# @param body [Requests::SubscriptionCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::SubscriptionCreate}
|
3004
|
-
# @param
|
3136
|
+
# @param params [Hash] Optional query string parameters:
|
3137
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3005
3138
|
#
|
3006
3139
|
# @return [Resources::Subscription] A subscription.
|
3007
3140
|
# @example
|
@@ -3009,7 +3142,8 @@ module Recurly
|
|
3009
3142
|
# subscription_create = {
|
3010
3143
|
# plan_code: plan_code,
|
3011
3144
|
# currency: "USD",
|
3012
|
-
# # This can be an existing account or
|
3145
|
+
# # This can be an existing account or
|
3146
|
+
# # a new acocunt
|
3013
3147
|
# account: {
|
3014
3148
|
# code: account_code,
|
3015
3149
|
# }
|
@@ -3031,10 +3165,11 @@ module Recurly
|
|
3031
3165
|
|
3032
3166
|
# Fetch a subscription
|
3033
3167
|
#
|
3034
|
-
# {https://developers.recurly.com/api/
|
3168
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_subscription get_subscription api documenation}
|
3035
3169
|
#
|
3036
3170
|
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3037
|
-
# @param
|
3171
|
+
# @param params [Hash] Optional query string parameters:
|
3172
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3038
3173
|
#
|
3039
3174
|
# @return [Resources::Subscription] A subscription.
|
3040
3175
|
# @example
|
@@ -3054,13 +3189,14 @@ module Recurly
|
|
3054
3189
|
get(path, **options)
|
3055
3190
|
end
|
3056
3191
|
|
3057
|
-
#
|
3192
|
+
# Update a subscription
|
3058
3193
|
#
|
3059
|
-
# {https://developers.recurly.com/api/
|
3194
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_subscription update_subscription api documenation}
|
3060
3195
|
#
|
3061
3196
|
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3062
3197
|
# @param body [Requests::SubscriptionUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::SubscriptionUpdate}
|
3063
|
-
# @param
|
3198
|
+
# @param params [Hash] Optional query string parameters:
|
3199
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3064
3200
|
#
|
3065
3201
|
# @return [Resources::Subscription] A subscription.
|
3066
3202
|
# @example
|
@@ -3069,7 +3205,7 @@ module Recurly
|
|
3069
3205
|
# customer_notes: "New Notes",
|
3070
3206
|
# terms_and_conditions: "New ToC"
|
3071
3207
|
# }
|
3072
|
-
# subscription = @client.
|
3208
|
+
# subscription = @client.update_subscription(
|
3073
3209
|
# subscription_id: subscription_id,
|
3074
3210
|
# body: subscription_update
|
3075
3211
|
# )
|
@@ -3080,17 +3216,18 @@ module Recurly
|
|
3080
3216
|
# puts "ValidationError: #{e.recurly_error.params}"
|
3081
3217
|
# end
|
3082
3218
|
#
|
3083
|
-
def
|
3219
|
+
def update_subscription(subscription_id:, body:, **options)
|
3084
3220
|
path = interpolate_path("/subscriptions/{subscription_id}", subscription_id: subscription_id)
|
3085
3221
|
put(path, body, Requests::SubscriptionUpdate, **options)
|
3086
3222
|
end
|
3087
3223
|
|
3088
3224
|
# Terminate a subscription
|
3089
3225
|
#
|
3090
|
-
# {https://developers.recurly.com/api/
|
3226
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/terminate_subscription terminate_subscription api documenation}
|
3091
3227
|
#
|
3092
3228
|
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3093
|
-
# @param
|
3229
|
+
# @param params [Hash] Optional query string parameters:
|
3230
|
+
# :refund [String] The type of refund to perform:
|
3094
3231
|
#
|
3095
3232
|
# * +full+ - Performs a full refund of the last invoice for the current subscription term.
|
3096
3233
|
# * +partial+ - Prorates a refund based on the amount of time remaining in the current bill cycle.
|
@@ -3100,8 +3237,8 @@ module Recurly
|
|
3100
3237
|
#
|
3101
3238
|
# You may also terminate a subscription with no refund and then manually refund specific invoices.
|
3102
3239
|
#
|
3103
|
-
#
|
3104
|
-
#
|
3240
|
+
# :charge [Boolean] Applicable only if the subscription has usage based add-ons and unbilled usage logged for the current billing cycle. If true, current billing cycle unbilled usage is billed on the final invoice. If false, Recurly will create a negative usage record for current billing cycle usage that will zero out the final invoice line items.
|
3241
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3105
3242
|
#
|
3106
3243
|
# @return [Resources::Subscription] An expired subscription.
|
3107
3244
|
# @example
|
@@ -3123,11 +3260,12 @@ module Recurly
|
|
3123
3260
|
|
3124
3261
|
# Cancel a subscription
|
3125
3262
|
#
|
3126
|
-
# {https://developers.recurly.com/api/
|
3263
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/cancel_subscription cancel_subscription api documenation}
|
3127
3264
|
#
|
3128
3265
|
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3129
|
-
# @param
|
3130
|
-
#
|
3266
|
+
# @param params [Hash] Optional query string parameters:
|
3267
|
+
# :body [Requests::SubscriptionCancel] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::SubscriptionCancel}
|
3268
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3131
3269
|
#
|
3132
3270
|
# @return [Resources::Subscription] A canceled or failed subscription.
|
3133
3271
|
# @example
|
@@ -3149,10 +3287,11 @@ module Recurly
|
|
3149
3287
|
|
3150
3288
|
# Reactivate a canceled subscription
|
3151
3289
|
#
|
3152
|
-
# {https://developers.recurly.com/api/
|
3290
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/reactivate_subscription reactivate_subscription api documenation}
|
3153
3291
|
#
|
3154
3292
|
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3155
|
-
# @param
|
3293
|
+
# @param params [Hash] Optional query string parameters:
|
3294
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3156
3295
|
#
|
3157
3296
|
# @return [Resources::Subscription] An active subscription.
|
3158
3297
|
# @example
|
@@ -3174,11 +3313,12 @@ module Recurly
|
|
3174
3313
|
|
3175
3314
|
# Pause subscription
|
3176
3315
|
#
|
3177
|
-
# {https://developers.recurly.com/api/
|
3316
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/pause_subscription pause_subscription api documenation}
|
3178
3317
|
#
|
3179
3318
|
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3180
3319
|
# @param body [Requests::SubscriptionPause] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::SubscriptionPause}
|
3181
|
-
# @param
|
3320
|
+
# @param params [Hash] Optional query string parameters:
|
3321
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3182
3322
|
#
|
3183
3323
|
# @return [Resources::Subscription] A subscription.
|
3184
3324
|
# @example
|
@@ -3204,10 +3344,11 @@ module Recurly
|
|
3204
3344
|
|
3205
3345
|
# Resume subscription
|
3206
3346
|
#
|
3207
|
-
# {https://developers.recurly.com/api/
|
3347
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/resume_subscription resume_subscription api documenation}
|
3208
3348
|
#
|
3209
3349
|
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3210
|
-
# @param
|
3350
|
+
# @param params [Hash] Optional query string parameters:
|
3351
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3211
3352
|
#
|
3212
3353
|
# @return [Resources::Subscription] A subscription.
|
3213
3354
|
# @example
|
@@ -3229,10 +3370,11 @@ module Recurly
|
|
3229
3370
|
|
3230
3371
|
# Convert trial subscription
|
3231
3372
|
#
|
3232
|
-
# {https://developers.recurly.com/api/
|
3373
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/convert_trial convert_trial api documenation}
|
3233
3374
|
#
|
3234
3375
|
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3235
|
-
# @param
|
3376
|
+
# @param params [Hash] Optional query string parameters:
|
3377
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3236
3378
|
#
|
3237
3379
|
# @return [Resources::Subscription] A subscription.
|
3238
3380
|
#
|
@@ -3241,25 +3383,13 @@ module Recurly
|
|
3241
3383
|
put(path, **options)
|
3242
3384
|
end
|
3243
3385
|
|
3244
|
-
# Fetch a preview of a subscription's renewal invoice(s)
|
3245
|
-
#
|
3246
|
-
# {https://developers.recurly.com/api/v2019-10-10#operation/get_preview_renewal get_preview_renewal api documentation}
|
3247
|
-
#
|
3248
|
-
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3249
|
-
#
|
3250
|
-
# @return [Resources::InvoiceCollection] A preview of the subscription's renewal invoice(s).
|
3251
|
-
#
|
3252
|
-
def get_preview_renewal(subscription_id:)
|
3253
|
-
path = interpolate_path("/subscriptions/{subscription_id}/preview_renewal", subscription_id: subscription_id)
|
3254
|
-
get(path)
|
3255
|
-
end
|
3256
|
-
|
3257
3386
|
# Fetch a subscription's pending change
|
3258
3387
|
#
|
3259
|
-
# {https://developers.recurly.com/api/
|
3388
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_subscription_change get_subscription_change api documenation}
|
3260
3389
|
#
|
3261
3390
|
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3262
|
-
# @param
|
3391
|
+
# @param params [Hash] Optional query string parameters:
|
3392
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3263
3393
|
#
|
3264
3394
|
# @return [Resources::SubscriptionChange] A subscription's pending change.
|
3265
3395
|
# @example
|
@@ -3281,11 +3411,12 @@ module Recurly
|
|
3281
3411
|
|
3282
3412
|
# Create a new subscription change
|
3283
3413
|
#
|
3284
|
-
# {https://developers.recurly.com/api/
|
3414
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_subscription_change create_subscription_change api documenation}
|
3285
3415
|
#
|
3286
3416
|
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3287
3417
|
# @param body [Requests::SubscriptionChangeCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::SubscriptionChangeCreate}
|
3288
|
-
# @param
|
3418
|
+
# @param params [Hash] Optional query string parameters:
|
3419
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3289
3420
|
#
|
3290
3421
|
# @return [Resources::SubscriptionChange] A subscription change.
|
3291
3422
|
# @example
|
@@ -3312,10 +3443,11 @@ module Recurly
|
|
3312
3443
|
|
3313
3444
|
# Delete the pending subscription change
|
3314
3445
|
#
|
3315
|
-
# {https://developers.recurly.com/api/
|
3446
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_subscription_change remove_subscription_change api documenation}
|
3316
3447
|
#
|
3317
3448
|
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3318
|
-
# @param
|
3449
|
+
# @param params [Hash] Optional query string parameters:
|
3450
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3319
3451
|
#
|
3320
3452
|
# @return [Resources::Empty] Subscription change was deleted.
|
3321
3453
|
# @example
|
@@ -3337,13 +3469,14 @@ module Recurly
|
|
3337
3469
|
|
3338
3470
|
# Preview a new subscription change
|
3339
3471
|
#
|
3340
|
-
# {https://developers.recurly.com/api/
|
3472
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/preview_subscription_change preview_subscription_change api documenation}
|
3341
3473
|
#
|
3342
3474
|
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3343
3475
|
# @param body [Requests::SubscriptionChangeCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::SubscriptionChangeCreate}
|
3344
|
-
# @param
|
3476
|
+
# @param params [Hash] Optional query string parameters:
|
3477
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3345
3478
|
#
|
3346
|
-
# @return [Resources::
|
3479
|
+
# @return [Resources::SubscriptionChange] A subscription change.
|
3347
3480
|
#
|
3348
3481
|
def preview_subscription_change(subscription_id:, body:, **options)
|
3349
3482
|
path = interpolate_path("/subscriptions/{subscription_id}/change/preview", subscription_id: subscription_id)
|
@@ -3352,10 +3485,11 @@ module Recurly
|
|
3352
3485
|
|
3353
3486
|
# List a subscription's invoices
|
3354
3487
|
#
|
3355
|
-
# {https://developers.recurly.com/api/
|
3488
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_subscription_invoices list_subscription_invoices api documenation}
|
3356
3489
|
#
|
3357
3490
|
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3358
|
-
# @param
|
3491
|
+
# @param params [Hash] Optional query string parameters:
|
3492
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
3359
3493
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
3360
3494
|
#
|
3361
3495
|
# *Important notes:*
|
@@ -3367,31 +3501,34 @@ module Recurly
|
|
3367
3501
|
# * Records are returned in an arbitrary order. Since results are all
|
3368
3502
|
# returned at once you can sort the records yourself.
|
3369
3503
|
#
|
3370
|
-
#
|
3371
|
-
#
|
3372
|
-
#
|
3504
|
+
# :limit [Integer] Limit number of records 1-200.
|
3505
|
+
# :order [String] Sort order.
|
3506
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
3373
3507
|
# order. In descending order updated records will move behind the cursor and could
|
3374
3508
|
# prevent some records from being returned.
|
3375
3509
|
#
|
3376
|
-
#
|
3510
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
3377
3511
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3378
3512
|
#
|
3379
|
-
#
|
3513
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
3380
3514
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3381
3515
|
#
|
3382
|
-
#
|
3516
|
+
# :type [String] Filter by type when:
|
3383
3517
|
# - +type=charge+, only charge invoices will be returned.
|
3384
3518
|
# - +type=credit+, only credit invoices will be returned.
|
3385
3519
|
# - +type=non-legacy+, only charge and credit invoices will be returned.
|
3386
3520
|
# - +type=legacy+, only legacy invoices will be returned.
|
3387
3521
|
#
|
3388
|
-
#
|
3522
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3389
3523
|
#
|
3390
3524
|
# @return [Pager<Resources::Invoice>] A list of the subscription's invoices.
|
3391
3525
|
# @example
|
3526
|
+
# params = {
|
3527
|
+
# limit: 200
|
3528
|
+
# }
|
3392
3529
|
# invoices = @client.list_subscription_invoices(
|
3393
3530
|
# subscription_id: subscription_id,
|
3394
|
-
#
|
3531
|
+
# params: params
|
3395
3532
|
# )
|
3396
3533
|
# invoices.each do |invoice|
|
3397
3534
|
# puts "Invoice: #{invoice.number}"
|
@@ -3404,10 +3541,11 @@ module Recurly
|
|
3404
3541
|
|
3405
3542
|
# List a subscription's line items
|
3406
3543
|
#
|
3407
|
-
# {https://developers.recurly.com/api/
|
3544
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_subscription_line_items list_subscription_line_items api documenation}
|
3408
3545
|
#
|
3409
3546
|
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3410
|
-
# @param
|
3547
|
+
# @param params [Hash] Optional query string parameters:
|
3548
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
3411
3549
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
3412
3550
|
#
|
3413
3551
|
# *Important notes:*
|
@@ -3419,28 +3557,31 @@ module Recurly
|
|
3419
3557
|
# * Records are returned in an arbitrary order. Since results are all
|
3420
3558
|
# returned at once you can sort the records yourself.
|
3421
3559
|
#
|
3422
|
-
#
|
3423
|
-
#
|
3424
|
-
#
|
3560
|
+
# :limit [Integer] Limit number of records 1-200.
|
3561
|
+
# :order [String] Sort order.
|
3562
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
3425
3563
|
# order. In descending order updated records will move behind the cursor and could
|
3426
3564
|
# prevent some records from being returned.
|
3427
3565
|
#
|
3428
|
-
#
|
3566
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
3429
3567
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3430
3568
|
#
|
3431
|
-
#
|
3569
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
3432
3570
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3433
3571
|
#
|
3434
|
-
#
|
3435
|
-
#
|
3436
|
-
#
|
3437
|
-
#
|
3572
|
+
# :original [String] Filter by original field.
|
3573
|
+
# :state [String] Filter by state field.
|
3574
|
+
# :type [String] Filter by type field.
|
3575
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3438
3576
|
#
|
3439
3577
|
# @return [Pager<Resources::LineItem>] A list of the subscription's line items.
|
3440
3578
|
# @example
|
3579
|
+
# params = {
|
3580
|
+
# limit: 200
|
3581
|
+
# }
|
3441
3582
|
# line_items = @client.list_subscription_line_items(
|
3442
3583
|
# subscription_id: subscription_id,
|
3443
|
-
#
|
3584
|
+
# params: params
|
3444
3585
|
# )
|
3445
3586
|
# line_items.each do |line_item|
|
3446
3587
|
# puts "LineItem: #{line_item.id}"
|
@@ -3451,12 +3592,13 @@ module Recurly
|
|
3451
3592
|
pager(path, **options)
|
3452
3593
|
end
|
3453
3594
|
|
3454
|
-
#
|
3595
|
+
# Show the coupon redemptions for a subscription
|
3455
3596
|
#
|
3456
|
-
# {https://developers.recurly.com/api/
|
3597
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_subscription_coupon_redemptions list_subscription_coupon_redemptions api documenation}
|
3457
3598
|
#
|
3458
3599
|
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3459
|
-
# @param
|
3600
|
+
# @param params [Hash] Optional query string parameters:
|
3601
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
3460
3602
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
3461
3603
|
#
|
3462
3604
|
# *Important notes:*
|
@@ -3468,23 +3610,26 @@ module Recurly
|
|
3468
3610
|
# * Records are returned in an arbitrary order. Since results are all
|
3469
3611
|
# returned at once you can sort the records yourself.
|
3470
3612
|
#
|
3471
|
-
#
|
3613
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
3472
3614
|
# order. In descending order updated records will move behind the cursor and could
|
3473
3615
|
# prevent some records from being returned.
|
3474
3616
|
#
|
3475
|
-
#
|
3617
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
3476
3618
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3477
3619
|
#
|
3478
|
-
#
|
3620
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
3479
3621
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3480
3622
|
#
|
3481
|
-
#
|
3623
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3482
3624
|
#
|
3483
3625
|
# @return [Pager<Resources::CouponRedemption>] A list of the the coupon redemptions on a subscription.
|
3484
3626
|
# @example
|
3627
|
+
# params = {
|
3628
|
+
# limit: 200
|
3629
|
+
# }
|
3485
3630
|
# coupon_redemptions = @client.list_subscription_coupon_redemptions(
|
3486
3631
|
# subscription_id: subscription_id,
|
3487
|
-
#
|
3632
|
+
# params: params
|
3488
3633
|
# )
|
3489
3634
|
# coupon_redemptions.each do |redemption|
|
3490
3635
|
# puts "CouponRedemption: #{redemption.id}"
|
@@ -3497,11 +3642,12 @@ module Recurly
|
|
3497
3642
|
|
3498
3643
|
# List a subscription add-on's usage records
|
3499
3644
|
#
|
3500
|
-
# {https://developers.recurly.com/api/
|
3645
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_usage list_usage api documenation}
|
3501
3646
|
#
|
3502
3647
|
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3503
3648
|
# @param add_on_id [String] Add-on ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
|
3504
|
-
# @param
|
3649
|
+
# @param params [Hash] Optional query string parameters:
|
3650
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
3505
3651
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
3506
3652
|
#
|
3507
3653
|
# *Important notes:*
|
@@ -3513,20 +3659,20 @@ module Recurly
|
|
3513
3659
|
# * Records are returned in an arbitrary order. Since results are all
|
3514
3660
|
# returned at once you can sort the records yourself.
|
3515
3661
|
#
|
3516
|
-
#
|
3517
|
-
#
|
3518
|
-
#
|
3662
|
+
# :limit [Integer] Limit number of records 1-200.
|
3663
|
+
# :order [String] Sort order.
|
3664
|
+
# :sort [String] Sort field. You *really* only want to sort by +usage_timestamp+ in ascending
|
3519
3665
|
# order. In descending order updated records will move behind the cursor and could
|
3520
3666
|
# prevent some records from being returned.
|
3521
3667
|
#
|
3522
|
-
#
|
3668
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=usage_timestamp+ or +sort=recorded_timestamp+.
|
3523
3669
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3524
3670
|
#
|
3525
|
-
#
|
3671
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=usage_timestamp+ or +sort=recorded_timestamp+.
|
3526
3672
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3527
3673
|
#
|
3528
|
-
#
|
3529
|
-
#
|
3674
|
+
# :billing_status [String] Filter by usage record's billing status
|
3675
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3530
3676
|
#
|
3531
3677
|
# @return [Pager<Resources::Usage>] A list of the subscription add-on's usage records.
|
3532
3678
|
#
|
@@ -3537,12 +3683,13 @@ module Recurly
|
|
3537
3683
|
|
3538
3684
|
# Log a usage record on this subscription add-on
|
3539
3685
|
#
|
3540
|
-
# {https://developers.recurly.com/api/
|
3686
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_usage create_usage api documenation}
|
3541
3687
|
#
|
3542
3688
|
# @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3543
3689
|
# @param add_on_id [String] Add-on ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-gold+.
|
3544
3690
|
# @param body [Requests::UsageCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::UsageCreate}
|
3545
|
-
# @param
|
3691
|
+
# @param params [Hash] Optional query string parameters:
|
3692
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3546
3693
|
#
|
3547
3694
|
# @return [Resources::Usage] The created usage record.
|
3548
3695
|
#
|
@@ -3553,10 +3700,11 @@ module Recurly
|
|
3553
3700
|
|
3554
3701
|
# Get a usage record
|
3555
3702
|
#
|
3556
|
-
# {https://developers.recurly.com/api/
|
3703
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_usage get_usage api documenation}
|
3557
3704
|
#
|
3558
3705
|
# @param usage_id [String] Usage Record ID.
|
3559
|
-
# @param
|
3706
|
+
# @param params [Hash] Optional query string parameters:
|
3707
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3560
3708
|
#
|
3561
3709
|
# @return [Resources::Usage] The usage record.
|
3562
3710
|
#
|
@@ -3567,11 +3715,12 @@ module Recurly
|
|
3567
3715
|
|
3568
3716
|
# Update a usage record
|
3569
3717
|
#
|
3570
|
-
# {https://developers.recurly.com/api/
|
3718
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_usage update_usage api documenation}
|
3571
3719
|
#
|
3572
3720
|
# @param usage_id [String] Usage Record ID.
|
3573
3721
|
# @param body [Requests::UsageCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::UsageCreate}
|
3574
|
-
# @param
|
3722
|
+
# @param params [Hash] Optional query string parameters:
|
3723
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3575
3724
|
#
|
3576
3725
|
# @return [Resources::Usage] The updated usage record.
|
3577
3726
|
#
|
@@ -3582,10 +3731,11 @@ module Recurly
|
|
3582
3731
|
|
3583
3732
|
# Delete a usage record.
|
3584
3733
|
#
|
3585
|
-
# {https://developers.recurly.com/api/
|
3734
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_usage remove_usage api documenation}
|
3586
3735
|
#
|
3587
3736
|
# @param usage_id [String] Usage Record ID.
|
3588
|
-
# @param
|
3737
|
+
# @param params [Hash] Optional query string parameters:
|
3738
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3589
3739
|
#
|
3590
3740
|
# @return [Resources::Empty] Usage was successfully deleted.
|
3591
3741
|
#
|
@@ -3596,9 +3746,10 @@ module Recurly
|
|
3596
3746
|
|
3597
3747
|
# List a site's transactions
|
3598
3748
|
#
|
3599
|
-
# {https://developers.recurly.com/api/
|
3749
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_transactions list_transactions api documenation}
|
3600
3750
|
#
|
3601
|
-
# @param
|
3751
|
+
# @param params [Hash] Optional query string parameters:
|
3752
|
+
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
|
3602
3753
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
3603
3754
|
#
|
3604
3755
|
# *Important notes:*
|
@@ -3610,25 +3761,28 @@ module Recurly
|
|
3610
3761
|
# * Records are returned in an arbitrary order. Since results are all
|
3611
3762
|
# returned at once you can sort the records yourself.
|
3612
3763
|
#
|
3613
|
-
#
|
3614
|
-
#
|
3615
|
-
#
|
3764
|
+
# :limit [Integer] Limit number of records 1-200.
|
3765
|
+
# :order [String] Sort order.
|
3766
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
3616
3767
|
# order. In descending order updated records will move behind the cursor and could
|
3617
3768
|
# prevent some records from being returned.
|
3618
3769
|
#
|
3619
|
-
#
|
3770
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
3620
3771
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3621
3772
|
#
|
3622
|
-
#
|
3773
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
3623
3774
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3624
3775
|
#
|
3625
|
-
#
|
3626
|
-
#
|
3627
|
-
#
|
3776
|
+
# :type [String] Filter by type field. The value +payment+ will return both +purchase+ and +capture+ transactions.
|
3777
|
+
# :success [String] Filter by success field.
|
3778
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3628
3779
|
#
|
3629
3780
|
# @return [Pager<Resources::Transaction>] A list of the site's transactions.
|
3630
3781
|
# @example
|
3631
|
-
#
|
3782
|
+
# params = {
|
3783
|
+
# limit: 200
|
3784
|
+
# }
|
3785
|
+
# transactions = @client.list_transactions(params: params)
|
3632
3786
|
# transactions.each do |transaction|
|
3633
3787
|
# puts "Transaction: #{transaction.uuid}"
|
3634
3788
|
# end
|
@@ -3640,10 +3794,11 @@ module Recurly
|
|
3640
3794
|
|
3641
3795
|
# Fetch a transaction
|
3642
3796
|
#
|
3643
|
-
# {https://developers.recurly.com/api/
|
3797
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_transaction get_transaction api documenation}
|
3644
3798
|
#
|
3645
3799
|
# @param transaction_id [String] Transaction ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
|
3646
|
-
# @param
|
3800
|
+
# @param params [Hash] Optional query string parameters:
|
3801
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3647
3802
|
#
|
3648
3803
|
# @return [Resources::Transaction] A transaction.
|
3649
3804
|
# @example
|
@@ -3663,10 +3818,11 @@ module Recurly
|
|
3663
3818
|
|
3664
3819
|
# Fetch a unique coupon code
|
3665
3820
|
#
|
3666
|
-
# {https://developers.recurly.com/api/
|
3821
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_unique_coupon_code get_unique_coupon_code api documenation}
|
3667
3822
|
#
|
3668
3823
|
# @param unique_coupon_code_id [String] Unique Coupon Code ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-abc-8dh2-def+.
|
3669
|
-
# @param
|
3824
|
+
# @param params [Hash] Optional query string parameters:
|
3825
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3670
3826
|
#
|
3671
3827
|
# @return [Resources::UniqueCouponCode] A unique coupon code.
|
3672
3828
|
#
|
@@ -3677,10 +3833,11 @@ module Recurly
|
|
3677
3833
|
|
3678
3834
|
# Deactivate a unique coupon code
|
3679
3835
|
#
|
3680
|
-
# {https://developers.recurly.com/api/
|
3836
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/deactivate_unique_coupon_code deactivate_unique_coupon_code api documenation}
|
3681
3837
|
#
|
3682
3838
|
# @param unique_coupon_code_id [String] Unique Coupon Code ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-abc-8dh2-def+.
|
3683
|
-
# @param
|
3839
|
+
# @param params [Hash] Optional query string parameters:
|
3840
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3684
3841
|
#
|
3685
3842
|
# @return [Resources::UniqueCouponCode] A unique coupon code.
|
3686
3843
|
#
|
@@ -3691,10 +3848,11 @@ module Recurly
|
|
3691
3848
|
|
3692
3849
|
# Restore a unique coupon code
|
3693
3850
|
#
|
3694
|
-
# {https://developers.recurly.com/api/
|
3851
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/reactivate_unique_coupon_code reactivate_unique_coupon_code api documenation}
|
3695
3852
|
#
|
3696
3853
|
# @param unique_coupon_code_id [String] Unique Coupon Code ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-abc-8dh2-def+.
|
3697
|
-
# @param
|
3854
|
+
# @param params [Hash] Optional query string parameters:
|
3855
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3698
3856
|
#
|
3699
3857
|
# @return [Resources::UniqueCouponCode] A unique coupon code.
|
3700
3858
|
#
|
@@ -3705,10 +3863,11 @@ module Recurly
|
|
3705
3863
|
|
3706
3864
|
# Create a new purchase
|
3707
3865
|
#
|
3708
|
-
# {https://developers.recurly.com/api/
|
3866
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_purchase create_purchase api documenation}
|
3709
3867
|
#
|
3710
3868
|
# @param body [Requests::PurchaseCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::PurchaseCreate}
|
3711
|
-
# @param
|
3869
|
+
# @param params [Hash] Optional query string parameters:
|
3870
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3712
3871
|
#
|
3713
3872
|
# @return [Resources::InvoiceCollection] Returns the new invoices
|
3714
3873
|
# @example
|
@@ -3745,10 +3904,11 @@ module Recurly
|
|
3745
3904
|
|
3746
3905
|
# Preview a new purchase
|
3747
3906
|
#
|
3748
|
-
# {https://developers.recurly.com/api/
|
3907
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/preview_purchase preview_purchase api documenation}
|
3749
3908
|
#
|
3750
3909
|
# @param body [Requests::PurchaseCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::PurchaseCreate}
|
3751
|
-
# @param
|
3910
|
+
# @param params [Hash] Optional query string parameters:
|
3911
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3752
3912
|
#
|
3753
3913
|
# @return [Resources::InvoiceCollection] Returns preview of the new invoices
|
3754
3914
|
# @example
|
@@ -3785,9 +3945,10 @@ module Recurly
|
|
3785
3945
|
|
3786
3946
|
# List the dates that have an available export to download.
|
3787
3947
|
#
|
3788
|
-
# {https://developers.recurly.com/api/
|
3948
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_export_dates get_export_dates api documenation}
|
3789
3949
|
#
|
3790
|
-
# @param
|
3950
|
+
# @param params [Hash] Optional query string parameters:
|
3951
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3791
3952
|
#
|
3792
3953
|
# @return [Resources::ExportDates] Returns a list of dates.
|
3793
3954
|
# @example
|
@@ -3809,10 +3970,11 @@ module Recurly
|
|
3809
3970
|
|
3810
3971
|
# List of the export files that are available to download.
|
3811
3972
|
#
|
3812
|
-
# {https://developers.recurly.com/api/
|
3973
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_export_files get_export_files api documenation}
|
3813
3974
|
#
|
3814
3975
|
# @param export_date [String] Date for which to get a list of available automated export files. Date must be in YYYY-MM-DD format.
|
3815
|
-
# @param
|
3976
|
+
# @param params [Hash] Optional query string parameters:
|
3977
|
+
# :site_id [String] Site ID or subdomain. For ID no prefix is used e.g. +e28zov4fw0v2+. For subdomain use prefix +subdomain-+, e.g. +subdomain-recurly+.
|
3816
3978
|
#
|
3817
3979
|
# @return [Resources::ExportFiles] Returns a list of export files to download.
|
3818
3980
|
# @example
|
@@ -3831,48 +3993,5 @@ module Recurly
|
|
3831
3993
|
path = interpolate_path("/export_dates/{export_date}/export_files", export_date: export_date)
|
3832
3994
|
get(path, **options)
|
3833
3995
|
end
|
3834
|
-
|
3835
|
-
# List the dunning campaigns for a site
|
3836
|
-
#
|
3837
|
-
# {https://developers.recurly.com/api/v2019-10-10#operation/list_dunning_campaigns list_dunning_campaigns api documentation}
|
3838
|
-
#
|
3839
|
-
# @param sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
3840
|
-
# order. In descending order updated records will move behind the cursor and could
|
3841
|
-
# prevent some records from being returned.
|
3842
|
-
#
|
3843
|
-
#
|
3844
|
-
# @return [Pager<Resources::DunningCampaign>] A list of the the dunning_campaigns on an account.
|
3845
|
-
#
|
3846
|
-
def list_dunning_campaigns(**options)
|
3847
|
-
path = "/dunning_campaigns"
|
3848
|
-
pager(path, **options)
|
3849
|
-
end
|
3850
|
-
|
3851
|
-
# Fetch a dunning campaign
|
3852
|
-
#
|
3853
|
-
# {https://developers.recurly.com/api/v2019-10-10#operation/get_dunning_campaign get_dunning_campaign api documentation}
|
3854
|
-
#
|
3855
|
-
# @param dunning_campaign_id [String] Dunning Campaign ID, e.g. +e28zov4fw0v2+.
|
3856
|
-
#
|
3857
|
-
# @return [Resources::DunningCampaign] Settings for a dunning campaign.
|
3858
|
-
#
|
3859
|
-
def get_dunning_campaign(dunning_campaign_id:)
|
3860
|
-
path = interpolate_path("/dunning_campaigns/{dunning_campaign_id}", dunning_campaign_id: dunning_campaign_id)
|
3861
|
-
get(path)
|
3862
|
-
end
|
3863
|
-
|
3864
|
-
# Assign a dunning campaign to multiple plans
|
3865
|
-
#
|
3866
|
-
# {https://developers.recurly.com/api/v2019-10-10#operation/put_dunning_campaign_bulk_update put_dunning_campaign_bulk_update api documentation}
|
3867
|
-
#
|
3868
|
-
# @param dunning_campaign_id [String] Dunning Campaign ID, e.g. +e28zov4fw0v2+.
|
3869
|
-
# @param body [Requests::DunningCampaignsBulkUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::DunningCampaignsBulkUpdate}
|
3870
|
-
#
|
3871
|
-
# @return [Resources::DunningCampaignsBulkUpdateResponse] A list of updated plans.
|
3872
|
-
#
|
3873
|
-
def put_dunning_campaign_bulk_update(dunning_campaign_id:, body:)
|
3874
|
-
path = interpolate_path("/dunning_campaigns/{dunning_campaign_id}/bulk_update", dunning_campaign_id: dunning_campaign_id)
|
3875
|
-
put(path, body, Requests::DunningCampaignsBulkUpdate)
|
3876
|
-
end
|
3877
3996
|
end
|
3878
3997
|
end
|