recurly 3.15.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.bumpversion.cfg +1 -1
- data/.github_changelog_generator +1 -1
- data/CHANGELOG.md +103 -44
- data/CONTRIBUTING.md +0 -4
- data/GETTING_STARTED.md +20 -17
- data/README.md +0 -3
- data/lib/recurly/client.rb +39 -21
- data/lib/recurly/client/operations.rb +769 -534
- data/lib/recurly/errors.rb +5 -23
- data/lib/recurly/errors/api_errors.rb +3 -0
- data/lib/recurly/pager.rb +3 -13
- data/lib/recurly/requests/{account_acquisition_updatable.rb → account_acquisition_update.rb} +1 -1
- data/lib/recurly/requests/account_create.rb +2 -2
- data/lib/recurly/requests/account_purchase.rb +2 -2
- data/lib/recurly/requests/add_on_create.rb +2 -2
- data/lib/recurly/requests/add_on_pricing.rb +5 -1
- data/lib/recurly/requests/add_on_update.rb +2 -2
- data/lib/recurly/requests/address.rb +0 -8
- data/lib/recurly/requests/billing_info_create.rb +7 -23
- data/lib/recurly/requests/coupon_create.rb +1 -1
- data/lib/recurly/requests/coupon_redemption_create.rb +4 -0
- data/lib/recurly/requests/external_transaction.rb +1 -1
- data/lib/recurly/requests/{invoice_updatable.rb → invoice_update.rb} +1 -1
- data/lib/recurly/requests/line_item_create.rb +1 -1
- data/lib/recurly/requests/plan_update.rb +0 -4
- data/lib/recurly/requests/purchase_create.rb +4 -0
- data/lib/recurly/requests/subscription_add_on_create.rb +6 -2
- 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 -1
- data/lib/recurly/requests/subscription_create.rb +7 -3
- data/lib/recurly/requests/tier.rb +2 -2
- data/lib/recurly/requests/tier_pricing.rb +22 -0
- data/lib/recurly/resources/add_on.rb +1 -1
- data/lib/recurly/resources/add_on_pricing.rb +5 -1
- data/lib/recurly/resources/address.rb +0 -8
- data/lib/recurly/resources/address_with_name.rb +46 -0
- data/lib/recurly/resources/coupon.rb +5 -17
- data/lib/recurly/resources/coupon_redemption.rb +4 -0
- data/lib/recurly/resources/invoice.rb +6 -2
- data/lib/recurly/resources/line_item.rb +4 -0
- data/lib/recurly/resources/plan.rb +1 -1
- data/lib/recurly/resources/subscription.rb +1 -1
- 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 -4
- data/lib/recurly/resources/tier.rb +2 -2
- data/lib/recurly/resources/tier_pricing.rb +22 -0
- data/lib/recurly/resources/transaction.rb +2 -2
- data/lib/recurly/resources/unique_coupon_code_params.rb +26 -0
- data/lib/recurly/resources/usage.rb +5 -1
- data/lib/recurly/version.rb +1 -1
- data/openapi/api.yaml +1871 -1690
- data/scripts/changelog +1 -1
- metadata +9 -9
- data/CODE_OF_CONDUCT.md +0 -130
- data/lib/recurly/errors/network_errors.rb +0 -10
- data/lib/recurly/resources/line_item_list.rb +0 -26
- data/lib/recurly/resources/subscription_change_preview.rb +0 -78
@@ -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
|
@@ -164,10 +174,11 @@ module Recurly
|
|
164
174
|
|
165
175
|
# Fetch an account
|
166
176
|
#
|
167
|
-
# {https://developers.recurly.com/api/
|
177
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_account get_account api documenation}
|
168
178
|
#
|
169
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+.
|
170
|
-
# @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+.
|
171
182
|
#
|
172
183
|
# @return [Resources::Account] An account.
|
173
184
|
# @example
|
@@ -185,13 +196,14 @@ module Recurly
|
|
185
196
|
get(path, **options)
|
186
197
|
end
|
187
198
|
|
188
|
-
#
|
199
|
+
# Update an account
|
189
200
|
#
|
190
|
-
# {https://developers.recurly.com/api/
|
201
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_account update_account api documenation}
|
191
202
|
#
|
192
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+.
|
193
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}
|
194
|
-
# @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+.
|
195
207
|
#
|
196
208
|
# @return [Resources::Account] An account.
|
197
209
|
# @example
|
@@ -218,10 +230,11 @@ module Recurly
|
|
218
230
|
|
219
231
|
# Deactivate an account
|
220
232
|
#
|
221
|
-
# {https://developers.recurly.com/api/
|
233
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/deactivate_account deactivate_account api documenation}
|
222
234
|
#
|
223
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+.
|
224
|
-
# @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+.
|
225
238
|
#
|
226
239
|
# @return [Resources::Account] An account.
|
227
240
|
# @example
|
@@ -241,10 +254,11 @@ module Recurly
|
|
241
254
|
|
242
255
|
# Fetch an account's acquisition data
|
243
256
|
#
|
244
|
-
# {https://developers.recurly.com/api/
|
257
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_account_acquisition get_account_acquisition api documenation}
|
245
258
|
#
|
246
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+.
|
247
|
-
# @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+.
|
248
262
|
#
|
249
263
|
# @return [Resources::AccountAcquisition] An account's acquisition data.
|
250
264
|
# @example
|
@@ -264,11 +278,12 @@ module Recurly
|
|
264
278
|
|
265
279
|
# Update an account's acquisition data
|
266
280
|
#
|
267
|
-
# {https://developers.recurly.com/api/
|
281
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_account_acquisition update_account_acquisition api documenation}
|
268
282
|
#
|
269
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+.
|
270
|
-
# @param body [Requests::
|
271
|
-
# @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+.
|
272
287
|
#
|
273
288
|
# @return [Resources::AccountAcquisition] An account's updated acquisition data.
|
274
289
|
# @example
|
@@ -295,15 +310,16 @@ module Recurly
|
|
295
310
|
#
|
296
311
|
def update_account_acquisition(account_id:, body:, **options)
|
297
312
|
path = interpolate_path("/accounts/{account_id}/acquisition", account_id: account_id)
|
298
|
-
put(path, body, Requests::
|
313
|
+
put(path, body, Requests::AccountAcquisitionUpdate, **options)
|
299
314
|
end
|
300
315
|
|
301
316
|
# Remove an account's acquisition data
|
302
317
|
#
|
303
|
-
# {https://developers.recurly.com/api/
|
318
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_account_acquisition remove_account_acquisition api documenation}
|
304
319
|
#
|
305
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+.
|
306
|
-
# @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+.
|
307
323
|
#
|
308
324
|
# @return [Resources::Empty] Acquisition data was succesfully deleted.
|
309
325
|
# @example
|
@@ -323,10 +339,11 @@ module Recurly
|
|
323
339
|
|
324
340
|
# Reactivate an inactive account
|
325
341
|
#
|
326
|
-
# {https://developers.recurly.com/api/
|
342
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/reactivate_account reactivate_account api documenation}
|
327
343
|
#
|
328
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+.
|
329
|
-
# @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+.
|
330
347
|
#
|
331
348
|
# @return [Resources::Account] An account.
|
332
349
|
# @example
|
@@ -346,10 +363,11 @@ module Recurly
|
|
346
363
|
|
347
364
|
# Fetch an account's balance and past due status
|
348
365
|
#
|
349
|
-
# {https://developers.recurly.com/api/
|
366
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_account_balance get_account_balance api documenation}
|
350
367
|
#
|
351
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+.
|
352
|
-
# @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+.
|
353
371
|
#
|
354
372
|
# @return [Resources::AccountBalance] An account's balance.
|
355
373
|
# @example
|
@@ -369,10 +387,11 @@ module Recurly
|
|
369
387
|
|
370
388
|
# Fetch an account's billing information
|
371
389
|
#
|
372
|
-
# {https://developers.recurly.com/api/
|
390
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_billing_info get_billing_info api documenation}
|
373
391
|
#
|
374
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+.
|
375
|
-
# @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+.
|
376
395
|
#
|
377
396
|
# @return [Resources::BillingInfo] An account's billing information.
|
378
397
|
# @example
|
@@ -392,11 +411,12 @@ module Recurly
|
|
392
411
|
|
393
412
|
# Set an account's billing information
|
394
413
|
#
|
395
|
-
# {https://developers.recurly.com/api/
|
414
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_billing_info update_billing_info api documenation}
|
396
415
|
#
|
397
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+.
|
398
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}
|
399
|
-
# @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+.
|
400
420
|
#
|
401
421
|
# @return [Resources::BillingInfo] Updated billing information.
|
402
422
|
# @example
|
@@ -423,10 +443,11 @@ module Recurly
|
|
423
443
|
|
424
444
|
# Remove an account's billing information
|
425
445
|
#
|
426
|
-
# {https://developers.recurly.com/api/
|
446
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_billing_info remove_billing_info api documenation}
|
427
447
|
#
|
428
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+.
|
429
|
-
# @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+.
|
430
451
|
#
|
431
452
|
# @return [Resources::Empty] Billing information deleted
|
432
453
|
# @example
|
@@ -446,10 +467,11 @@ module Recurly
|
|
446
467
|
|
447
468
|
# Get the list of billing information associated with an account
|
448
469
|
#
|
449
|
-
# {https://developers.recurly.com/api/
|
470
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_billing_infos list_billing_infos api documenation}
|
450
471
|
#
|
451
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+.
|
452
|
-
# @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
|
453
475
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
454
476
|
#
|
455
477
|
# *Important notes:*
|
@@ -461,17 +483,17 @@ module Recurly
|
|
461
483
|
# * Records are returned in an arbitrary order. Since results are all
|
462
484
|
# returned at once you can sort the records yourself.
|
463
485
|
#
|
464
|
-
#
|
486
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
465
487
|
# order. In descending order updated records will move behind the cursor and could
|
466
488
|
# prevent some records from being returned.
|
467
489
|
#
|
468
|
-
#
|
490
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
469
491
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
470
492
|
#
|
471
|
-
#
|
493
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
472
494
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
473
495
|
#
|
474
|
-
#
|
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+.
|
475
497
|
#
|
476
498
|
# @return [Pager<Resources::BillingInfo>] A list of the the billing information for an account's
|
477
499
|
#
|
@@ -482,11 +504,12 @@ module Recurly
|
|
482
504
|
|
483
505
|
# Set an account's billing information when the wallet feature is enabled
|
484
506
|
#
|
485
|
-
# {https://developers.recurly.com/api/
|
507
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_billing_info create_billing_info api documenation}
|
486
508
|
#
|
487
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+.
|
488
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}
|
489
|
-
# @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+.
|
490
513
|
#
|
491
514
|
# @return [Resources::BillingInfo] Updated billing information.
|
492
515
|
#
|
@@ -497,11 +520,12 @@ module Recurly
|
|
497
520
|
|
498
521
|
# Fetch a billing info
|
499
522
|
#
|
500
|
-
# {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}
|
501
524
|
#
|
502
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+.
|
503
526
|
# @param billing_info_id [String] Billing Info ID.
|
504
|
-
# @param
|
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+.
|
505
529
|
#
|
506
530
|
# @return [Resources::BillingInfo] A billing info.
|
507
531
|
#
|
@@ -512,12 +536,13 @@ module Recurly
|
|
512
536
|
|
513
537
|
# Update an account's billing information
|
514
538
|
#
|
515
|
-
# {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}
|
516
540
|
#
|
517
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+.
|
518
542
|
# @param billing_info_id [String] Billing Info ID.
|
519
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}
|
520
|
-
# @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+.
|
521
546
|
#
|
522
547
|
# @return [Resources::BillingInfo] Updated billing information.
|
523
548
|
#
|
@@ -528,11 +553,12 @@ module Recurly
|
|
528
553
|
|
529
554
|
# Remove an account's billing information
|
530
555
|
#
|
531
|
-
# {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}
|
532
557
|
#
|
533
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+.
|
534
559
|
# @param billing_info_id [String] Billing Info ID.
|
535
|
-
# @param
|
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+.
|
536
562
|
#
|
537
563
|
# @return [Resources::Empty] Billing information deleted
|
538
564
|
#
|
@@ -543,10 +569,11 @@ module Recurly
|
|
543
569
|
|
544
570
|
# Show the coupon redemptions for an account
|
545
571
|
#
|
546
|
-
# {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}
|
547
573
|
#
|
548
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+.
|
549
|
-
# @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
|
550
577
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
551
578
|
#
|
552
579
|
# *Important notes:*
|
@@ -558,23 +585,27 @@ module Recurly
|
|
558
585
|
# * Records are returned in an arbitrary order. Since results are all
|
559
586
|
# returned at once you can sort the records yourself.
|
560
587
|
#
|
561
|
-
#
|
588
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
562
589
|
# order. In descending order updated records will move behind the cursor and could
|
563
590
|
# prevent some records from being returned.
|
564
591
|
#
|
565
|
-
#
|
592
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
566
593
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
567
594
|
#
|
568
|
-
#
|
595
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
569
596
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
570
597
|
#
|
571
|
-
#
|
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+.
|
572
600
|
#
|
573
601
|
# @return [Pager<Resources::CouponRedemption>] A list of the the coupon redemptions on an account.
|
574
602
|
# @example
|
603
|
+
# params = {
|
604
|
+
# limit: 200
|
605
|
+
# }
|
575
606
|
# redemptions = @client.list_account_coupon_redemptions(
|
576
607
|
# account_id: account_id,
|
577
|
-
#
|
608
|
+
# params: params
|
578
609
|
# )
|
579
610
|
# redemptions.each do |redemption|
|
580
611
|
# puts "CouponRedemption: #{redemption.id}"
|
@@ -585,36 +616,37 @@ module Recurly
|
|
585
616
|
pager(path, **options)
|
586
617
|
end
|
587
618
|
|
588
|
-
# Show the coupon
|
619
|
+
# Show the coupon redemptions that are active on an account
|
589
620
|
#
|
590
|
-
# {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}
|
591
622
|
#
|
592
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+.
|
593
|
-
# @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+.
|
594
626
|
#
|
595
|
-
# @return [Resources::CouponRedemption]
|
627
|
+
# @return [Pager<Resources::CouponRedemption>] Active coupon redemptions on an account.
|
596
628
|
# @example
|
597
|
-
#
|
598
|
-
#
|
599
|
-
#
|
600
|
-
#
|
601
|
-
#
|
602
|
-
#
|
603
|
-
# 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}"
|
604
635
|
# end
|
605
636
|
#
|
606
|
-
def
|
637
|
+
def list_active_coupon_redemptions(account_id:, **options)
|
607
638
|
path = interpolate_path("/accounts/{account_id}/coupon_redemptions/active", account_id: account_id)
|
608
|
-
|
639
|
+
pager(path, **options)
|
609
640
|
end
|
610
641
|
|
611
|
-
# Generate an active coupon redemption on an account
|
642
|
+
# Generate an active coupon redemption on an account or subscription
|
612
643
|
#
|
613
|
-
# {https://developers.recurly.com/api/
|
644
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_coupon_redemption create_coupon_redemption api documenation}
|
614
645
|
#
|
615
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+.
|
616
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}
|
617
|
-
# @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+.
|
618
650
|
#
|
619
651
|
# @return [Resources::CouponRedemption] Returns the new coupon redemption.
|
620
652
|
# @example
|
@@ -641,10 +673,11 @@ module Recurly
|
|
641
673
|
|
642
674
|
# Delete the active coupon redemption from an account
|
643
675
|
#
|
644
|
-
# {https://developers.recurly.com/api/
|
676
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_coupon_redemption remove_coupon_redemption api documenation}
|
645
677
|
#
|
646
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+.
|
647
|
-
# @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+.
|
648
681
|
#
|
649
682
|
# @return [Resources::CouponRedemption] Coupon redemption deleted.
|
650
683
|
# @example
|
@@ -664,28 +697,32 @@ module Recurly
|
|
664
697
|
|
665
698
|
# List an account's credit payments
|
666
699
|
#
|
667
|
-
# {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}
|
668
701
|
#
|
669
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+.
|
670
|
-
# @param
|
671
|
-
#
|
672
|
-
#
|
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
|
673
707
|
# order. In descending order updated records will move behind the cursor and could
|
674
708
|
# prevent some records from being returned.
|
675
709
|
#
|
676
|
-
#
|
710
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
677
711
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
678
712
|
#
|
679
|
-
#
|
713
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
680
714
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
681
715
|
#
|
682
|
-
#
|
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+.
|
683
717
|
#
|
684
718
|
# @return [Pager<Resources::CreditPayment>] A list of the account's credit payments.
|
685
719
|
# @example
|
720
|
+
# params = {
|
721
|
+
# limit: 200
|
722
|
+
# }
|
686
723
|
# payments = @client.list_account_credit_payments(
|
687
724
|
# account_id: account_id,
|
688
|
-
#
|
725
|
+
# params: params
|
689
726
|
# )
|
690
727
|
# payments.each do |payment|
|
691
728
|
# puts "CreditPayment: #{payment.id}"
|
@@ -698,10 +735,11 @@ module Recurly
|
|
698
735
|
|
699
736
|
# List an account's invoices
|
700
737
|
#
|
701
|
-
# {https://developers.recurly.com/api/
|
738
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_account_invoices list_account_invoices api documenation}
|
702
739
|
#
|
703
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+.
|
704
|
-
# @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
|
705
743
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
706
744
|
#
|
707
745
|
# *Important notes:*
|
@@ -713,31 +751,34 @@ module Recurly
|
|
713
751
|
# * Records are returned in an arbitrary order. Since results are all
|
714
752
|
# returned at once you can sort the records yourself.
|
715
753
|
#
|
716
|
-
#
|
717
|
-
#
|
718
|
-
#
|
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
|
719
757
|
# order. In descending order updated records will move behind the cursor and could
|
720
758
|
# prevent some records from being returned.
|
721
759
|
#
|
722
|
-
#
|
760
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
723
761
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
724
762
|
#
|
725
|
-
#
|
763
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
726
764
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
727
765
|
#
|
728
|
-
#
|
766
|
+
# :type [String] Filter by type when:
|
729
767
|
# - +type=charge+, only charge invoices will be returned.
|
730
768
|
# - +type=credit+, only credit invoices will be returned.
|
731
769
|
# - +type=non-legacy+, only charge and credit invoices will be returned.
|
732
770
|
# - +type=legacy+, only legacy invoices will be returned.
|
733
771
|
#
|
734
|
-
#
|
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+.
|
735
773
|
#
|
736
774
|
# @return [Pager<Resources::Invoice>] A list of the account's invoices.
|
737
775
|
# @example
|
776
|
+
# params = {
|
777
|
+
# limit: 200
|
778
|
+
# }
|
738
779
|
# invoices = @client.list_account_invoices(
|
739
780
|
# account_id: account_id,
|
740
|
-
#
|
781
|
+
# params: params
|
741
782
|
# )
|
742
783
|
# invoices.each do |invoice|
|
743
784
|
# puts "Invoice: #{invoice.number}"
|
@@ -750,11 +791,12 @@ module Recurly
|
|
750
791
|
|
751
792
|
# Create an invoice for pending line items
|
752
793
|
#
|
753
|
-
# {https://developers.recurly.com/api/
|
794
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_invoice create_invoice api documenation}
|
754
795
|
#
|
755
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+.
|
756
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}
|
757
|
-
# @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+.
|
758
800
|
#
|
759
801
|
# @return [Resources::InvoiceCollection] Returns the new invoices.
|
760
802
|
# @example
|
@@ -781,11 +823,12 @@ module Recurly
|
|
781
823
|
|
782
824
|
# Preview new invoice for pending line items
|
783
825
|
#
|
784
|
-
# {https://developers.recurly.com/api/
|
826
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/preview_invoice preview_invoice api documenation}
|
785
827
|
#
|
786
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+.
|
787
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}
|
788
|
-
# @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+.
|
789
832
|
#
|
790
833
|
# @return [Resources::InvoiceCollection] Returns the invoice previews.
|
791
834
|
# @example
|
@@ -812,10 +855,11 @@ module Recurly
|
|
812
855
|
|
813
856
|
# List an account's line items
|
814
857
|
#
|
815
|
-
# {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}
|
816
859
|
#
|
817
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+.
|
818
|
-
# @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
|
819
863
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
820
864
|
#
|
821
865
|
# *Important notes:*
|
@@ -827,28 +871,31 @@ module Recurly
|
|
827
871
|
# * Records are returned in an arbitrary order. Since results are all
|
828
872
|
# returned at once you can sort the records yourself.
|
829
873
|
#
|
830
|
-
#
|
831
|
-
#
|
832
|
-
#
|
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
|
833
877
|
# order. In descending order updated records will move behind the cursor and could
|
834
878
|
# prevent some records from being returned.
|
835
879
|
#
|
836
|
-
#
|
880
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
837
881
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
838
882
|
#
|
839
|
-
#
|
883
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
840
884
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
841
885
|
#
|
842
|
-
#
|
843
|
-
#
|
844
|
-
#
|
845
|
-
#
|
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+.
|
846
890
|
#
|
847
891
|
# @return [Pager<Resources::LineItem>] A list of the account's line items.
|
848
892
|
# @example
|
893
|
+
# params = {
|
894
|
+
# limit: 200
|
895
|
+
# }
|
849
896
|
# line_items = @client.list_account_line_items(
|
850
897
|
# account_id: account_id,
|
851
|
-
#
|
898
|
+
# params: params
|
852
899
|
# )
|
853
900
|
# line_items.each do |line_item|
|
854
901
|
# puts "LineItem: #{line_item.id}"
|
@@ -861,11 +908,12 @@ module Recurly
|
|
861
908
|
|
862
909
|
# Create a new line item for the account
|
863
910
|
#
|
864
|
-
# {https://developers.recurly.com/api/
|
911
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_line_item create_line_item api documenation}
|
865
912
|
#
|
866
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+.
|
867
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}
|
868
|
-
# @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+.
|
869
917
|
#
|
870
918
|
# @return [Resources::LineItem] Returns the new line item.
|
871
919
|
# @example
|
@@ -893,10 +941,11 @@ module Recurly
|
|
893
941
|
|
894
942
|
# Fetch a list of an account's notes
|
895
943
|
#
|
896
|
-
# {https://developers.recurly.com/api/
|
944
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_account_notes list_account_notes api documenation}
|
897
945
|
#
|
898
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+.
|
899
|
-
# @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
|
900
949
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
901
950
|
#
|
902
951
|
# *Important notes:*
|
@@ -908,11 +957,14 @@ module Recurly
|
|
908
957
|
# * Records are returned in an arbitrary order. Since results are all
|
909
958
|
# returned at once you can sort the records yourself.
|
910
959
|
#
|
911
|
-
#
|
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+.
|
912
961
|
#
|
913
962
|
# @return [Pager<Resources::AccountNote>] A list of an account's notes.
|
914
963
|
# @example
|
915
|
-
#
|
964
|
+
# params = {
|
965
|
+
# limit: 200
|
966
|
+
# }
|
967
|
+
# account_notes = @client.list_account_notes(account_id: account_id, params: params)
|
916
968
|
# account_notes.each do |note|
|
917
969
|
# puts "AccountNote: #{note.message}"
|
918
970
|
# end
|
@@ -924,11 +976,12 @@ module Recurly
|
|
924
976
|
|
925
977
|
# Fetch an account note
|
926
978
|
#
|
927
|
-
# {https://developers.recurly.com/api/
|
979
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_account_note get_account_note api documenation}
|
928
980
|
#
|
929
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+.
|
930
982
|
# @param account_note_id [String] Account Note ID.
|
931
|
-
# @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+.
|
932
985
|
#
|
933
986
|
# @return [Resources::AccountNote] An account note.
|
934
987
|
# @example
|
@@ -951,10 +1004,11 @@ module Recurly
|
|
951
1004
|
|
952
1005
|
# Fetch a list of an account's shipping addresses
|
953
1006
|
#
|
954
|
-
# {https://developers.recurly.com/api/
|
1007
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_shipping_addresses list_shipping_addresses api documenation}
|
955
1008
|
#
|
956
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+.
|
957
|
-
# @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
|
958
1012
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
959
1013
|
#
|
960
1014
|
# *Important notes:*
|
@@ -966,25 +1020,28 @@ module Recurly
|
|
966
1020
|
# * Records are returned in an arbitrary order. Since results are all
|
967
1021
|
# returned at once you can sort the records yourself.
|
968
1022
|
#
|
969
|
-
#
|
970
|
-
#
|
971
|
-
#
|
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
|
972
1026
|
# order. In descending order updated records will move behind the cursor and could
|
973
1027
|
# prevent some records from being returned.
|
974
1028
|
#
|
975
|
-
#
|
1029
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
976
1030
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
977
1031
|
#
|
978
|
-
#
|
1032
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
979
1033
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
980
1034
|
#
|
981
|
-
#
|
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+.
|
982
1036
|
#
|
983
1037
|
# @return [Pager<Resources::ShippingAddress>] A list of an account's shipping addresses.
|
984
1038
|
# @example
|
1039
|
+
# params = {
|
1040
|
+
# limit: 200
|
1041
|
+
# }
|
985
1042
|
# shipping_addresses = @client.list_shipping_addresses(
|
986
1043
|
# account_id: account_id,
|
987
|
-
#
|
1044
|
+
# params: params
|
988
1045
|
# )
|
989
1046
|
# shipping_addresses.each do |addr|
|
990
1047
|
# puts "ShippingAddress: #{addr.nickname} - #{addr.street1}"
|
@@ -997,11 +1054,12 @@ module Recurly
|
|
997
1054
|
|
998
1055
|
# Create a new shipping address for the account
|
999
1056
|
#
|
1000
|
-
# {https://developers.recurly.com/api/
|
1057
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_shipping_address create_shipping_address api documenation}
|
1001
1058
|
#
|
1002
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+.
|
1003
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}
|
1004
|
-
# @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+.
|
1005
1063
|
#
|
1006
1064
|
# @return [Resources::ShippingAddress] Returns the new shipping address.
|
1007
1065
|
# @example
|
@@ -1031,11 +1089,12 @@ module Recurly
|
|
1031
1089
|
|
1032
1090
|
# Fetch an account's shipping address
|
1033
1091
|
#
|
1034
|
-
# {https://developers.recurly.com/api/
|
1092
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_shipping_address get_shipping_address api documenation}
|
1035
1093
|
#
|
1036
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+.
|
1037
1095
|
# @param shipping_address_id [String] Shipping Address ID.
|
1038
|
-
# @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+.
|
1039
1098
|
#
|
1040
1099
|
# @return [Resources::ShippingAddress] A shipping address.
|
1041
1100
|
# @example
|
@@ -1058,12 +1117,13 @@ module Recurly
|
|
1058
1117
|
|
1059
1118
|
# Update an account's shipping address
|
1060
1119
|
#
|
1061
|
-
# {https://developers.recurly.com/api/
|
1120
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_shipping_address update_shipping_address api documenation}
|
1062
1121
|
#
|
1063
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+.
|
1064
1123
|
# @param shipping_address_id [String] Shipping Address ID.
|
1065
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}
|
1066
|
-
# @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+.
|
1067
1127
|
#
|
1068
1128
|
# @return [Resources::ShippingAddress] The updated shipping address.
|
1069
1129
|
# @example
|
@@ -1092,11 +1152,12 @@ module Recurly
|
|
1092
1152
|
|
1093
1153
|
# Remove an account's shipping address
|
1094
1154
|
#
|
1095
|
-
# {https://developers.recurly.com/api/
|
1155
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_shipping_address remove_shipping_address api documenation}
|
1096
1156
|
#
|
1097
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+.
|
1098
1158
|
# @param shipping_address_id [String] Shipping Address ID.
|
1099
|
-
# @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+.
|
1100
1161
|
#
|
1101
1162
|
# @return [Resources::Empty] Shipping address deleted.
|
1102
1163
|
# @example
|
@@ -1119,10 +1180,11 @@ module Recurly
|
|
1119
1180
|
|
1120
1181
|
# List an account's subscriptions
|
1121
1182
|
#
|
1122
|
-
# {https://developers.recurly.com/api/
|
1183
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_account_subscriptions list_account_subscriptions api documenation}
|
1123
1184
|
#
|
1124
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+.
|
1125
|
-
# @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
|
1126
1188
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1127
1189
|
#
|
1128
1190
|
# *Important notes:*
|
@@ -1134,31 +1196,34 @@ module Recurly
|
|
1134
1196
|
# * Records are returned in an arbitrary order. Since results are all
|
1135
1197
|
# returned at once you can sort the records yourself.
|
1136
1198
|
#
|
1137
|
-
#
|
1138
|
-
#
|
1139
|
-
#
|
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
|
1140
1202
|
# order. In descending order updated records will move behind the cursor and could
|
1141
1203
|
# prevent some records from being returned.
|
1142
1204
|
#
|
1143
|
-
#
|
1205
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1144
1206
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1145
1207
|
#
|
1146
|
-
#
|
1208
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1147
1209
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1148
1210
|
#
|
1149
|
-
#
|
1211
|
+
# :state [String] Filter by state.
|
1150
1212
|
#
|
1151
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.
|
1152
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.
|
1153
1215
|
# - When +state=live+, only subscriptions that are in an active, canceled, or future state or are in trial will be returned.
|
1154
1216
|
#
|
1155
|
-
#
|
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+.
|
1156
1218
|
#
|
1157
1219
|
# @return [Pager<Resources::Subscription>] A list of the account's subscriptions.
|
1158
1220
|
# @example
|
1221
|
+
# params = {
|
1222
|
+
# limit: 200
|
1223
|
+
# }
|
1159
1224
|
# subscriptions = @client.list_account_subscriptions(
|
1160
1225
|
# account_id: account_id,
|
1161
|
-
#
|
1226
|
+
# params: params
|
1162
1227
|
# )
|
1163
1228
|
# subscriptions.each do |subscription|
|
1164
1229
|
# puts "Subscription: #{subscription.uuid}"
|
@@ -1171,10 +1236,11 @@ module Recurly
|
|
1171
1236
|
|
1172
1237
|
# List an account's transactions
|
1173
1238
|
#
|
1174
|
-
# {https://developers.recurly.com/api/
|
1239
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_account_transactions list_account_transactions api documenation}
|
1175
1240
|
#
|
1176
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+.
|
1177
|
-
# @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
|
1178
1244
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1179
1245
|
#
|
1180
1246
|
# *Important notes:*
|
@@ -1186,27 +1252,30 @@ module Recurly
|
|
1186
1252
|
# * Records are returned in an arbitrary order. Since results are all
|
1187
1253
|
# returned at once you can sort the records yourself.
|
1188
1254
|
#
|
1189
|
-
#
|
1190
|
-
#
|
1191
|
-
#
|
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
|
1192
1258
|
# order. In descending order updated records will move behind the cursor and could
|
1193
1259
|
# prevent some records from being returned.
|
1194
1260
|
#
|
1195
|
-
#
|
1261
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1196
1262
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1197
1263
|
#
|
1198
|
-
#
|
1264
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1199
1265
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1200
1266
|
#
|
1201
|
-
#
|
1202
|
-
#
|
1203
|
-
#
|
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+.
|
1204
1270
|
#
|
1205
1271
|
# @return [Pager<Resources::Transaction>] A list of the account's transactions.
|
1206
1272
|
# @example
|
1273
|
+
# params = {
|
1274
|
+
# limit: 200
|
1275
|
+
# }
|
1207
1276
|
# transactions = @client.list_account_transactions(
|
1208
1277
|
# account_id: account_id,
|
1209
|
-
#
|
1278
|
+
# params: params
|
1210
1279
|
# )
|
1211
1280
|
# transactions.each do |transaction|
|
1212
1281
|
# puts "Transaction: #{transaction.uuid}"
|
@@ -1219,10 +1288,11 @@ module Recurly
|
|
1219
1288
|
|
1220
1289
|
# List an account's child accounts
|
1221
1290
|
#
|
1222
|
-
# {https://developers.recurly.com/api/
|
1291
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_child_accounts list_child_accounts api documenation}
|
1223
1292
|
#
|
1224
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+.
|
1225
|
-
# @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
|
1226
1296
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1227
1297
|
#
|
1228
1298
|
# *Important notes:*
|
@@ -1234,30 +1304,33 @@ module Recurly
|
|
1234
1304
|
# * Records are returned in an arbitrary order. Since results are all
|
1235
1305
|
# returned at once you can sort the records yourself.
|
1236
1306
|
#
|
1237
|
-
#
|
1238
|
-
#
|
1239
|
-
#
|
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
|
1240
1310
|
# order. In descending order updated records will move behind the cursor and could
|
1241
1311
|
# prevent some records from being returned.
|
1242
1312
|
#
|
1243
|
-
#
|
1313
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1244
1314
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1245
1315
|
#
|
1246
|
-
#
|
1316
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1247
1317
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1248
1318
|
#
|
1249
|
-
#
|
1250
|
-
#
|
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+,
|
1251
1321
|
# +canceled+, or +future+ state.
|
1252
1322
|
#
|
1253
|
-
#
|
1254
|
-
#
|
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+.
|
1255
1325
|
#
|
1256
1326
|
# @return [Pager<Resources::Account>] A list of an account's child accounts.
|
1257
1327
|
# @example
|
1328
|
+
# params = {
|
1329
|
+
# limit: 200
|
1330
|
+
# }
|
1258
1331
|
# child_accounts = @client.list_child_accounts(
|
1259
1332
|
# account_id: account_id,
|
1260
|
-
#
|
1333
|
+
# params: params
|
1261
1334
|
# )
|
1262
1335
|
# child_accounts.each do |child|
|
1263
1336
|
# puts "Account: #{child.code}"
|
@@ -1270,9 +1343,10 @@ module Recurly
|
|
1270
1343
|
|
1271
1344
|
# List a site's account acquisition data
|
1272
1345
|
#
|
1273
|
-
# {https://developers.recurly.com/api/
|
1346
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_account_acquisition list_account_acquisition api documenation}
|
1274
1347
|
#
|
1275
|
-
# @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
|
1276
1350
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1277
1351
|
#
|
1278
1352
|
# *Important notes:*
|
@@ -1284,23 +1358,26 @@ module Recurly
|
|
1284
1358
|
# * Records are returned in an arbitrary order. Since results are all
|
1285
1359
|
# returned at once you can sort the records yourself.
|
1286
1360
|
#
|
1287
|
-
#
|
1288
|
-
#
|
1289
|
-
#
|
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
|
1290
1364
|
# order. In descending order updated records will move behind the cursor and could
|
1291
1365
|
# prevent some records from being returned.
|
1292
1366
|
#
|
1293
|
-
#
|
1367
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1294
1368
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1295
1369
|
#
|
1296
|
-
#
|
1370
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1297
1371
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1298
1372
|
#
|
1299
|
-
#
|
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+.
|
1300
1374
|
#
|
1301
1375
|
# @return [Pager<Resources::AccountAcquisition>] A list of the site's account acquisition data.
|
1302
1376
|
# @example
|
1303
|
-
#
|
1377
|
+
# params = {
|
1378
|
+
# limit: 200
|
1379
|
+
# }
|
1380
|
+
# acquisitions = @client.list_account_acquisition(params: params)
|
1304
1381
|
# acquisitions.each do |acquisition|
|
1305
1382
|
# puts "AccountAcquisition: #{acquisition.cost}"
|
1306
1383
|
# end
|
@@ -1312,9 +1389,10 @@ module Recurly
|
|
1312
1389
|
|
1313
1390
|
# List a site's coupons
|
1314
1391
|
#
|
1315
|
-
# {https://developers.recurly.com/api/
|
1392
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_coupons list_coupons api documenation}
|
1316
1393
|
#
|
1317
|
-
# @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
|
1318
1396
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1319
1397
|
#
|
1320
1398
|
# *Important notes:*
|
@@ -1326,23 +1404,26 @@ module Recurly
|
|
1326
1404
|
# * Records are returned in an arbitrary order. Since results are all
|
1327
1405
|
# returned at once you can sort the records yourself.
|
1328
1406
|
#
|
1329
|
-
#
|
1330
|
-
#
|
1331
|
-
#
|
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
|
1332
1410
|
# order. In descending order updated records will move behind the cursor and could
|
1333
1411
|
# prevent some records from being returned.
|
1334
1412
|
#
|
1335
|
-
#
|
1413
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1336
1414
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1337
1415
|
#
|
1338
|
-
#
|
1416
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1339
1417
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1340
1418
|
#
|
1341
|
-
#
|
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+.
|
1342
1420
|
#
|
1343
1421
|
# @return [Pager<Resources::Coupon>] A list of the site's coupons.
|
1344
1422
|
# @example
|
1345
|
-
#
|
1423
|
+
# params = {
|
1424
|
+
# limit: 200
|
1425
|
+
# }
|
1426
|
+
# coupons = @client.list_coupons(params: params)
|
1346
1427
|
# coupons.each do |coupon|
|
1347
1428
|
# puts "coupon: #{coupon.code}"
|
1348
1429
|
# end
|
@@ -1354,10 +1435,11 @@ module Recurly
|
|
1354
1435
|
|
1355
1436
|
# Create a new coupon
|
1356
1437
|
#
|
1357
|
-
# {https://developers.recurly.com/api/
|
1438
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_coupon create_coupon api documenation}
|
1358
1439
|
#
|
1359
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}
|
1360
|
-
# @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+.
|
1361
1443
|
#
|
1362
1444
|
# @return [Resources::Coupon] A new coupon.
|
1363
1445
|
# @example
|
@@ -1390,10 +1472,11 @@ module Recurly
|
|
1390
1472
|
|
1391
1473
|
# Fetch a coupon
|
1392
1474
|
#
|
1393
|
-
# {https://developers.recurly.com/api/
|
1475
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_coupon get_coupon api documenation}
|
1394
1476
|
#
|
1395
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+.
|
1396
|
-
# @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+.
|
1397
1480
|
#
|
1398
1481
|
# @return [Resources::Coupon] A coupon.
|
1399
1482
|
# @example
|
@@ -1413,11 +1496,12 @@ module Recurly
|
|
1413
1496
|
|
1414
1497
|
# Update an active coupon
|
1415
1498
|
#
|
1416
|
-
# {https://developers.recurly.com/api/
|
1499
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_coupon update_coupon api documenation}
|
1417
1500
|
#
|
1418
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+.
|
1419
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}
|
1420
|
-
# @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+.
|
1421
1505
|
#
|
1422
1506
|
# @return [Resources::Coupon] The updated coupon.
|
1423
1507
|
# @example
|
@@ -1440,10 +1524,11 @@ module Recurly
|
|
1440
1524
|
|
1441
1525
|
# Expire a coupon
|
1442
1526
|
#
|
1443
|
-
# {https://developers.recurly.com/api/
|
1527
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/deactivate_coupon deactivate_coupon api documenation}
|
1444
1528
|
#
|
1445
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+.
|
1446
|
-
# @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+.
|
1447
1532
|
#
|
1448
1533
|
# @return [Resources::Coupon] The expired Coupon
|
1449
1534
|
# @example
|
@@ -1461,13 +1546,30 @@ module Recurly
|
|
1461
1546
|
delete(path, **options)
|
1462
1547
|
end
|
1463
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
|
+
|
1464
1565
|
# Restore an inactive coupon
|
1465
1566
|
#
|
1466
|
-
# {https://developers.recurly.com/api/
|
1567
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/restore_coupon restore_coupon api documenation}
|
1467
1568
|
#
|
1468
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+.
|
1469
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}
|
1470
|
-
# @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+.
|
1471
1573
|
#
|
1472
1574
|
# @return [Resources::Coupon] The restored coupon.
|
1473
1575
|
#
|
@@ -1478,10 +1580,11 @@ module Recurly
|
|
1478
1580
|
|
1479
1581
|
# List unique coupon codes associated with a bulk coupon
|
1480
1582
|
#
|
1481
|
-
# {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}
|
1482
1584
|
#
|
1483
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+.
|
1484
|
-
# @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
|
1485
1588
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1486
1589
|
#
|
1487
1590
|
# *Important notes:*
|
@@ -1493,19 +1596,19 @@ module Recurly
|
|
1493
1596
|
# * Records are returned in an arbitrary order. Since results are all
|
1494
1597
|
# returned at once you can sort the records yourself.
|
1495
1598
|
#
|
1496
|
-
#
|
1497
|
-
#
|
1498
|
-
#
|
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
|
1499
1602
|
# order. In descending order updated records will move behind the cursor and could
|
1500
1603
|
# prevent some records from being returned.
|
1501
1604
|
#
|
1502
|
-
#
|
1605
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1503
1606
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1504
1607
|
#
|
1505
|
-
#
|
1608
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1506
1609
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1507
1610
|
#
|
1508
|
-
#
|
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+.
|
1509
1612
|
#
|
1510
1613
|
# @return [Pager<Resources::UniqueCouponCode>] A list of unique coupon codes that were generated
|
1511
1614
|
#
|
@@ -1516,25 +1619,29 @@ module Recurly
|
|
1516
1619
|
|
1517
1620
|
# List a site's credit payments
|
1518
1621
|
#
|
1519
|
-
# {https://developers.recurly.com/api/
|
1622
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_credit_payments list_credit_payments api documenation}
|
1520
1623
|
#
|
1521
|
-
# @param
|
1522
|
-
#
|
1523
|
-
#
|
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
|
1524
1628
|
# order. In descending order updated records will move behind the cursor and could
|
1525
1629
|
# prevent some records from being returned.
|
1526
1630
|
#
|
1527
|
-
#
|
1631
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1528
1632
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1529
1633
|
#
|
1530
|
-
#
|
1634
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1531
1635
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1532
1636
|
#
|
1533
|
-
#
|
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+.
|
1534
1638
|
#
|
1535
1639
|
# @return [Pager<Resources::CreditPayment>] A list of the site's credit payments.
|
1536
1640
|
# @example
|
1537
|
-
#
|
1641
|
+
# params = {
|
1642
|
+
# limit: 200
|
1643
|
+
# }
|
1644
|
+
# payments = @client.list_credit_payments(params: params)
|
1538
1645
|
# payments.each do |payment|
|
1539
1646
|
# puts "CreditPayment: #{payment.id}"
|
1540
1647
|
# end
|
@@ -1546,10 +1653,11 @@ module Recurly
|
|
1546
1653
|
|
1547
1654
|
# Fetch a credit payment
|
1548
1655
|
#
|
1549
|
-
# {https://developers.recurly.com/api/
|
1656
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_credit_payment get_credit_payment api documenation}
|
1550
1657
|
#
|
1551
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+.
|
1552
|
-
# @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+.
|
1553
1661
|
#
|
1554
1662
|
# @return [Resources::CreditPayment] A credit payment.
|
1555
1663
|
#
|
@@ -1560,9 +1668,10 @@ module Recurly
|
|
1560
1668
|
|
1561
1669
|
# List a site's custom field definitions
|
1562
1670
|
#
|
1563
|
-
# {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}
|
1564
1672
|
#
|
1565
|
-
# @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
|
1566
1675
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1567
1676
|
#
|
1568
1677
|
# *Important notes:*
|
@@ -1574,24 +1683,27 @@ module Recurly
|
|
1574
1683
|
# * Records are returned in an arbitrary order. Since results are all
|
1575
1684
|
# returned at once you can sort the records yourself.
|
1576
1685
|
#
|
1577
|
-
#
|
1578
|
-
#
|
1579
|
-
#
|
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
|
1580
1689
|
# order. In descending order updated records will move behind the cursor and could
|
1581
1690
|
# prevent some records from being returned.
|
1582
1691
|
#
|
1583
|
-
#
|
1692
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1584
1693
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1585
1694
|
#
|
1586
|
-
#
|
1695
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1587
1696
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1588
1697
|
#
|
1589
|
-
#
|
1590
|
-
#
|
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+.
|
1591
1700
|
#
|
1592
1701
|
# @return [Pager<Resources::CustomFieldDefinition>] A list of the site's custom field definitions.
|
1593
1702
|
# @example
|
1594
|
-
#
|
1703
|
+
# params = {
|
1704
|
+
# limit: 200
|
1705
|
+
# }
|
1706
|
+
# custom_fields = @client.list_custom_field_definitions(params: params)
|
1595
1707
|
# custom_fields.each do |field|
|
1596
1708
|
# puts "CustomFieldDefinition: #{field.name}"
|
1597
1709
|
# end
|
@@ -1603,10 +1715,11 @@ module Recurly
|
|
1603
1715
|
|
1604
1716
|
# Fetch an custom field definition
|
1605
1717
|
#
|
1606
|
-
# {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}
|
1607
1719
|
#
|
1608
1720
|
# @param custom_field_definition_id [String] Custom Field Definition ID
|
1609
|
-
# @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+.
|
1610
1723
|
#
|
1611
1724
|
# @return [Resources::CustomFieldDefinition] An custom field definition.
|
1612
1725
|
# @example
|
@@ -1628,9 +1741,10 @@ module Recurly
|
|
1628
1741
|
|
1629
1742
|
# List a site's items
|
1630
1743
|
#
|
1631
|
-
# {https://developers.recurly.com/api/
|
1744
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_items list_items api documenation}
|
1632
1745
|
#
|
1633
|
-
# @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
|
1634
1748
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1635
1749
|
#
|
1636
1750
|
# *Important notes:*
|
@@ -1642,24 +1756,27 @@ module Recurly
|
|
1642
1756
|
# * Records are returned in an arbitrary order. Since results are all
|
1643
1757
|
# returned at once you can sort the records yourself.
|
1644
1758
|
#
|
1645
|
-
#
|
1646
|
-
#
|
1647
|
-
#
|
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
|
1648
1762
|
# order. In descending order updated records will move behind the cursor and could
|
1649
1763
|
# prevent some records from being returned.
|
1650
1764
|
#
|
1651
|
-
#
|
1765
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1652
1766
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1653
1767
|
#
|
1654
|
-
#
|
1768
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1655
1769
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1656
1770
|
#
|
1657
|
-
#
|
1658
|
-
#
|
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+.
|
1659
1773
|
#
|
1660
1774
|
# @return [Pager<Resources::Item>] A list of the site's items.
|
1661
1775
|
# @example
|
1662
|
-
#
|
1776
|
+
# params = {
|
1777
|
+
# limit: 200
|
1778
|
+
# }
|
1779
|
+
# items = @client.list_items(params: params)
|
1663
1780
|
# items.each do |item|
|
1664
1781
|
# puts "Item: #{item.code}"
|
1665
1782
|
# end
|
@@ -1671,10 +1788,11 @@ module Recurly
|
|
1671
1788
|
|
1672
1789
|
# Create a new item
|
1673
1790
|
#
|
1674
|
-
# {https://developers.recurly.com/api/
|
1791
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_item create_item api documenation}
|
1675
1792
|
#
|
1676
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}
|
1677
|
-
# @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+.
|
1678
1796
|
#
|
1679
1797
|
# @return [Resources::Item] A new item.
|
1680
1798
|
# @example
|
@@ -1706,10 +1824,11 @@ module Recurly
|
|
1706
1824
|
|
1707
1825
|
# Fetch an item
|
1708
1826
|
#
|
1709
|
-
# {https://developers.recurly.com/api/
|
1827
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_item get_item api documenation}
|
1710
1828
|
#
|
1711
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+.
|
1712
|
-
# @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+.
|
1713
1832
|
#
|
1714
1833
|
# @return [Resources::Item] An item.
|
1715
1834
|
# @example
|
@@ -1729,11 +1848,12 @@ module Recurly
|
|
1729
1848
|
|
1730
1849
|
# Update an active item
|
1731
1850
|
#
|
1732
|
-
# {https://developers.recurly.com/api/
|
1851
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_item update_item api documenation}
|
1733
1852
|
#
|
1734
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+.
|
1735
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}
|
1736
|
-
# @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+.
|
1737
1857
|
#
|
1738
1858
|
# @return [Resources::Item] The updated item.
|
1739
1859
|
# @example
|
@@ -1760,10 +1880,11 @@ module Recurly
|
|
1760
1880
|
|
1761
1881
|
# Deactivate an item
|
1762
1882
|
#
|
1763
|
-
# {https://developers.recurly.com/api/
|
1883
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/deactivate_item deactivate_item api documenation}
|
1764
1884
|
#
|
1765
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+.
|
1766
|
-
# @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+.
|
1767
1888
|
#
|
1768
1889
|
# @return [Resources::Item] An item.
|
1769
1890
|
# @example
|
@@ -1783,10 +1904,11 @@ module Recurly
|
|
1783
1904
|
|
1784
1905
|
# Reactivate an inactive item
|
1785
1906
|
#
|
1786
|
-
# {https://developers.recurly.com/api/
|
1907
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/reactivate_item reactivate_item api documenation}
|
1787
1908
|
#
|
1788
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+.
|
1789
|
-
# @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+.
|
1790
1912
|
#
|
1791
1913
|
# @return [Resources::Item] An item.
|
1792
1914
|
# @example
|
@@ -1806,9 +1928,10 @@ module Recurly
|
|
1806
1928
|
|
1807
1929
|
# List a site's measured units
|
1808
1930
|
#
|
1809
|
-
# {https://developers.recurly.com/api/
|
1931
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_measured_unit list_measured_unit api documenation}
|
1810
1932
|
#
|
1811
|
-
# @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
|
1812
1935
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1813
1936
|
#
|
1814
1937
|
# *Important notes:*
|
@@ -1820,20 +1943,20 @@ module Recurly
|
|
1820
1943
|
# * Records are returned in an arbitrary order. Since results are all
|
1821
1944
|
# returned at once you can sort the records yourself.
|
1822
1945
|
#
|
1823
|
-
#
|
1824
|
-
#
|
1825
|
-
#
|
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
|
1826
1949
|
# order. In descending order updated records will move behind the cursor and could
|
1827
1950
|
# prevent some records from being returned.
|
1828
1951
|
#
|
1829
|
-
#
|
1952
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1830
1953
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1831
1954
|
#
|
1832
|
-
#
|
1955
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1833
1956
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1834
1957
|
#
|
1835
|
-
#
|
1836
|
-
#
|
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+.
|
1837
1960
|
#
|
1838
1961
|
# @return [Pager<Resources::MeasuredUnit>] A list of the site's measured units.
|
1839
1962
|
#
|
@@ -1844,10 +1967,11 @@ module Recurly
|
|
1844
1967
|
|
1845
1968
|
# Create a new measured unit
|
1846
1969
|
#
|
1847
|
-
# {https://developers.recurly.com/api/
|
1970
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_measured_unit create_measured_unit api documenation}
|
1848
1971
|
#
|
1849
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}
|
1850
|
-
# @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+.
|
1851
1975
|
#
|
1852
1976
|
# @return [Resources::MeasuredUnit] A new measured unit.
|
1853
1977
|
#
|
@@ -1858,10 +1982,11 @@ module Recurly
|
|
1858
1982
|
|
1859
1983
|
# Fetch a measured unit
|
1860
1984
|
#
|
1861
|
-
# {https://developers.recurly.com/api/
|
1985
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_measured_unit get_measured_unit api documenation}
|
1862
1986
|
#
|
1863
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+.
|
1864
|
-
# @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+.
|
1865
1990
|
#
|
1866
1991
|
# @return [Resources::MeasuredUnit] An item.
|
1867
1992
|
#
|
@@ -1872,11 +1997,12 @@ module Recurly
|
|
1872
1997
|
|
1873
1998
|
# Update a measured unit
|
1874
1999
|
#
|
1875
|
-
# {https://developers.recurly.com/api/
|
2000
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_measured_unit update_measured_unit api documenation}
|
1876
2001
|
#
|
1877
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+.
|
1878
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}
|
1879
|
-
# @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+.
|
1880
2006
|
#
|
1881
2007
|
# @return [Resources::MeasuredUnit] The updated measured_unit.
|
1882
2008
|
#
|
@@ -1887,10 +2013,11 @@ module Recurly
|
|
1887
2013
|
|
1888
2014
|
# Remove a measured unit
|
1889
2015
|
#
|
1890
|
-
# {https://developers.recurly.com/api/
|
2016
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_measured_unit remove_measured_unit api documenation}
|
1891
2017
|
#
|
1892
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+.
|
1893
|
-
# @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+.
|
1894
2021
|
#
|
1895
2022
|
# @return [Resources::MeasuredUnit] A measured unit.
|
1896
2023
|
#
|
@@ -1901,9 +2028,10 @@ module Recurly
|
|
1901
2028
|
|
1902
2029
|
# List a site's invoices
|
1903
2030
|
#
|
1904
|
-
# {https://developers.recurly.com/api/
|
2031
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_invoices list_invoices api documenation}
|
1905
2032
|
#
|
1906
|
-
# @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
|
1907
2035
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
1908
2036
|
#
|
1909
2037
|
# *Important notes:*
|
@@ -1915,29 +2043,32 @@ module Recurly
|
|
1915
2043
|
# * Records are returned in an arbitrary order. Since results are all
|
1916
2044
|
# returned at once you can sort the records yourself.
|
1917
2045
|
#
|
1918
|
-
#
|
1919
|
-
#
|
1920
|
-
#
|
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
|
1921
2049
|
# order. In descending order updated records will move behind the cursor and could
|
1922
2050
|
# prevent some records from being returned.
|
1923
2051
|
#
|
1924
|
-
#
|
2052
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
1925
2053
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1926
2054
|
#
|
1927
|
-
#
|
2055
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
1928
2056
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
1929
2057
|
#
|
1930
|
-
#
|
2058
|
+
# :type [String] Filter by type when:
|
1931
2059
|
# - +type=charge+, only charge invoices will be returned.
|
1932
2060
|
# - +type=credit+, only credit invoices will be returned.
|
1933
2061
|
# - +type=non-legacy+, only charge and credit invoices will be returned.
|
1934
2062
|
# - +type=legacy+, only legacy invoices will be returned.
|
1935
2063
|
#
|
1936
|
-
#
|
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+.
|
1937
2065
|
#
|
1938
2066
|
# @return [Pager<Resources::Invoice>] A list of the site's invoices.
|
1939
2067
|
# @example
|
1940
|
-
#
|
2068
|
+
# params = {
|
2069
|
+
# limit: 200
|
2070
|
+
# }
|
2071
|
+
# invoices = @client.list_invoices(params: params)
|
1941
2072
|
# invoices.each do |invoice|
|
1942
2073
|
# puts "Invoice: #{invoice.number}"
|
1943
2074
|
# end
|
@@ -1949,10 +2080,11 @@ module Recurly
|
|
1949
2080
|
|
1950
2081
|
# Fetch an invoice
|
1951
2082
|
#
|
1952
|
-
# {https://developers.recurly.com/api/
|
2083
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_invoice get_invoice api documenation}
|
1953
2084
|
#
|
1954
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+.
|
1955
|
-
# @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+.
|
1956
2088
|
#
|
1957
2089
|
# @return [Resources::Invoice] An invoice.
|
1958
2090
|
# @example
|
@@ -1972,11 +2104,12 @@ module Recurly
|
|
1972
2104
|
|
1973
2105
|
# Update an invoice
|
1974
2106
|
#
|
1975
|
-
# {https://developers.recurly.com/api/
|
2107
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_invoice update_invoice api documenation}
|
1976
2108
|
#
|
1977
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+.
|
1978
|
-
# @param body [Requests::
|
1979
|
-
# @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+.
|
1980
2113
|
#
|
1981
2114
|
# @return [Resources::Invoice] An invoice.
|
1982
2115
|
# @example
|
@@ -1985,7 +2118,7 @@ module Recurly
|
|
1985
2118
|
# customer_notes: "New Notes",
|
1986
2119
|
# terms_and_conditions: "New Terms and Conditions"
|
1987
2120
|
# }
|
1988
|
-
# invoice = @client.
|
2121
|
+
# invoice = @client.update_invoice(invoice_id: invoice_id, body: invoice_update)
|
1989
2122
|
# puts "Updated invoice #{invoice}"
|
1990
2123
|
# rescue Recurly::Errors::NotFoundError
|
1991
2124
|
# # If the resource was not found, you may want to alert the user or
|
@@ -1993,17 +2126,18 @@ module Recurly
|
|
1993
2126
|
# puts "Resource Not Found"
|
1994
2127
|
# end
|
1995
2128
|
#
|
1996
|
-
def
|
2129
|
+
def update_invoice(invoice_id:, body:, **options)
|
1997
2130
|
path = interpolate_path("/invoices/{invoice_id}", invoice_id: invoice_id)
|
1998
|
-
put(path, body, Requests::
|
2131
|
+
put(path, body, Requests::InvoiceUpdate, **options)
|
1999
2132
|
end
|
2000
2133
|
|
2001
2134
|
# Fetch an invoice as a PDF
|
2002
2135
|
#
|
2003
|
-
# {https://developers.recurly.com/api/
|
2136
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_invoice_pdf get_invoice_pdf api documenation}
|
2004
2137
|
#
|
2005
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+.
|
2006
|
-
# @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+.
|
2007
2141
|
#
|
2008
2142
|
# @return [Resources::BinaryFile] An invoice as a PDF.
|
2009
2143
|
# @example
|
@@ -2026,11 +2160,12 @@ module Recurly
|
|
2026
2160
|
|
2027
2161
|
# Collect a pending or past due, automatic invoice
|
2028
2162
|
#
|
2029
|
-
# {https://developers.recurly.com/api/
|
2163
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/collect_invoice collect_invoice api documenation}
|
2030
2164
|
#
|
2031
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+.
|
2032
|
-
# @param
|
2033
|
-
#
|
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+.
|
2034
2169
|
#
|
2035
2170
|
# @return [Resources::Invoice] The updated invoice.
|
2036
2171
|
# @example
|
@@ -2050,15 +2185,16 @@ module Recurly
|
|
2050
2185
|
|
2051
2186
|
# Mark an open invoice as failed
|
2052
2187
|
#
|
2053
|
-
# {https://developers.recurly.com/api/
|
2188
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/mark_invoice_failed mark_invoice_failed api documenation}
|
2054
2189
|
#
|
2055
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+.
|
2056
|
-
# @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+.
|
2057
2193
|
#
|
2058
2194
|
# @return [Resources::Invoice] The updated invoice.
|
2059
2195
|
# @example
|
2060
2196
|
# begin
|
2061
|
-
# invoice = @client.
|
2197
|
+
# invoice = @client.mark_invoice_failed(invoice_id: invoice_id)
|
2062
2198
|
# puts "Failed invoice #{invoice}"
|
2063
2199
|
# rescue Recurly::Errors::NotFoundError
|
2064
2200
|
# # If the resource was not found, you may want to alert the user or
|
@@ -2066,17 +2202,18 @@ module Recurly
|
|
2066
2202
|
# puts "Resource Not Found"
|
2067
2203
|
# end
|
2068
2204
|
#
|
2069
|
-
def
|
2205
|
+
def mark_invoice_failed(invoice_id:, **options)
|
2070
2206
|
path = interpolate_path("/invoices/{invoice_id}/mark_failed", invoice_id: invoice_id)
|
2071
2207
|
put(path, **options)
|
2072
2208
|
end
|
2073
2209
|
|
2074
2210
|
# Mark an open invoice as successful
|
2075
2211
|
#
|
2076
|
-
# {https://developers.recurly.com/api/
|
2212
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/mark_invoice_successful mark_invoice_successful api documenation}
|
2077
2213
|
#
|
2078
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+.
|
2079
|
-
# @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+.
|
2080
2217
|
#
|
2081
2218
|
# @return [Resources::Invoice] The updated invoice.
|
2082
2219
|
# @example
|
@@ -2096,10 +2233,11 @@ module Recurly
|
|
2096
2233
|
|
2097
2234
|
# Reopen a closed, manual invoice
|
2098
2235
|
#
|
2099
|
-
# {https://developers.recurly.com/api/
|
2236
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/reopen_invoice reopen_invoice api documenation}
|
2100
2237
|
#
|
2101
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+.
|
2102
|
-
# @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+.
|
2103
2241
|
#
|
2104
2242
|
# @return [Resources::Invoice] The updated invoice.
|
2105
2243
|
# @example
|
@@ -2119,10 +2257,11 @@ module Recurly
|
|
2119
2257
|
|
2120
2258
|
# Void a credit invoice.
|
2121
2259
|
#
|
2122
|
-
# {https://developers.recurly.com/api/
|
2260
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/void_invoice void_invoice api documenation}
|
2123
2261
|
#
|
2124
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+.
|
2125
|
-
# @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+.
|
2126
2265
|
#
|
2127
2266
|
# @return [Resources::Invoice] The updated invoice.
|
2128
2267
|
# @example
|
@@ -2142,11 +2281,12 @@ module Recurly
|
|
2142
2281
|
|
2143
2282
|
# Record an external payment for a manual invoices.
|
2144
2283
|
#
|
2145
|
-
# {https://developers.recurly.com/api/
|
2284
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/record_external_transaction record_external_transaction api documenation}
|
2146
2285
|
#
|
2147
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+.
|
2148
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}
|
2149
|
-
# @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+.
|
2150
2290
|
#
|
2151
2291
|
# @return [Resources::Transaction] The recorded transaction.
|
2152
2292
|
#
|
@@ -2157,10 +2297,11 @@ module Recurly
|
|
2157
2297
|
|
2158
2298
|
# List an invoice's line items
|
2159
2299
|
#
|
2160
|
-
# {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}
|
2161
2301
|
#
|
2162
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+.
|
2163
|
-
# @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
|
2164
2305
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
2165
2306
|
#
|
2166
2307
|
# *Important notes:*
|
@@ -2172,28 +2313,31 @@ module Recurly
|
|
2172
2313
|
# * Records are returned in an arbitrary order. Since results are all
|
2173
2314
|
# returned at once you can sort the records yourself.
|
2174
2315
|
#
|
2175
|
-
#
|
2176
|
-
#
|
2177
|
-
#
|
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
|
2178
2319
|
# order. In descending order updated records will move behind the cursor and could
|
2179
2320
|
# prevent some records from being returned.
|
2180
2321
|
#
|
2181
|
-
#
|
2322
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
2182
2323
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2183
2324
|
#
|
2184
|
-
#
|
2325
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
2185
2326
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2186
2327
|
#
|
2187
|
-
#
|
2188
|
-
#
|
2189
|
-
#
|
2190
|
-
#
|
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+.
|
2191
2332
|
#
|
2192
2333
|
# @return [Pager<Resources::LineItem>] A list of the invoice's line items.
|
2193
2334
|
# @example
|
2335
|
+
# params = {
|
2336
|
+
# limit: 200
|
2337
|
+
# }
|
2194
2338
|
# line_items = @client.list_invoice_line_items(
|
2195
2339
|
# invoice_id: invoice_id,
|
2196
|
-
#
|
2340
|
+
# params: params
|
2197
2341
|
# )
|
2198
2342
|
# line_items.each do |line_item|
|
2199
2343
|
# puts "Line Item: #{line_item.id}"
|
@@ -2206,10 +2350,11 @@ module Recurly
|
|
2206
2350
|
|
2207
2351
|
# Show the coupon redemptions applied to an invoice
|
2208
2352
|
#
|
2209
|
-
# {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}
|
2210
2354
|
#
|
2211
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+.
|
2212
|
-
# @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
|
2213
2358
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
2214
2359
|
#
|
2215
2360
|
# *Important notes:*
|
@@ -2221,23 +2366,26 @@ module Recurly
|
|
2221
2366
|
# * Records are returned in an arbitrary order. Since results are all
|
2222
2367
|
# returned at once you can sort the records yourself.
|
2223
2368
|
#
|
2224
|
-
#
|
2369
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
2225
2370
|
# order. In descending order updated records will move behind the cursor and could
|
2226
2371
|
# prevent some records from being returned.
|
2227
2372
|
#
|
2228
|
-
#
|
2373
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
2229
2374
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2230
2375
|
#
|
2231
|
-
#
|
2376
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
2232
2377
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2233
2378
|
#
|
2234
|
-
#
|
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+.
|
2235
2380
|
#
|
2236
2381
|
# @return [Pager<Resources::CouponRedemption>] A list of the the coupon redemptions associated with the invoice.
|
2237
2382
|
# @example
|
2383
|
+
# params = {
|
2384
|
+
# limit: 200
|
2385
|
+
# }
|
2238
2386
|
# coupon_redemptions = @client.list_invoice_coupon_redemptions(
|
2239
2387
|
# invoice_id: invoice_id,
|
2240
|
-
#
|
2388
|
+
# params: params
|
2241
2389
|
# )
|
2242
2390
|
# coupon_redemptions.each do |redemption|
|
2243
2391
|
# puts "CouponRedemption: #{redemption.id}"
|
@@ -2250,16 +2398,20 @@ module Recurly
|
|
2250
2398
|
|
2251
2399
|
# List an invoice's related credit or charge invoices
|
2252
2400
|
#
|
2253
|
-
# {https://developers.recurly.com/api/
|
2401
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_related_invoices list_related_invoices api documenation}
|
2254
2402
|
#
|
2255
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+.
|
2256
|
-
# @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+.
|
2257
2406
|
#
|
2258
2407
|
# @return [Pager<Resources::Invoice>] A list of the credit or charge invoices associated with the invoice.
|
2259
2408
|
# @example
|
2409
|
+
# params = {
|
2410
|
+
# limit: 200
|
2411
|
+
# }
|
2260
2412
|
# invoices = @client.list_related_invoices(
|
2261
2413
|
# invoice_id: invoice_id,
|
2262
|
-
#
|
2414
|
+
# params: params
|
2263
2415
|
# )
|
2264
2416
|
# invoices.each do |invoice|
|
2265
2417
|
# puts "Invoice: #{invoice.number}"
|
@@ -2272,11 +2424,12 @@ module Recurly
|
|
2272
2424
|
|
2273
2425
|
# Refund an invoice
|
2274
2426
|
#
|
2275
|
-
# {https://developers.recurly.com/api/
|
2427
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/refund_invoice refund_invoice api documenation}
|
2276
2428
|
#
|
2277
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+.
|
2278
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}
|
2279
|
-
# @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+.
|
2280
2433
|
#
|
2281
2434
|
# @return [Resources::Invoice] Returns the new credit invoice.
|
2282
2435
|
# @example
|
@@ -2303,9 +2456,10 @@ module Recurly
|
|
2303
2456
|
|
2304
2457
|
# List a site's line items
|
2305
2458
|
#
|
2306
|
-
# {https://developers.recurly.com/api/
|
2459
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_line_items list_line_items api documenation}
|
2307
2460
|
#
|
2308
|
-
# @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
|
2309
2463
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
2310
2464
|
#
|
2311
2465
|
# *Important notes:*
|
@@ -2317,27 +2471,30 @@ module Recurly
|
|
2317
2471
|
# * Records are returned in an arbitrary order. Since results are all
|
2318
2472
|
# returned at once you can sort the records yourself.
|
2319
2473
|
#
|
2320
|
-
#
|
2321
|
-
#
|
2322
|
-
#
|
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
|
2323
2477
|
# order. In descending order updated records will move behind the cursor and could
|
2324
2478
|
# prevent some records from being returned.
|
2325
2479
|
#
|
2326
|
-
#
|
2480
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
2327
2481
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2328
2482
|
#
|
2329
|
-
#
|
2483
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
2330
2484
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2331
2485
|
#
|
2332
|
-
#
|
2333
|
-
#
|
2334
|
-
#
|
2335
|
-
#
|
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+.
|
2336
2490
|
#
|
2337
2491
|
# @return [Pager<Resources::LineItem>] A list of the site's line items.
|
2338
2492
|
# @example
|
2339
|
-
#
|
2493
|
+
# params = {
|
2340
2494
|
# limit: 200
|
2495
|
+
# }
|
2496
|
+
# line_items = @client.list_line_items(
|
2497
|
+
# params: params
|
2341
2498
|
# )
|
2342
2499
|
# line_items.each do |line_item|
|
2343
2500
|
# puts "LineItem: #{line_item.id}"
|
@@ -2350,10 +2507,11 @@ module Recurly
|
|
2350
2507
|
|
2351
2508
|
# Fetch a line item
|
2352
2509
|
#
|
2353
|
-
# {https://developers.recurly.com/api/
|
2510
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_line_item get_line_item api documenation}
|
2354
2511
|
#
|
2355
2512
|
# @param line_item_id [String] Line Item ID.
|
2356
|
-
# @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+.
|
2357
2515
|
#
|
2358
2516
|
# @return [Resources::LineItem] A line item.
|
2359
2517
|
# @example
|
@@ -2373,10 +2531,11 @@ module Recurly
|
|
2373
2531
|
|
2374
2532
|
# Delete an uninvoiced line item
|
2375
2533
|
#
|
2376
|
-
# {https://developers.recurly.com/api/
|
2534
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_line_item remove_line_item api documenation}
|
2377
2535
|
#
|
2378
2536
|
# @param line_item_id [String] Line Item ID.
|
2379
|
-
# @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+.
|
2380
2539
|
#
|
2381
2540
|
# @return [Resources::Empty] Line item deleted.
|
2382
2541
|
# @example
|
@@ -2398,9 +2557,10 @@ module Recurly
|
|
2398
2557
|
|
2399
2558
|
# List a site's plans
|
2400
2559
|
#
|
2401
|
-
# {https://developers.recurly.com/api/
|
2560
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_plans list_plans api documenation}
|
2402
2561
|
#
|
2403
|
-
# @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
|
2404
2564
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
2405
2565
|
#
|
2406
2566
|
# *Important notes:*
|
@@ -2412,24 +2572,27 @@ module Recurly
|
|
2412
2572
|
# * Records are returned in an arbitrary order. Since results are all
|
2413
2573
|
# returned at once you can sort the records yourself.
|
2414
2574
|
#
|
2415
|
-
#
|
2416
|
-
#
|
2417
|
-
#
|
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
|
2418
2578
|
# order. In descending order updated records will move behind the cursor and could
|
2419
2579
|
# prevent some records from being returned.
|
2420
2580
|
#
|
2421
|
-
#
|
2581
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
2422
2582
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2423
2583
|
#
|
2424
|
-
#
|
2584
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
2425
2585
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2426
2586
|
#
|
2427
|
-
#
|
2428
|
-
#
|
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+.
|
2429
2589
|
#
|
2430
2590
|
# @return [Pager<Resources::Plan>] A list of plans.
|
2431
2591
|
# @example
|
2432
|
-
#
|
2592
|
+
# params = {
|
2593
|
+
# limit: 200
|
2594
|
+
# }
|
2595
|
+
# plans = @client.list_plans(params: params)
|
2433
2596
|
# plans.each do |plan|
|
2434
2597
|
# puts "Plan: #{plan.code}"
|
2435
2598
|
# end
|
@@ -2441,10 +2604,11 @@ module Recurly
|
|
2441
2604
|
|
2442
2605
|
# Create a plan
|
2443
2606
|
#
|
2444
|
-
# {https://developers.recurly.com/api/
|
2607
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_plan create_plan api documenation}
|
2445
2608
|
#
|
2446
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}
|
2447
|
-
# @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+.
|
2448
2612
|
#
|
2449
2613
|
# @return [Resources::Plan] A plan.
|
2450
2614
|
# @example
|
@@ -2481,10 +2645,11 @@ module Recurly
|
|
2481
2645
|
|
2482
2646
|
# Fetch a plan
|
2483
2647
|
#
|
2484
|
-
# {https://developers.recurly.com/api/
|
2648
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_plan get_plan api documenation}
|
2485
2649
|
#
|
2486
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+.
|
2487
|
-
# @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+.
|
2488
2653
|
#
|
2489
2654
|
# @return [Resources::Plan] A plan.
|
2490
2655
|
# @example
|
@@ -2504,11 +2669,12 @@ module Recurly
|
|
2504
2669
|
|
2505
2670
|
# Update a plan
|
2506
2671
|
#
|
2507
|
-
# {https://developers.recurly.com/api/
|
2672
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_plan update_plan api documenation}
|
2508
2673
|
#
|
2509
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+.
|
2510
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}
|
2511
|
-
# @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+.
|
2512
2678
|
#
|
2513
2679
|
# @return [Resources::Plan] A plan.
|
2514
2680
|
# @example
|
@@ -2531,10 +2697,11 @@ module Recurly
|
|
2531
2697
|
|
2532
2698
|
# Remove a plan
|
2533
2699
|
#
|
2534
|
-
# {https://developers.recurly.com/api/
|
2700
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_plan remove_plan api documenation}
|
2535
2701
|
#
|
2536
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+.
|
2537
|
-
# @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+.
|
2538
2705
|
#
|
2539
2706
|
# @return [Resources::Plan] Plan deleted
|
2540
2707
|
# @example
|
@@ -2554,10 +2721,11 @@ module Recurly
|
|
2554
2721
|
|
2555
2722
|
# List a plan's add-ons
|
2556
2723
|
#
|
2557
|
-
# {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}
|
2558
2725
|
#
|
2559
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+.
|
2560
|
-
# @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
|
2561
2729
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
2562
2730
|
#
|
2563
2731
|
# *Important notes:*
|
@@ -2569,26 +2737,29 @@ module Recurly
|
|
2569
2737
|
# * Records are returned in an arbitrary order. Since results are all
|
2570
2738
|
# returned at once you can sort the records yourself.
|
2571
2739
|
#
|
2572
|
-
#
|
2573
|
-
#
|
2574
|
-
#
|
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
|
2575
2743
|
# order. In descending order updated records will move behind the cursor and could
|
2576
2744
|
# prevent some records from being returned.
|
2577
2745
|
#
|
2578
|
-
#
|
2746
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
2579
2747
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2580
2748
|
#
|
2581
|
-
#
|
2749
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
2582
2750
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2583
2751
|
#
|
2584
|
-
#
|
2585
|
-
#
|
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+.
|
2586
2754
|
#
|
2587
2755
|
# @return [Pager<Resources::AddOn>] A list of add-ons.
|
2588
2756
|
# @example
|
2757
|
+
# params = {
|
2758
|
+
# limit: 200
|
2759
|
+
# }
|
2589
2760
|
# add_ons = @client.list_plan_add_ons(
|
2590
2761
|
# plan_id: plan_id,
|
2591
|
-
#
|
2762
|
+
# params: params
|
2592
2763
|
# )
|
2593
2764
|
# add_ons.each do |add_on|
|
2594
2765
|
# puts "AddOn: #{add_on.code}"
|
@@ -2601,11 +2772,12 @@ module Recurly
|
|
2601
2772
|
|
2602
2773
|
# Create an add-on
|
2603
2774
|
#
|
2604
|
-
# {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}
|
2605
2776
|
#
|
2606
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+.
|
2607
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}
|
2608
|
-
# @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+.
|
2609
2781
|
#
|
2610
2782
|
# @return [Resources::AddOn] An add-on.
|
2611
2783
|
# @example
|
@@ -2636,11 +2808,12 @@ module Recurly
|
|
2636
2808
|
|
2637
2809
|
# Fetch a plan's add-on
|
2638
2810
|
#
|
2639
|
-
# {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}
|
2640
2812
|
#
|
2641
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+.
|
2642
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+.
|
2643
|
-
# @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+.
|
2644
2817
|
#
|
2645
2818
|
# @return [Resources::AddOn] An add-on.
|
2646
2819
|
# @example
|
@@ -2662,12 +2835,13 @@ module Recurly
|
|
2662
2835
|
|
2663
2836
|
# Update an add-on
|
2664
2837
|
#
|
2665
|
-
# {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}
|
2666
2839
|
#
|
2667
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+.
|
2668
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+.
|
2669
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}
|
2670
|
-
# @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+.
|
2671
2845
|
#
|
2672
2846
|
# @return [Resources::AddOn] An add-on.
|
2673
2847
|
# @example
|
@@ -2694,11 +2868,12 @@ module Recurly
|
|
2694
2868
|
|
2695
2869
|
# Remove an add-on
|
2696
2870
|
#
|
2697
|
-
# {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}
|
2698
2872
|
#
|
2699
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+.
|
2700
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+.
|
2701
|
-
# @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+.
|
2702
2877
|
#
|
2703
2878
|
# @return [Resources::AddOn] Add-on deleted
|
2704
2879
|
# @example
|
@@ -2721,9 +2896,10 @@ module Recurly
|
|
2721
2896
|
|
2722
2897
|
# List a site's add-ons
|
2723
2898
|
#
|
2724
|
-
# {https://developers.recurly.com/api/
|
2899
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_add_ons list_add_ons api documenation}
|
2725
2900
|
#
|
2726
|
-
# @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
|
2727
2903
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
2728
2904
|
#
|
2729
2905
|
# *Important notes:*
|
@@ -2735,25 +2911,28 @@ module Recurly
|
|
2735
2911
|
# * Records are returned in an arbitrary order. Since results are all
|
2736
2912
|
# returned at once you can sort the records yourself.
|
2737
2913
|
#
|
2738
|
-
#
|
2739
|
-
#
|
2740
|
-
#
|
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
|
2741
2917
|
# order. In descending order updated records will move behind the cursor and could
|
2742
2918
|
# prevent some records from being returned.
|
2743
2919
|
#
|
2744
|
-
#
|
2920
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
2745
2921
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2746
2922
|
#
|
2747
|
-
#
|
2923
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
2748
2924
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2749
2925
|
#
|
2750
|
-
#
|
2751
|
-
#
|
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+.
|
2752
2928
|
#
|
2753
2929
|
# @return [Pager<Resources::AddOn>] A list of add-ons.
|
2754
2930
|
# @example
|
2755
|
-
#
|
2931
|
+
# params = {
|
2756
2932
|
# limit: 200
|
2933
|
+
# }
|
2934
|
+
# add_ons = @client.list_add_ons(
|
2935
|
+
# params: params
|
2757
2936
|
# )
|
2758
2937
|
# add_ons.each do |add_on|
|
2759
2938
|
# puts "AddOn: #{add_on.code}"
|
@@ -2766,10 +2945,11 @@ module Recurly
|
|
2766
2945
|
|
2767
2946
|
# Fetch an add-on
|
2768
2947
|
#
|
2769
|
-
# {https://developers.recurly.com/api/
|
2948
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_add_on get_add_on api documenation}
|
2770
2949
|
#
|
2771
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+.
|
2772
|
-
# @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+.
|
2773
2953
|
#
|
2774
2954
|
# @return [Resources::AddOn] An add-on.
|
2775
2955
|
# @example
|
@@ -2789,9 +2969,10 @@ module Recurly
|
|
2789
2969
|
|
2790
2970
|
# List a site's shipping methods
|
2791
2971
|
#
|
2792
|
-
# {https://developers.recurly.com/api/
|
2972
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_shipping_methods list_shipping_methods api documenation}
|
2793
2973
|
#
|
2794
|
-
# @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
|
2795
2976
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
2796
2977
|
#
|
2797
2978
|
# *Important notes:*
|
@@ -2803,24 +2984,27 @@ module Recurly
|
|
2803
2984
|
# * Records are returned in an arbitrary order. Since results are all
|
2804
2985
|
# returned at once you can sort the records yourself.
|
2805
2986
|
#
|
2806
|
-
#
|
2807
|
-
#
|
2808
|
-
#
|
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
|
2809
2990
|
# order. In descending order updated records will move behind the cursor and could
|
2810
2991
|
# prevent some records from being returned.
|
2811
2992
|
#
|
2812
|
-
#
|
2993
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
2813
2994
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2814
2995
|
#
|
2815
|
-
#
|
2996
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
2816
2997
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2817
2998
|
#
|
2818
|
-
#
|
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+.
|
2819
3000
|
#
|
2820
3001
|
# @return [Pager<Resources::ShippingMethod>] A list of the site's shipping methods.
|
2821
3002
|
# @example
|
2822
|
-
#
|
3003
|
+
# params = {
|
2823
3004
|
# limit: 200
|
3005
|
+
# }
|
3006
|
+
# shipping_methods = @client.list_shipping_methods(
|
3007
|
+
# params: params
|
2824
3008
|
# )
|
2825
3009
|
# shipping_methods.each do |shipping_method|
|
2826
3010
|
# puts "Shipping Method: #{shipping_method.code}"
|
@@ -2833,10 +3017,11 @@ module Recurly
|
|
2833
3017
|
|
2834
3018
|
# Create a new shipping method
|
2835
3019
|
#
|
2836
|
-
# {https://developers.recurly.com/api/
|
3020
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_shipping_method create_shipping_method api documenation}
|
2837
3021
|
#
|
2838
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}
|
2839
|
-
# @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+.
|
2840
3025
|
#
|
2841
3026
|
# @return [Resources::ShippingMethod] A new shipping method.
|
2842
3027
|
#
|
@@ -2847,25 +3032,27 @@ module Recurly
|
|
2847
3032
|
|
2848
3033
|
# Fetch a shipping method
|
2849
3034
|
#
|
2850
|
-
# {https://developers.recurly.com/api/
|
3035
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_shipping_method get_shipping_method api documenation}
|
2851
3036
|
#
|
2852
|
-
# @param
|
2853
|
-
# @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+.
|
2854
3040
|
#
|
2855
3041
|
# @return [Resources::ShippingMethod] A shipping method.
|
2856
3042
|
#
|
2857
|
-
def get_shipping_method(
|
2858
|
-
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)
|
2859
3045
|
get(path, **options)
|
2860
3046
|
end
|
2861
3047
|
|
2862
3048
|
# Update an active Shipping Method
|
2863
3049
|
#
|
2864
|
-
# {https://developers.recurly.com/api/
|
3050
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_shipping_method update_shipping_method api documenation}
|
2865
3051
|
#
|
2866
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+.
|
2867
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}
|
2868
|
-
# @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+.
|
2869
3056
|
#
|
2870
3057
|
# @return [Resources::ShippingMethod] The updated shipping method.
|
2871
3058
|
#
|
@@ -2876,10 +3063,11 @@ module Recurly
|
|
2876
3063
|
|
2877
3064
|
# Deactivate a shipping method
|
2878
3065
|
#
|
2879
|
-
# {https://developers.recurly.com/api/
|
3066
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/deactivate_shipping_method deactivate_shipping_method api documenation}
|
2880
3067
|
#
|
2881
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+.
|
2882
|
-
# @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+.
|
2883
3071
|
#
|
2884
3072
|
# @return [Resources::ShippingMethod] A shipping method.
|
2885
3073
|
#
|
@@ -2890,9 +3078,10 @@ module Recurly
|
|
2890
3078
|
|
2891
3079
|
# List a site's subscriptions
|
2892
3080
|
#
|
2893
|
-
# {https://developers.recurly.com/api/
|
3081
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_subscriptions list_subscriptions api documenation}
|
2894
3082
|
#
|
2895
|
-
# @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
|
2896
3085
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
2897
3086
|
#
|
2898
3087
|
# *Important notes:*
|
@@ -2904,29 +3093,32 @@ module Recurly
|
|
2904
3093
|
# * Records are returned in an arbitrary order. Since results are all
|
2905
3094
|
# returned at once you can sort the records yourself.
|
2906
3095
|
#
|
2907
|
-
#
|
2908
|
-
#
|
2909
|
-
#
|
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
|
2910
3099
|
# order. In descending order updated records will move behind the cursor and could
|
2911
3100
|
# prevent some records from being returned.
|
2912
3101
|
#
|
2913
|
-
#
|
3102
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
2914
3103
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2915
3104
|
#
|
2916
|
-
#
|
3105
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
2917
3106
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
2918
3107
|
#
|
2919
|
-
#
|
3108
|
+
# :state [String] Filter by state.
|
2920
3109
|
#
|
2921
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.
|
2922
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.
|
2923
3112
|
# - When +state=live+, only subscriptions that are in an active, canceled, or future state or are in trial will be returned.
|
2924
3113
|
#
|
2925
|
-
#
|
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+.
|
2926
3115
|
#
|
2927
3116
|
# @return [Pager<Resources::Subscription>] A list of the site's subscriptions.
|
2928
3117
|
# @example
|
2929
|
-
#
|
3118
|
+
# params = {
|
3119
|
+
# limit: 200
|
3120
|
+
# }
|
3121
|
+
# subscriptions = @client.list_subscriptions(params: params)
|
2930
3122
|
# subscriptions.each do |subscription|
|
2931
3123
|
# puts "Subscription: #{subscription.uuid}"
|
2932
3124
|
# end
|
@@ -2938,10 +3130,11 @@ module Recurly
|
|
2938
3130
|
|
2939
3131
|
# Create a new subscription
|
2940
3132
|
#
|
2941
|
-
# {https://developers.recurly.com/api/
|
3133
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_subscription create_subscription api documenation}
|
2942
3134
|
#
|
2943
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}
|
2944
|
-
# @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+.
|
2945
3138
|
#
|
2946
3139
|
# @return [Resources::Subscription] A subscription.
|
2947
3140
|
# @example
|
@@ -2972,10 +3165,11 @@ module Recurly
|
|
2972
3165
|
|
2973
3166
|
# Fetch a subscription
|
2974
3167
|
#
|
2975
|
-
# {https://developers.recurly.com/api/
|
3168
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_subscription get_subscription api documenation}
|
2976
3169
|
#
|
2977
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+.
|
2978
|
-
# @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+.
|
2979
3173
|
#
|
2980
3174
|
# @return [Resources::Subscription] A subscription.
|
2981
3175
|
# @example
|
@@ -2995,13 +3189,14 @@ module Recurly
|
|
2995
3189
|
get(path, **options)
|
2996
3190
|
end
|
2997
3191
|
|
2998
|
-
#
|
3192
|
+
# Update a subscription
|
2999
3193
|
#
|
3000
|
-
# {https://developers.recurly.com/api/
|
3194
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_subscription update_subscription api documenation}
|
3001
3195
|
#
|
3002
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+.
|
3003
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}
|
3004
|
-
# @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+.
|
3005
3200
|
#
|
3006
3201
|
# @return [Resources::Subscription] A subscription.
|
3007
3202
|
# @example
|
@@ -3010,7 +3205,7 @@ module Recurly
|
|
3010
3205
|
# customer_notes: "New Notes",
|
3011
3206
|
# terms_and_conditions: "New ToC"
|
3012
3207
|
# }
|
3013
|
-
# subscription = @client.
|
3208
|
+
# subscription = @client.update_subscription(
|
3014
3209
|
# subscription_id: subscription_id,
|
3015
3210
|
# body: subscription_update
|
3016
3211
|
# )
|
@@ -3021,17 +3216,18 @@ module Recurly
|
|
3021
3216
|
# puts "ValidationError: #{e.recurly_error.params}"
|
3022
3217
|
# end
|
3023
3218
|
#
|
3024
|
-
def
|
3219
|
+
def update_subscription(subscription_id:, body:, **options)
|
3025
3220
|
path = interpolate_path("/subscriptions/{subscription_id}", subscription_id: subscription_id)
|
3026
3221
|
put(path, body, Requests::SubscriptionUpdate, **options)
|
3027
3222
|
end
|
3028
3223
|
|
3029
3224
|
# Terminate a subscription
|
3030
3225
|
#
|
3031
|
-
# {https://developers.recurly.com/api/
|
3226
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/terminate_subscription terminate_subscription api documenation}
|
3032
3227
|
#
|
3033
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+.
|
3034
|
-
# @param
|
3229
|
+
# @param params [Hash] Optional query string parameters:
|
3230
|
+
# :refund [String] The type of refund to perform:
|
3035
3231
|
#
|
3036
3232
|
# * +full+ - Performs a full refund of the last invoice for the current subscription term.
|
3037
3233
|
# * +partial+ - Prorates a refund based on the amount of time remaining in the current bill cycle.
|
@@ -3041,7 +3237,8 @@ module Recurly
|
|
3041
3237
|
#
|
3042
3238
|
# You may also terminate a subscription with no refund and then manually refund specific invoices.
|
3043
3239
|
#
|
3044
|
-
#
|
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+.
|
3045
3242
|
#
|
3046
3243
|
# @return [Resources::Subscription] An expired subscription.
|
3047
3244
|
# @example
|
@@ -3063,11 +3260,12 @@ module Recurly
|
|
3063
3260
|
|
3064
3261
|
# Cancel a subscription
|
3065
3262
|
#
|
3066
|
-
# {https://developers.recurly.com/api/
|
3263
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/cancel_subscription cancel_subscription api documenation}
|
3067
3264
|
#
|
3068
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+.
|
3069
|
-
# @param
|
3070
|
-
#
|
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+.
|
3071
3269
|
#
|
3072
3270
|
# @return [Resources::Subscription] A canceled or failed subscription.
|
3073
3271
|
# @example
|
@@ -3089,10 +3287,11 @@ module Recurly
|
|
3089
3287
|
|
3090
3288
|
# Reactivate a canceled subscription
|
3091
3289
|
#
|
3092
|
-
# {https://developers.recurly.com/api/
|
3290
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/reactivate_subscription reactivate_subscription api documenation}
|
3093
3291
|
#
|
3094
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+.
|
3095
|
-
# @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+.
|
3096
3295
|
#
|
3097
3296
|
# @return [Resources::Subscription] An active subscription.
|
3098
3297
|
# @example
|
@@ -3114,11 +3313,12 @@ module Recurly
|
|
3114
3313
|
|
3115
3314
|
# Pause subscription
|
3116
3315
|
#
|
3117
|
-
# {https://developers.recurly.com/api/
|
3316
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/pause_subscription pause_subscription api documenation}
|
3118
3317
|
#
|
3119
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+.
|
3120
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}
|
3121
|
-
# @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+.
|
3122
3322
|
#
|
3123
3323
|
# @return [Resources::Subscription] A subscription.
|
3124
3324
|
# @example
|
@@ -3144,10 +3344,11 @@ module Recurly
|
|
3144
3344
|
|
3145
3345
|
# Resume subscription
|
3146
3346
|
#
|
3147
|
-
# {https://developers.recurly.com/api/
|
3347
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/resume_subscription resume_subscription api documenation}
|
3148
3348
|
#
|
3149
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+.
|
3150
|
-
# @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+.
|
3151
3352
|
#
|
3152
3353
|
# @return [Resources::Subscription] A subscription.
|
3153
3354
|
# @example
|
@@ -3169,10 +3370,11 @@ module Recurly
|
|
3169
3370
|
|
3170
3371
|
# Convert trial subscription
|
3171
3372
|
#
|
3172
|
-
# {https://developers.recurly.com/api/
|
3373
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/convert_trial convert_trial api documenation}
|
3173
3374
|
#
|
3174
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+.
|
3175
|
-
# @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+.
|
3176
3378
|
#
|
3177
3379
|
# @return [Resources::Subscription] A subscription.
|
3178
3380
|
#
|
@@ -3183,10 +3385,11 @@ module Recurly
|
|
3183
3385
|
|
3184
3386
|
# Fetch a subscription's pending change
|
3185
3387
|
#
|
3186
|
-
# {https://developers.recurly.com/api/
|
3388
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_subscription_change get_subscription_change api documenation}
|
3187
3389
|
#
|
3188
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+.
|
3189
|
-
# @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+.
|
3190
3393
|
#
|
3191
3394
|
# @return [Resources::SubscriptionChange] A subscription's pending change.
|
3192
3395
|
# @example
|
@@ -3208,11 +3411,12 @@ module Recurly
|
|
3208
3411
|
|
3209
3412
|
# Create a new subscription change
|
3210
3413
|
#
|
3211
|
-
# {https://developers.recurly.com/api/
|
3414
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_subscription_change create_subscription_change api documenation}
|
3212
3415
|
#
|
3213
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+.
|
3214
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}
|
3215
|
-
# @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+.
|
3216
3420
|
#
|
3217
3421
|
# @return [Resources::SubscriptionChange] A subscription change.
|
3218
3422
|
# @example
|
@@ -3239,10 +3443,11 @@ module Recurly
|
|
3239
3443
|
|
3240
3444
|
# Delete the pending subscription change
|
3241
3445
|
#
|
3242
|
-
# {https://developers.recurly.com/api/
|
3446
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_subscription_change remove_subscription_change api documenation}
|
3243
3447
|
#
|
3244
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+.
|
3245
|
-
# @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+.
|
3246
3451
|
#
|
3247
3452
|
# @return [Resources::Empty] Subscription change was deleted.
|
3248
3453
|
# @example
|
@@ -3264,13 +3469,14 @@ module Recurly
|
|
3264
3469
|
|
3265
3470
|
# Preview a new subscription change
|
3266
3471
|
#
|
3267
|
-
# {https://developers.recurly.com/api/
|
3472
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/preview_subscription_change preview_subscription_change api documenation}
|
3268
3473
|
#
|
3269
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+.
|
3270
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}
|
3271
|
-
# @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+.
|
3272
3478
|
#
|
3273
|
-
# @return [Resources::
|
3479
|
+
# @return [Resources::SubscriptionChange] A subscription change.
|
3274
3480
|
#
|
3275
3481
|
def preview_subscription_change(subscription_id:, body:, **options)
|
3276
3482
|
path = interpolate_path("/subscriptions/{subscription_id}/change/preview", subscription_id: subscription_id)
|
@@ -3279,10 +3485,11 @@ module Recurly
|
|
3279
3485
|
|
3280
3486
|
# List a subscription's invoices
|
3281
3487
|
#
|
3282
|
-
# {https://developers.recurly.com/api/
|
3488
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_subscription_invoices list_subscription_invoices api documenation}
|
3283
3489
|
#
|
3284
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+.
|
3285
|
-
# @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
|
3286
3493
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
3287
3494
|
#
|
3288
3495
|
# *Important notes:*
|
@@ -3294,31 +3501,34 @@ module Recurly
|
|
3294
3501
|
# * Records are returned in an arbitrary order. Since results are all
|
3295
3502
|
# returned at once you can sort the records yourself.
|
3296
3503
|
#
|
3297
|
-
#
|
3298
|
-
#
|
3299
|
-
#
|
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
|
3300
3507
|
# order. In descending order updated records will move behind the cursor and could
|
3301
3508
|
# prevent some records from being returned.
|
3302
3509
|
#
|
3303
|
-
#
|
3510
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
3304
3511
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3305
3512
|
#
|
3306
|
-
#
|
3513
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
3307
3514
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3308
3515
|
#
|
3309
|
-
#
|
3516
|
+
# :type [String] Filter by type when:
|
3310
3517
|
# - +type=charge+, only charge invoices will be returned.
|
3311
3518
|
# - +type=credit+, only credit invoices will be returned.
|
3312
3519
|
# - +type=non-legacy+, only charge and credit invoices will be returned.
|
3313
3520
|
# - +type=legacy+, only legacy invoices will be returned.
|
3314
3521
|
#
|
3315
|
-
#
|
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+.
|
3316
3523
|
#
|
3317
3524
|
# @return [Pager<Resources::Invoice>] A list of the subscription's invoices.
|
3318
3525
|
# @example
|
3526
|
+
# params = {
|
3527
|
+
# limit: 200
|
3528
|
+
# }
|
3319
3529
|
# invoices = @client.list_subscription_invoices(
|
3320
3530
|
# subscription_id: subscription_id,
|
3321
|
-
#
|
3531
|
+
# params: params
|
3322
3532
|
# )
|
3323
3533
|
# invoices.each do |invoice|
|
3324
3534
|
# puts "Invoice: #{invoice.number}"
|
@@ -3331,10 +3541,11 @@ module Recurly
|
|
3331
3541
|
|
3332
3542
|
# List a subscription's line items
|
3333
3543
|
#
|
3334
|
-
# {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}
|
3335
3545
|
#
|
3336
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+.
|
3337
|
-
# @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
|
3338
3549
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
3339
3550
|
#
|
3340
3551
|
# *Important notes:*
|
@@ -3346,28 +3557,31 @@ module Recurly
|
|
3346
3557
|
# * Records are returned in an arbitrary order. Since results are all
|
3347
3558
|
# returned at once you can sort the records yourself.
|
3348
3559
|
#
|
3349
|
-
#
|
3350
|
-
#
|
3351
|
-
#
|
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
|
3352
3563
|
# order. In descending order updated records will move behind the cursor and could
|
3353
3564
|
# prevent some records from being returned.
|
3354
3565
|
#
|
3355
|
-
#
|
3566
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
3356
3567
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3357
3568
|
#
|
3358
|
-
#
|
3569
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
3359
3570
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3360
3571
|
#
|
3361
|
-
#
|
3362
|
-
#
|
3363
|
-
#
|
3364
|
-
#
|
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+.
|
3365
3576
|
#
|
3366
3577
|
# @return [Pager<Resources::LineItem>] A list of the subscription's line items.
|
3367
3578
|
# @example
|
3579
|
+
# params = {
|
3580
|
+
# limit: 200
|
3581
|
+
# }
|
3368
3582
|
# line_items = @client.list_subscription_line_items(
|
3369
3583
|
# subscription_id: subscription_id,
|
3370
|
-
#
|
3584
|
+
# params: params
|
3371
3585
|
# )
|
3372
3586
|
# line_items.each do |line_item|
|
3373
3587
|
# puts "LineItem: #{line_item.id}"
|
@@ -3380,10 +3594,11 @@ module Recurly
|
|
3380
3594
|
|
3381
3595
|
# Show the coupon redemptions for a subscription
|
3382
3596
|
#
|
3383
|
-
# {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}
|
3384
3598
|
#
|
3385
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+.
|
3386
|
-
# @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
|
3387
3602
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
3388
3603
|
#
|
3389
3604
|
# *Important notes:*
|
@@ -3395,23 +3610,26 @@ module Recurly
|
|
3395
3610
|
# * Records are returned in an arbitrary order. Since results are all
|
3396
3611
|
# returned at once you can sort the records yourself.
|
3397
3612
|
#
|
3398
|
-
#
|
3613
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
3399
3614
|
# order. In descending order updated records will move behind the cursor and could
|
3400
3615
|
# prevent some records from being returned.
|
3401
3616
|
#
|
3402
|
-
#
|
3617
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
3403
3618
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3404
3619
|
#
|
3405
|
-
#
|
3620
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
3406
3621
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3407
3622
|
#
|
3408
|
-
#
|
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+.
|
3409
3624
|
#
|
3410
3625
|
# @return [Pager<Resources::CouponRedemption>] A list of the the coupon redemptions on a subscription.
|
3411
3626
|
# @example
|
3627
|
+
# params = {
|
3628
|
+
# limit: 200
|
3629
|
+
# }
|
3412
3630
|
# coupon_redemptions = @client.list_subscription_coupon_redemptions(
|
3413
3631
|
# subscription_id: subscription_id,
|
3414
|
-
#
|
3632
|
+
# params: params
|
3415
3633
|
# )
|
3416
3634
|
# coupon_redemptions.each do |redemption|
|
3417
3635
|
# puts "CouponRedemption: #{redemption.id}"
|
@@ -3424,11 +3642,12 @@ module Recurly
|
|
3424
3642
|
|
3425
3643
|
# List a subscription add-on's usage records
|
3426
3644
|
#
|
3427
|
-
# {https://developers.recurly.com/api/
|
3645
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_usage list_usage api documenation}
|
3428
3646
|
#
|
3429
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+.
|
3430
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+.
|
3431
|
-
# @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
|
3432
3651
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
3433
3652
|
#
|
3434
3653
|
# *Important notes:*
|
@@ -3440,20 +3659,20 @@ module Recurly
|
|
3440
3659
|
# * Records are returned in an arbitrary order. Since results are all
|
3441
3660
|
# returned at once you can sort the records yourself.
|
3442
3661
|
#
|
3443
|
-
#
|
3444
|
-
#
|
3445
|
-
#
|
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
|
3446
3665
|
# order. In descending order updated records will move behind the cursor and could
|
3447
3666
|
# prevent some records from being returned.
|
3448
3667
|
#
|
3449
|
-
#
|
3668
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=usage_timestamp+ or +sort=recorded_timestamp+.
|
3450
3669
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3451
3670
|
#
|
3452
|
-
#
|
3671
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=usage_timestamp+ or +sort=recorded_timestamp+.
|
3453
3672
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3454
3673
|
#
|
3455
|
-
#
|
3456
|
-
#
|
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+.
|
3457
3676
|
#
|
3458
3677
|
# @return [Pager<Resources::Usage>] A list of the subscription add-on's usage records.
|
3459
3678
|
#
|
@@ -3464,12 +3683,13 @@ module Recurly
|
|
3464
3683
|
|
3465
3684
|
# Log a usage record on this subscription add-on
|
3466
3685
|
#
|
3467
|
-
# {https://developers.recurly.com/api/
|
3686
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_usage create_usage api documenation}
|
3468
3687
|
#
|
3469
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+.
|
3470
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+.
|
3471
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}
|
3472
|
-
# @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+.
|
3473
3693
|
#
|
3474
3694
|
# @return [Resources::Usage] The created usage record.
|
3475
3695
|
#
|
@@ -3480,10 +3700,11 @@ module Recurly
|
|
3480
3700
|
|
3481
3701
|
# Get a usage record
|
3482
3702
|
#
|
3483
|
-
# {https://developers.recurly.com/api/
|
3703
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_usage get_usage api documenation}
|
3484
3704
|
#
|
3485
3705
|
# @param usage_id [String] Usage Record ID.
|
3486
|
-
# @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+.
|
3487
3708
|
#
|
3488
3709
|
# @return [Resources::Usage] The usage record.
|
3489
3710
|
#
|
@@ -3494,11 +3715,12 @@ module Recurly
|
|
3494
3715
|
|
3495
3716
|
# Update a usage record
|
3496
3717
|
#
|
3497
|
-
# {https://developers.recurly.com/api/
|
3718
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/update_usage update_usage api documenation}
|
3498
3719
|
#
|
3499
3720
|
# @param usage_id [String] Usage Record ID.
|
3500
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}
|
3501
|
-
# @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+.
|
3502
3724
|
#
|
3503
3725
|
# @return [Resources::Usage] The updated usage record.
|
3504
3726
|
#
|
@@ -3509,10 +3731,11 @@ module Recurly
|
|
3509
3731
|
|
3510
3732
|
# Delete a usage record.
|
3511
3733
|
#
|
3512
|
-
# {https://developers.recurly.com/api/
|
3734
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_usage remove_usage api documenation}
|
3513
3735
|
#
|
3514
3736
|
# @param usage_id [String] Usage Record ID.
|
3515
|
-
# @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+.
|
3516
3739
|
#
|
3517
3740
|
# @return [Resources::Empty] Usage was successfully deleted.
|
3518
3741
|
#
|
@@ -3523,9 +3746,10 @@ module Recurly
|
|
3523
3746
|
|
3524
3747
|
# List a site's transactions
|
3525
3748
|
#
|
3526
|
-
# {https://developers.recurly.com/api/
|
3749
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_transactions list_transactions api documenation}
|
3527
3750
|
#
|
3528
|
-
# @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
|
3529
3753
|
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
|
3530
3754
|
#
|
3531
3755
|
# *Important notes:*
|
@@ -3537,25 +3761,28 @@ module Recurly
|
|
3537
3761
|
# * Records are returned in an arbitrary order. Since results are all
|
3538
3762
|
# returned at once you can sort the records yourself.
|
3539
3763
|
#
|
3540
|
-
#
|
3541
|
-
#
|
3542
|
-
#
|
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
|
3543
3767
|
# order. In descending order updated records will move behind the cursor and could
|
3544
3768
|
# prevent some records from being returned.
|
3545
3769
|
#
|
3546
|
-
#
|
3770
|
+
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
|
3547
3771
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3548
3772
|
#
|
3549
|
-
#
|
3773
|
+
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
|
3550
3774
|
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
|
3551
3775
|
#
|
3552
|
-
#
|
3553
|
-
#
|
3554
|
-
#
|
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+.
|
3555
3779
|
#
|
3556
3780
|
# @return [Pager<Resources::Transaction>] A list of the site's transactions.
|
3557
3781
|
# @example
|
3558
|
-
#
|
3782
|
+
# params = {
|
3783
|
+
# limit: 200
|
3784
|
+
# }
|
3785
|
+
# transactions = @client.list_transactions(params: params)
|
3559
3786
|
# transactions.each do |transaction|
|
3560
3787
|
# puts "Transaction: #{transaction.uuid}"
|
3561
3788
|
# end
|
@@ -3567,10 +3794,11 @@ module Recurly
|
|
3567
3794
|
|
3568
3795
|
# Fetch a transaction
|
3569
3796
|
#
|
3570
|
-
# {https://developers.recurly.com/api/
|
3797
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_transaction get_transaction api documenation}
|
3571
3798
|
#
|
3572
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+.
|
3573
|
-
# @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+.
|
3574
3802
|
#
|
3575
3803
|
# @return [Resources::Transaction] A transaction.
|
3576
3804
|
# @example
|
@@ -3590,10 +3818,11 @@ module Recurly
|
|
3590
3818
|
|
3591
3819
|
# Fetch a unique coupon code
|
3592
3820
|
#
|
3593
|
-
# {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}
|
3594
3822
|
#
|
3595
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+.
|
3596
|
-
# @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+.
|
3597
3826
|
#
|
3598
3827
|
# @return [Resources::UniqueCouponCode] A unique coupon code.
|
3599
3828
|
#
|
@@ -3604,10 +3833,11 @@ module Recurly
|
|
3604
3833
|
|
3605
3834
|
# Deactivate a unique coupon code
|
3606
3835
|
#
|
3607
|
-
# {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}
|
3608
3837
|
#
|
3609
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+.
|
3610
|
-
# @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+.
|
3611
3841
|
#
|
3612
3842
|
# @return [Resources::UniqueCouponCode] A unique coupon code.
|
3613
3843
|
#
|
@@ -3618,10 +3848,11 @@ module Recurly
|
|
3618
3848
|
|
3619
3849
|
# Restore a unique coupon code
|
3620
3850
|
#
|
3621
|
-
# {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}
|
3622
3852
|
#
|
3623
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+.
|
3624
|
-
# @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+.
|
3625
3856
|
#
|
3626
3857
|
# @return [Resources::UniqueCouponCode] A unique coupon code.
|
3627
3858
|
#
|
@@ -3632,10 +3863,11 @@ module Recurly
|
|
3632
3863
|
|
3633
3864
|
# Create a new purchase
|
3634
3865
|
#
|
3635
|
-
# {https://developers.recurly.com/api/
|
3866
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/create_purchase create_purchase api documenation}
|
3636
3867
|
#
|
3637
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}
|
3638
|
-
# @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+.
|
3639
3871
|
#
|
3640
3872
|
# @return [Resources::InvoiceCollection] Returns the new invoices
|
3641
3873
|
# @example
|
@@ -3672,10 +3904,11 @@ module Recurly
|
|
3672
3904
|
|
3673
3905
|
# Preview a new purchase
|
3674
3906
|
#
|
3675
|
-
# {https://developers.recurly.com/api/
|
3907
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/preview_purchase preview_purchase api documenation}
|
3676
3908
|
#
|
3677
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}
|
3678
|
-
# @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+.
|
3679
3912
|
#
|
3680
3913
|
# @return [Resources::InvoiceCollection] Returns preview of the new invoices
|
3681
3914
|
# @example
|
@@ -3712,9 +3945,10 @@ module Recurly
|
|
3712
3945
|
|
3713
3946
|
# List the dates that have an available export to download.
|
3714
3947
|
#
|
3715
|
-
# {https://developers.recurly.com/api/
|
3948
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_export_dates get_export_dates api documenation}
|
3716
3949
|
#
|
3717
|
-
# @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+.
|
3718
3952
|
#
|
3719
3953
|
# @return [Resources::ExportDates] Returns a list of dates.
|
3720
3954
|
# @example
|
@@ -3736,10 +3970,11 @@ module Recurly
|
|
3736
3970
|
|
3737
3971
|
# List of the export files that are available to download.
|
3738
3972
|
#
|
3739
|
-
# {https://developers.recurly.com/api/
|
3973
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_export_files get_export_files api documenation}
|
3740
3974
|
#
|
3741
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.
|
3742
|
-
# @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+.
|
3743
3978
|
#
|
3744
3979
|
# @return [Resources::ExportFiles] Returns a list of export files to download.
|
3745
3980
|
# @example
|