recurly 3.18.1 → 3.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/.bumpversion.cfg +1 -1
  3. data/.changelog_config.yaml +11 -0
  4. data/.github/workflows/docs.yml +1 -1
  5. data/.travis.yml +2 -0
  6. data/CHANGELOG.md +231 -163
  7. data/GETTING_STARTED.md +1 -1
  8. data/lib/recurly/client/operations.rb +212 -134
  9. data/lib/recurly/client.rb +5 -3
  10. data/lib/recurly/errors/api_errors.rb +2 -0
  11. data/lib/recurly/pager.rb +1 -1
  12. data/lib/recurly/requests/account_create.rb +4 -0
  13. data/lib/recurly/requests/account_purchase.rb +4 -0
  14. data/lib/recurly/requests/account_update.rb +4 -0
  15. data/lib/recurly/requests/add_on_create.rb +3 -3
  16. data/lib/recurly/requests/add_on_pricing.rb +4 -0
  17. data/lib/recurly/requests/add_on_update.rb +1 -1
  18. data/lib/recurly/requests/address.rb +1 -1
  19. data/lib/recurly/requests/billing_info_create.rb +6 -2
  20. data/lib/recurly/requests/billing_info_verify.rb +14 -0
  21. data/lib/recurly/requests/dunning_campaigns_bulk_update.rb +18 -0
  22. data/lib/recurly/requests/invoice_address.rb +1 -1
  23. data/lib/recurly/requests/invoice_collect.rb +1 -1
  24. data/lib/recurly/requests/line_item_create.rb +6 -2
  25. data/lib/recurly/requests/plan_create.rb +4 -0
  26. data/lib/recurly/requests/plan_pricing.rb +4 -0
  27. data/lib/recurly/requests/plan_update.rb +4 -0
  28. data/lib/recurly/requests/pricing.rb +4 -0
  29. data/lib/recurly/requests/purchase_create.rb +1 -1
  30. data/lib/recurly/requests/shipping_address_create.rb +1 -1
  31. data/lib/recurly/requests/shipping_address_update.rb +1 -1
  32. data/lib/recurly/requests/subscription_change_billing_info_create.rb +14 -0
  33. data/lib/recurly/requests/subscription_change_create.rb +8 -0
  34. data/lib/recurly/requests/subscription_create.rb +6 -2
  35. data/lib/recurly/requests/subscription_pause.rb +1 -1
  36. data/lib/recurly/requests/subscription_purchase.rb +6 -2
  37. data/lib/recurly/requests/subscription_update.rb +5 -1
  38. data/lib/recurly/resources/account.rb +4 -0
  39. data/lib/recurly/resources/account_mini.rb +4 -0
  40. data/lib/recurly/resources/add_on_pricing.rb +4 -0
  41. data/lib/recurly/resources/address.rb +1 -1
  42. data/lib/recurly/resources/billing_info.rb +5 -1
  43. data/lib/recurly/resources/billing_info_updated_by.rb +1 -1
  44. data/lib/recurly/resources/dunning_campaign.rb +50 -0
  45. data/lib/recurly/resources/dunning_campaigns_bulk_update_response.rb +18 -0
  46. data/lib/recurly/resources/dunning_cycle.rb +58 -0
  47. data/lib/recurly/resources/dunning_interval.rb +18 -0
  48. data/lib/recurly/resources/invoice.rb +6 -2
  49. data/lib/recurly/resources/invoice_address.rb +1 -1
  50. data/lib/recurly/resources/line_item.rb +7 -3
  51. data/lib/recurly/resources/payment_method.rb +4 -0
  52. data/lib/recurly/resources/plan.rb +4 -0
  53. data/lib/recurly/resources/plan_pricing.rb +4 -0
  54. data/lib/recurly/resources/pricing.rb +4 -0
  55. data/lib/recurly/resources/shipping_address.rb +1 -1
  56. data/lib/recurly/resources/subscription.rb +4 -0
  57. data/lib/recurly/resources/subscription_change.rb +8 -0
  58. data/lib/recurly/resources/subscription_change_billing_info.rb +14 -0
  59. data/lib/recurly/resources/subscription_change_preview.rb +8 -0
  60. data/lib/recurly/resources/tax_detail.rb +26 -0
  61. data/lib/recurly/resources/tax_info.rb +4 -0
  62. data/lib/recurly/resources/transaction.rb +5 -1
  63. data/lib/recurly/version.rb +1 -1
  64. data/openapi/api.yaml +796 -122
  65. data/scripts/build +2 -2
  66. data/scripts/format +2 -2
  67. data/scripts/prepare-release +43 -29
  68. data/scripts/release +5 -20
  69. metadata +16 -9
  70. data/.github_changelog_generator +0 -8
  71. data/scripts/bump +0 -11
  72. data/scripts/changelog +0 -14
data/openapi/api.yaml CHANGED
@@ -24,6 +24,42 @@ info:
24
24
  Recurly-Version: recurly.v2019-10-10
25
25
  ```
26
26
 
27
+ Recurly's client libraries correspond with API versions as listed below.
28
+
29
+ <table>
30
+ <tr>
31
+ <th>API Version</th>
32
+ <th>Client Library Version</th>
33
+ </tr>
34
+ <tr>
35
+ <td>v2021-02-25</td>
36
+ <td>4.x</td>
37
+ </tr>
38
+ <tr>
39
+ <td>v2019-10-10</td>
40
+ <td>3.x</td>
41
+ </tr>
42
+ </table>
43
+
44
+ Client library releases:
45
+
46
+ * [Node.js](https://github.com/recurly/recurly-client-node/releases)
47
+ * [Python](https://github.com/recurly/recurly-client-python/releases)
48
+ * [.NET](https://github.com/recurly/recurly-client-dotnet/releases)
49
+ * [Ruby](https://github.com/recurly/recurly-client-ruby/releases)
50
+ * [Java](https://github.com/recurly/recurly-client-java/releases)
51
+ * [PHP](https://github.com/recurly/recurly-client-php/releases)
52
+ * [Go](https://github.com/recurly/recurly-client-go/releases)
53
+
54
+ Client libraries follow semantic versioning. For example, [Ruby client library
55
+ version 3.18.1](https://github.com/recurly/recurly-client-ruby/releases/tag/3.18.1)
56
+ represents major version `3`, minor version `18` with patch `1`.
57
+
58
+ We encourage you to update to the latest version of the API and corresponding client library,
59
+ as most recent versions are more performant than their predecessors. See the
60
+ [changelog](https://developers.recurly.com/api/changelog.html) for a comprehensive list of changes
61
+ introduced in the latest API version.
62
+
27
63
  ### Default Versions
28
64
  Specifying a version is required to get a successful response. If you wish to
29
65
  receive the latest version and are willing to accept the risk of breaking changes,
@@ -77,6 +113,8 @@ info:
77
113
  Please consider changing these messages in target system to be better
78
114
  suited to the audience of the system.
79
115
 
116
+ Please see [transaction error codes](https://developers.recurly.com/pages/api-transaction-errors.html) for more details.
117
+
80
118
  ## Pagination
81
119
  ### Response Schema
82
120
  Every GET listing endpoint returns a response with the same schema:
@@ -153,6 +191,7 @@ x-tagGroups:
153
191
  - note
154
192
  - account_acquisition
155
193
  - billing_info
194
+ - billing_infos
156
195
  - subscription
157
196
  - subscription_change
158
197
  - shipping_address
@@ -179,6 +218,7 @@ x-tagGroups:
179
218
  - site
180
219
  - custom_field_definition
181
220
  - shipping_method
221
+ - dunning_campaigns
182
222
  tags:
183
223
  - name: site
184
224
  x-displayName: Site
@@ -191,7 +231,7 @@ tags:
191
231
  description: |-
192
232
  For merchants who sell the same things to many customers, documenting those offerings in a catalog allows for faster charge creation, easier management of offerings, and analytics about your offerings across all sales channels. Because your offerings can be physical, digital, or service-oriented, Recurly collectively calls these offerings "Items".
193
233
 
194
- Recurly's item catalog requires the Credit Invoices and Subscription Billing Terms features to be enabled.
234
+ Recurly's item catalog requires the Credit Invoices feature to be enabled.
195
235
  - name: plan
196
236
  x-displayName: Plan
197
237
  description: A plan tells Recurly how often and how much to charge your customers.
@@ -223,9 +263,15 @@ tags:
223
263
  to match this data with revenue and billing data events in Recurly.
224
264
  - name: billing_info
225
265
  x-displayName: Billing Info
226
- description: An account can have one stored payment method at a time. This can be
227
- a credit card, PayPal, or bank account. Billing info is usually filled out by
228
- the customer upon purchase or when they update their information.
266
+ description: Without the premium Wallet feature, an account can only have one stored
267
+ payment method at a time. Examples include credit cards, PayPal, or bank accounts.
268
+ Billing info is filled out by the customer upon purchase or when they update their
269
+ information.
270
+ - name: billing_infos
271
+ x-displayName: Billing Infos
272
+ description: If the premium Wallet feature is enabled, an account can have multiple
273
+ payment methods stored. Examples include credit cards, PayPal, or bank accounts.
274
+ Primary or backup billing infos can be designated from these endpoints.
229
275
  - name: subscription
230
276
  x-displayName: Subscription
231
277
  description: Subscriptions are created when your customers subscribe to one of your
@@ -286,6 +332,9 @@ tags:
286
332
  - name: automated_exports
287
333
  x-displayName: Automated Exports
288
334
  description: Automated exports of customer data.
335
+ - name: dunning_campaigns
336
+ x-displayName: Dunning Campaigns
337
+ description: Settings used when attempting to dun customers whose payments are declined.
289
338
  paths:
290
339
  "/sites":
291
340
  get:
@@ -1226,7 +1275,6 @@ paths:
1226
1275
  - "$ref": "#/components/parameters/account_id"
1227
1276
  get:
1228
1277
  tags:
1229
- - account
1230
1278
  - account_acquisition
1231
1279
  operationId: get_account_acquisition
1232
1280
  summary: Fetch an account's acquisition data
@@ -1335,7 +1383,6 @@ paths:
1335
1383
  Acquisition: %v\", accountAcq.Id)"
1336
1384
  put:
1337
1385
  tags:
1338
- - account
1339
1386
  - account_acquisition
1340
1387
  operationId: update_account_acquisition
1341
1388
  summary: Update an account's acquisition data
@@ -1503,7 +1550,6 @@ paths:
1503
1550
  Acquisition: %s\", account.Id)"
1504
1551
  delete:
1505
1552
  tags:
1506
- - account
1507
1553
  - account_acquisition
1508
1554
  operationId: remove_account_acquisition
1509
1555
  summary: Remove an account's acquisition data
@@ -1844,7 +1890,6 @@ paths:
1844
1890
  "/sites/{site_id}/accounts/{account_id}/billing_info":
1845
1891
  get:
1846
1892
  tags:
1847
- - account
1848
1893
  - billing_info
1849
1894
  operationId: get_billing_info
1850
1895
  summary: Fetch an account's billing information
@@ -1962,14 +2007,13 @@ paths:
1962
2007
  Info: %v\", billingInfo)"
1963
2008
  put:
1964
2009
  tags:
1965
- - account
1966
2010
  - billing_info
1967
2011
  operationId: update_billing_info
1968
2012
  summary: Set an account's billing information
1969
2013
  description: |
1970
2014
  If you're using Recurly.js to securely submit data from webforms without sending it through your server,
1971
2015
  you can associate the billing information with an account by passing in the `token_id`. The only other
1972
- field permitted with `token_id` is `primary_payment_method`.
2016
+ fields permitted with `token_id` are `primary_payment_method` and/or `backup_payment_method`.
1973
2017
 
1974
2018
  For credit card payments you'll need the following required fields:
1975
2019
 
@@ -2137,7 +2181,6 @@ paths:
2137
2181
  Info: %s\", billingInfo)"
2138
2182
  delete:
2139
2183
  tags:
2140
- - account
2141
2184
  - billing_info
2142
2185
  operationId: remove_billing_info
2143
2186
  summary: Remove an account's billing information
@@ -2244,11 +2287,142 @@ paths:
2244
2287
  {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected
2245
2288
  Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfmt.Printf(\"Removed Billing
2246
2289
  Info: %v\", billingInfo)"
2290
+ "/sites/{site_id}/accounts/{account_id}/billing_info/verify":
2291
+ post:
2292
+ tags:
2293
+ - billing_info
2294
+ operationId: verify_billing_info
2295
+ summary: Verify an account's credit card billing information
2296
+ parameters:
2297
+ - "$ref": "#/components/parameters/site_id"
2298
+ - "$ref": "#/components/parameters/account_id"
2299
+ requestBody:
2300
+ content:
2301
+ application/json:
2302
+ schema:
2303
+ "$ref": "#/components/schemas/BillingInfoVerify"
2304
+ required: false
2305
+ responses:
2306
+ '200':
2307
+ description: Transaction information from verify.
2308
+ content:
2309
+ application/json:
2310
+ schema:
2311
+ "$ref": "#/components/schemas/Transaction"
2312
+ '404':
2313
+ description: Account has no billing information, or incorrect site or account
2314
+ ID.
2315
+ content:
2316
+ application/json:
2317
+ schema:
2318
+ "$ref": "#/components/schemas/Error"
2319
+ default:
2320
+ description: Unexpected error.
2321
+ content:
2322
+ application/json:
2323
+ schema:
2324
+ "$ref": "#/components/schemas/Error"
2325
+ '422':
2326
+ description: Invalid billing information, or error running the verification
2327
+ transaction.
2328
+ content:
2329
+ application/json:
2330
+ schema:
2331
+ "$ref": "#/components/schemas/ErrorMayHaveTransaction"
2332
+ x-code-samples:
2333
+ - lang: Node.js
2334
+ source: |
2335
+ try {
2336
+ const transaction = await client.verifyBillingInfo(accountId)
2337
+ console.log('Fetched Transaction: ', transaction.id)
2338
+ } catch (err) {
2339
+ if (err instanceof recurly.errors.NotFoundError) {
2340
+ // If the request was not found, you may want to alert the user or
2341
+ // just return null
2342
+ console.log('Resource Not Found')
2343
+ } else {
2344
+ // If we don't know what to do with the err, we should
2345
+ // probably re-raise and let our web framework and logger handle it
2346
+ console.log('Unknown Error: ', err)
2347
+ }
2348
+ }
2349
+ - lang: Python
2350
+ source: |
2351
+ try:
2352
+ transaction = client.verify_billing_info(account_id)
2353
+ print("Got Transaction %s" % transaction)
2354
+ except recurly.errors.NotFoundError:
2355
+ # If the resource was not found, you may want to alert the user or
2356
+ # just return nil
2357
+ print("Resource Not Found")
2358
+ - lang: ".NET"
2359
+ source: |
2360
+ try
2361
+ {
2362
+ Transaction transaction = client.VerifyBillingInfo(accountId);
2363
+ Console.WriteLine($"Fetched transaction {transaction.Id}");
2364
+ }
2365
+ catch (Recurly.Errors.NotFound ex)
2366
+ {
2367
+ // If the resource was not found
2368
+ // we may want to alert the user or just return null
2369
+ Console.WriteLine($"Resource Not Found: {ex.Error.Message}");
2370
+ }
2371
+ catch (Recurly.Errors.ApiError ex)
2372
+ {
2373
+ // Use ApiError to catch a generic error from the API
2374
+ Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}");
2375
+ }
2376
+ - lang: Ruby
2377
+ source: |
2378
+ begin
2379
+ transaction = @client.verify_billing_info(account_id: account_id)
2380
+ puts "Got Transaction #{transaction}"
2381
+ rescue Recurly::Errors::NotFoundError
2382
+ # If the resource was not found, you may want to alert the user or
2383
+ # just return nil
2384
+ puts "Resource Not Found"
2385
+ end
2386
+ - lang: Java
2387
+ source: |
2388
+ try {
2389
+ final Transaction transaction = client.verifyBillingInfo(accountId);
2390
+ System.out.println("Fetched transaction " + transaction.getId());
2391
+ } catch (NotFoundException e) {
2392
+ // If the resource was not found
2393
+ // we may want to alert the user or just return null
2394
+ System.out.println("Resource Not Found: " + e.getError().getMessage());
2395
+ } catch (ApiException e) {
2396
+ // Use ApiException to catch a generic error from the API
2397
+ System.out.println("Unexpected Recurly Error: " + e.getError().getMessage());
2398
+ }
2399
+ - lang: PHP
2400
+ source: |
2401
+ try {
2402
+ $transaction = $client->verifyBillingInfo($account_id);
2403
+
2404
+ echo 'Got Transaction:' . PHP_EOL;
2405
+ var_dump($transaction);
2406
+ } catch (\Recurly\Errors\NotFound $e) {
2407
+ // Could not find the resource, you may want to inform the user
2408
+ // or just return a NULL
2409
+ echo 'Could not find resource.' . PHP_EOL;
2410
+ var_dump($e);
2411
+ } catch (\Recurly\RecurlyError $e) {
2412
+ // Something bad happened... tell the user so that they can fix it?
2413
+ echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL;
2414
+ }
2415
+ - lang: Go
2416
+ source: "verifyBillingInfoParams := &recurly.VerifyBillingInfoParams{}\ntransaction,
2417
+ err := client.VerifyBillingInfo(accountID, verifyBillingInfoParams)\nif
2418
+ e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeNotFound
2419
+ {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected
2420
+ Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfmt.Printf(\"Fetched Transaction:
2421
+ %v\", transaction)"
2247
2422
  "/sites/{site_id}/accounts/{account_id}/billing_infos":
2248
2423
  get:
2249
2424
  tags:
2250
- - account
2251
- - billing_info
2425
+ - billing_infos
2252
2426
  operationId: list_billing_infos
2253
2427
  summary: Get the list of billing information associated with an account
2254
2428
  description: See the [Pagination Guide](/guides/pagination.html) to learn how
@@ -2282,14 +2456,13 @@ paths:
2282
2456
  x-code-samples: []
2283
2457
  post:
2284
2458
  tags:
2285
- - account
2286
- - billing_info
2459
+ - billing_infos
2287
2460
  operationId: create_billing_info
2288
- summary: Set an account's billing information when the wallet feature is enabled
2461
+ summary: Add new billing information on an account
2289
2462
  description: |
2290
2463
  If you're using Recurly.js to securely submit data from webforms without sending it through your server,
2291
2464
  you can associate the billing information with an account by passing in the `token_id`. The only other
2292
- field permitted with `token_id` is `primary_payment_method`.
2465
+ fields permitted with `token_id` are `primary_payment_method` and/or `backup_payment_method`.
2293
2466
 
2294
2467
  For credit card payments you'll need the following required fields:
2295
2468
 
@@ -2344,8 +2517,7 @@ paths:
2344
2517
  "/sites/{site_id}/accounts/{account_id}/billing_infos/{billing_info_id}":
2345
2518
  get:
2346
2519
  tags:
2347
- - account
2348
- - billing_info
2520
+ - billing_infos
2349
2521
  operationId: get_a_billing_info
2350
2522
  summary: Fetch a billing info
2351
2523
  parameters:
@@ -2368,14 +2540,13 @@ paths:
2368
2540
  x-code-samples: []
2369
2541
  put:
2370
2542
  tags:
2371
- - account
2372
- - billing_info
2543
+ - billing_infos
2373
2544
  operationId: update_a_billing_info
2374
2545
  summary: Update an account's billing information
2375
2546
  description: |
2376
2547
  If you're using Recurly.js to securely submit data from webforms without sending it through your server,
2377
2548
  you can associate the billing information with an account by passing in the `token_id`. The only other
2378
- field permitted with `token_id` is `primary_payment_method`.
2549
+ fields permitted with `token_id` are `primary_payment_method` and/or `backup_payment_method`.
2379
2550
 
2380
2551
  For credit card payments you'll need the following required fields:
2381
2552
 
@@ -2430,8 +2601,7 @@ paths:
2430
2601
  x-code-samples: []
2431
2602
  delete:
2432
2603
  tags:
2433
- - account
2434
- - billing_info
2604
+ - billing_infos
2435
2605
  operationId: remove_a_billing_info
2436
2606
  summary: Remove an account's billing information
2437
2607
  parameters:
@@ -2462,7 +2632,6 @@ paths:
2462
2632
  "/sites/{site_id}/accounts/{account_id}/coupon_redemptions":
2463
2633
  get:
2464
2634
  tags:
2465
- - account
2466
2635
  - coupon_redemption
2467
2636
  operationId: list_account_coupon_redemptions
2468
2637
  summary: Show the coupon redemptions for an account
@@ -2552,7 +2721,6 @@ paths:
2552
2721
  "/sites/{site_id}/accounts/{account_id}/coupon_redemptions/active":
2553
2722
  get:
2554
2723
  tags:
2555
- - account
2556
2724
  - coupon_redemption
2557
2725
  operationId: get_active_coupon_redemption
2558
2726
  summary: Show the coupon redemption that is active on an account
@@ -2669,7 +2837,6 @@ paths:
2669
2837
  Coupon Redemption: %v\", couponRedemption.Id)"
2670
2838
  post:
2671
2839
  tags:
2672
- - account
2673
2840
  - coupon_redemption
2674
2841
  operationId: create_coupon_redemption
2675
2842
  summary: Generate an active coupon redemption on an account or subscription
@@ -2801,7 +2968,6 @@ paths:
2801
2968
  Redemption: %v\", couponRedemption)"
2802
2969
  delete:
2803
2970
  tags:
2804
- - account
2805
2971
  - coupon_redemption
2806
2972
  operationId: remove_coupon_redemption
2807
2973
  summary: Delete the active coupon redemption from an account
@@ -2917,7 +3083,6 @@ paths:
2917
3083
  "/sites/{site_id}/accounts/{account_id}/credit_payments":
2918
3084
  get:
2919
3085
  tags:
2920
- - account
2921
3086
  - credit_payment
2922
3087
  operationId: list_account_credit_payments
2923
3088
  summary: List an account's credit payments
@@ -3014,7 +3179,6 @@ paths:
3014
3179
  get:
3015
3180
  tags:
3016
3181
  - invoice
3017
- - account
3018
3182
  operationId: list_account_invoices
3019
3183
  summary: List an account's invoices
3020
3184
  description: See the [Pagination Guide](/guides/pagination.html) to learn how
@@ -3110,7 +3274,6 @@ paths:
3110
3274
  post:
3111
3275
  tags:
3112
3276
  - invoice
3113
- - account
3114
3277
  operationId: create_invoice
3115
3278
  summary: Create an invoice for pending line items
3116
3279
  parameters:
@@ -3282,7 +3445,6 @@ paths:
3282
3445
  post:
3283
3446
  tags:
3284
3447
  - invoice
3285
- - account
3286
3448
  operationId: preview_invoice
3287
3449
  summary: Preview new invoice for pending line items
3288
3450
  parameters:
@@ -3452,7 +3614,6 @@ paths:
3452
3614
  "/sites/{site_id}/accounts/{account_id}/line_items":
3453
3615
  get:
3454
3616
  tags:
3455
- - account
3456
3617
  - line_item
3457
3618
  operationId: list_account_line_items
3458
3619
  summary: List an account's line items
@@ -3551,7 +3712,6 @@ paths:
3551
3712
  Item %3d: %s\\n\",\n\t\t\ti,\n\t\t\tlineItem.Id,\n\t\t)\n\t}\n}"
3552
3713
  post:
3553
3714
  tags:
3554
- - account
3555
3715
  - line_item
3556
3716
  operationId: create_line_item
3557
3717
  summary: Create a new line item for the account
@@ -3721,7 +3881,6 @@ paths:
3721
3881
  "/sites/{site_id}/accounts/{account_id}/notes":
3722
3882
  get:
3723
3883
  tags:
3724
- - account
3725
3884
  - note
3726
3885
  operationId: list_account_notes
3727
3886
  summary: Fetch a list of an account's notes
@@ -3803,7 +3962,6 @@ paths:
3803
3962
  "/sites/{site_id}/accounts/{account_id}/notes/{account_note_id}":
3804
3963
  get:
3805
3964
  tags:
3806
- - account
3807
3965
  - note
3808
3966
  operationId: get_account_note
3809
3967
  summary: Fetch an account note
@@ -3931,7 +4089,6 @@ paths:
3931
4089
  "/sites/{site_id}/accounts/{account_id}/shipping_addresses":
3932
4090
  get:
3933
4091
  tags:
3934
- - account
3935
4092
  - shipping_address
3936
4093
  operationId: list_shipping_addresses
3937
4094
  summary: Fetch a list of an account's shipping addresses
@@ -4021,7 +4178,6 @@ paths:
4021
4178
  Address %3d: %s, %s\\n\",\n\t\t\ti,\n\t\t\tshippingAddress.Id,\n\t\t\tshippingAddress.Street1,\n\t\t)\n\t}\n}"
4022
4179
  post:
4023
4180
  tags:
4024
- - account
4025
4181
  - shipping_address
4026
4182
  operationId: create_shipping_address
4027
4183
  summary: Create a new shipping address for the account
@@ -4212,7 +4368,6 @@ paths:
4212
4368
  "/sites/{site_id}/accounts/{account_id}/shipping_addresses/{shipping_address_id}":
4213
4369
  get:
4214
4370
  tags:
4215
- - account
4216
4371
  - shipping_address
4217
4372
  operationId: get_shipping_address
4218
4373
  summary: Fetch an account's shipping address
@@ -4333,7 +4488,6 @@ paths:
4333
4488
  Address: %v\", shippingAddress)"
4334
4489
  put:
4335
4490
  tags:
4336
- - account
4337
4491
  - shipping_address
4338
4492
  operationId: update_shipping_address
4339
4493
  summary: Update an account's shipping address
@@ -4505,7 +4659,6 @@ paths:
4505
4659
  shippingAddress)"
4506
4660
  delete:
4507
4661
  tags:
4508
- - account
4509
4662
  - shipping_address
4510
4663
  operationId: remove_shipping_address
4511
4664
  summary: Remove an account's shipping address
@@ -4616,7 +4769,6 @@ paths:
4616
4769
  get:
4617
4770
  tags:
4618
4771
  - subscription
4619
- - account
4620
4772
  operationId: list_account_subscriptions
4621
4773
  summary: List an account's subscriptions
4622
4774
  description: See the [Pagination Guide](/guides/pagination.html) to learn how
@@ -4712,7 +4864,6 @@ paths:
4712
4864
  "/sites/{site_id}/accounts/{account_id}/transactions":
4713
4865
  get:
4714
4866
  tags:
4715
- - account
4716
4867
  - transaction
4717
4868
  operationId: list_account_transactions
4718
4869
  summary: List an account's transactions
@@ -5648,7 +5799,6 @@ paths:
5648
5799
  "/sites/{site_id}/coupons/{coupon_id}/generate":
5649
5800
  post:
5650
5801
  tags:
5651
- - coupon
5652
5802
  - unique_coupon_code
5653
5803
  operationId: generate_unique_coupon_codes
5654
5804
  summary: Generate unique coupon codes
@@ -5842,7 +5992,6 @@ paths:
5842
5992
  "/sites/{site_id}/coupons/{coupon_id}/unique_coupon_codes":
5843
5993
  get:
5844
5994
  tags:
5845
- - coupon
5846
5995
  - unique_coupon_code
5847
5996
  operationId: list_unique_coupon_codes
5848
5997
  summary: List unique coupon codes associated with a bulk coupon
@@ -8405,7 +8554,6 @@ paths:
8405
8554
  "/sites/{site_id}/invoices/{invoice_id}/line_items":
8406
8555
  get:
8407
8556
  tags:
8408
- - invoice
8409
8557
  - line_item
8410
8558
  operationId: list_invoice_line_items
8411
8559
  summary: List an invoice's line items
@@ -8496,7 +8644,7 @@ paths:
8496
8644
  $params = ['limit' => 200];
8497
8645
  $invoice_line_items = $client->listInvoiceLineItems($invoice_id, $params);
8498
8646
 
8499
- foreach($invoice_line_item as $line_item) {
8647
+ foreach($invoice_line_items as $line_item) {
8500
8648
  echo 'Invoice Line Item: ' . $line_item->getId() . PHP_EOL;
8501
8649
  }
8502
8650
  - lang: Go
@@ -8508,7 +8656,6 @@ paths:
8508
8656
  "/sites/{site_id}/invoices/{invoice_id}/coupon_redemptions":
8509
8657
  get:
8510
8658
  tags:
8511
- - invoice
8512
8659
  - coupon_redemption
8513
8660
  operationId: list_invoice_coupon_redemptions
8514
8661
  summary: Show the coupon redemptions applied to an invoice
@@ -9848,7 +9995,6 @@ paths:
9848
9995
  get:
9849
9996
  tags:
9850
9997
  - add-on
9851
- - plan
9852
9998
  operationId: list_plan_add_ons
9853
9999
  summary: List a plan's add-ons
9854
10000
  description: See the [Pagination Guide](/guides/pagination.html) to learn how
@@ -9944,7 +10090,6 @@ paths:
9944
10090
  post:
9945
10091
  tags:
9946
10092
  - add-on
9947
- - plan
9948
10093
  operationId: create_plan_add_on
9949
10094
  summary: Create an add-on
9950
10095
  parameters:
@@ -10142,7 +10287,6 @@ paths:
10142
10287
  "/sites/{site_id}/plans/{plan_id}/add_ons/{add_on_id}":
10143
10288
  get:
10144
10289
  tags:
10145
- - plan
10146
10290
  - add-on
10147
10291
  operationId: get_plan_add_on
10148
10292
  summary: Fetch a plan's add-on
@@ -10262,7 +10406,6 @@ paths:
10262
10406
  Add-On: %v\", planAddOn)"
10263
10407
  put:
10264
10408
  tags:
10265
- - plan
10266
10409
  - add-on
10267
10410
  operationId: update_plan_add_on
10268
10411
  summary: Update an add-on
@@ -10406,7 +10549,6 @@ paths:
10406
10549
  Add-On: %v\", planAddOn)"
10407
10550
  delete:
10408
10551
  tags:
10409
- - plan
10410
10552
  - add-on
10411
10553
  operationId: remove_plan_add_on
10412
10554
  summary: Remove an add-on
@@ -11175,8 +11317,7 @@ paths:
11175
11317
  subscription_create = {
11176
11318
  plan_code: plan_code,
11177
11319
  currency: "USD",
11178
- # This can be an existing account or
11179
- # a new acocunt
11320
+ # This can be an existing account or a new account
11180
11321
  account: {
11181
11322
  code: account_code,
11182
11323
  }
@@ -12268,10 +12409,46 @@ paths:
12268
12409
  schema:
12269
12410
  "$ref": "#/components/schemas/Error"
12270
12411
  x-code-samples: []
12271
- "/sites/{site_id}/subscriptions/{subscription_id}/change":
12412
+ "/sites/{site_id}/subscriptions/{subscription_id}/preview_renewal":
12272
12413
  get:
12273
12414
  tags:
12274
12415
  - subscription
12416
+ operationId: get_preview_renewal
12417
+ summary: Fetch a preview of a subscription's renewal invoice(s)
12418
+ description: The subscriptions's renewal invoice(s) will be returned if they
12419
+ exist; if they don't (for example, if the subscription is not set to renew),
12420
+ it will return an result with no invoices.
12421
+ parameters:
12422
+ - "$ref": "#/components/parameters/subscription_id"
12423
+ responses:
12424
+ '200':
12425
+ description: A preview of the subscription's renewal invoice(s).
12426
+ content:
12427
+ application/json:
12428
+ schema:
12429
+ "$ref": "#/components/schemas/InvoiceCollection"
12430
+ '400':
12431
+ description: Invalid or unpermitted parameter.
12432
+ content:
12433
+ application/json:
12434
+ schema:
12435
+ "$ref": "#/components/schemas/Error"
12436
+ '404':
12437
+ description: Incorrect site ID or subscription ID.
12438
+ content:
12439
+ application/json:
12440
+ schema:
12441
+ "$ref": "#/components/schemas/Error"
12442
+ default:
12443
+ description: Unexpected error.
12444
+ content:
12445
+ application/json:
12446
+ schema:
12447
+ "$ref": "#/components/schemas/Error"
12448
+ x-code-samples: []
12449
+ "/sites/{site_id}/subscriptions/{subscription_id}/change":
12450
+ get:
12451
+ tags:
12275
12452
  - subscription_change
12276
12453
  operationId: get_subscription_change
12277
12454
  summary: Fetch a subscription's pending change
@@ -12403,11 +12580,19 @@ paths:
12403
12580
  change: %s\", subscriptionChange.Id)"
12404
12581
  post:
12405
12582
  tags:
12406
- - subscription
12407
12583
  - subscription_change
12408
12584
  operationId: create_subscription_change
12409
12585
  summary: Create a new subscription change
12410
- description: Calling this will overwrite an existing, pending subscription change.
12586
+ description: |
12587
+ Calling this will overwrite an existing, pending subscription change.
12588
+
12589
+ If a subscription has a pending change, and a change is submitted which matches
12590
+ the subscription as it currently exists, the pending change will be deleted,
12591
+ and you will receive a 204 No Content response.
12592
+
12593
+ If a subscription has no pending
12594
+ change, and a change is submitted which matches the subscription as it currently
12595
+ exists, a 422 Unprocessable Entity validation error will be returned.
12411
12596
  parameters:
12412
12597
  - "$ref": "#/components/parameters/site_id"
12413
12598
  - "$ref": "#/components/parameters/subscription_id"
@@ -12424,6 +12609,8 @@ paths:
12424
12609
  application/json:
12425
12610
  schema:
12426
12611
  "$ref": "#/components/schemas/SubscriptionChange"
12612
+ '204':
12613
+ description: The previous pending change was reverted.
12427
12614
  '404':
12428
12615
  description: Incorrect site ID.
12429
12616
  content:
@@ -12563,7 +12750,6 @@ paths:
12563
12750
  changed: %s\", subscriptionChange.Id)"
12564
12751
  delete:
12565
12752
  tags:
12566
- - subscription
12567
12753
  - subscription_change
12568
12754
  operationId: remove_subscription_change
12569
12755
  summary: Delete the pending subscription change
@@ -12679,7 +12865,6 @@ paths:
12679
12865
  "/sites/{site_id}/subscriptions/{subscription_id}/change/preview":
12680
12866
  post:
12681
12867
  tags:
12682
- - subscription
12683
12868
  - subscription_change
12684
12869
  operationId: preview_subscription_change
12685
12870
  summary: Preview a new subscription change
@@ -12725,7 +12910,6 @@ paths:
12725
12910
  get:
12726
12911
  tags:
12727
12912
  - invoice
12728
- - subscription
12729
12913
  operationId: list_subscription_invoices
12730
12914
  summary: List a subscription's invoices
12731
12915
  description: See the [Pagination Guide](/guides/pagination.html) to learn how
@@ -12822,7 +13006,7 @@ paths:
12822
13006
  "/sites/{site_id}/subscriptions/{subscription_id}/line_items":
12823
13007
  get:
12824
13008
  tags:
12825
- - subscription
13009
+ - line_item
12826
13010
  operationId: list_subscription_line_items
12827
13011
  summary: List a subscription's line items
12828
13012
  description: See the [Pagination Guide](/guides/pagination.html) to learn how
@@ -12921,7 +13105,6 @@ paths:
12921
13105
  "/sites/{site_id}/subscriptions/{subscription_id}/coupon_redemptions":
12922
13106
  get:
12923
13107
  tags:
12924
- - subscription
12925
13108
  - coupon_redemption
12926
13109
  operationId: list_subscription_coupon_redemptions
12927
13110
  summary: Show the coupon redemptions for a subscription
@@ -13009,8 +13192,6 @@ paths:
13009
13192
  "/sites/{site_id}/subscriptions/{subscription_id}/add_ons/{add_on_id}/usage":
13010
13193
  get:
13011
13194
  tags:
13012
- - invoice
13013
- - subscription
13014
13195
  - usage
13015
13196
  operationId: list_usage
13016
13197
  summary: List a subscription add-on's usage records
@@ -13053,8 +13234,6 @@ paths:
13053
13234
  x-code-samples: []
13054
13235
  post:
13055
13236
  tags:
13056
- - invoice
13057
- - subscription
13058
13237
  - usage
13059
13238
  operationId: create_usage
13060
13239
  summary: Log a usage record on this subscription add-on
@@ -13103,8 +13282,6 @@ paths:
13103
13282
  "/sites/{site_id}/usage/{usage_id}":
13104
13283
  get:
13105
13284
  tags:
13106
- - invoice
13107
- - subscription
13108
13285
  - usage
13109
13286
  operationId: get_usage
13110
13287
  summary: Get a usage record
@@ -13139,8 +13316,6 @@ paths:
13139
13316
  x-code-samples: []
13140
13317
  put:
13141
13318
  tags:
13142
- - invoice
13143
- - subscription
13144
13319
  - usage
13145
13320
  operationId: update_usage
13146
13321
  summary: Update a usage record
@@ -13187,8 +13362,6 @@ paths:
13187
13362
  x-code-samples: []
13188
13363
  delete:
13189
13364
  tags:
13190
- - invoice
13191
- - subscription
13192
13365
  - usage
13193
13366
  operationId: remove_usage
13194
13367
  summary: Delete a usage record.
@@ -13990,9 +14163,14 @@ paths:
13990
14163
  var_dump($e);
13991
14164
  }
13992
14165
  - lang: Go
13993
- source: "collection, err := client.PreviewPurchase(purchaseReq)\nif e, ok
13994
- := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeValidation
13995
- {\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected
14166
+ source: "purchaseReq := &recurly.PurchaseCreate{\n\tCurrency: recurly.String(\"USD\"),\n\tAccount:
14167
+ &recurly.AccountPurchase{\n\t\tCode: recurly.String(account.Code),\n\t},\n\tSubscriptions:
14168
+ []recurly.SubscriptionPurchase{\n\t\t{\n\t\t\tPlanCode: recurly.String(plan.Code),\n\t\t\tNextBillDate:
14169
+ recurly.Time(time.Date(2078, time.November, 10, 23, 0, 0, 0, time.UTC)),\n\t\t},\n\t},\n\tShipping:
14170
+ &recurly.ShippingPurchase{\n\t\tAddressId: recurly.String(shippingAddressID),\n\t},\n}\ncollection,
14171
+ err := client.PreviewPurchase(purchaseReq)\nif e, ok := err.(*recurly.Error);
14172
+ ok {\n\tif e.Type == recurly.ErrorTypeValidation {\n\t\tfmt.Printf(\"Failed
14173
+ validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected
13996
14174
  Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Preview Charge
13997
14175
  Invoice %v\", collection.ChargeInvoice)"
13998
14176
  "/sites/{site_id}/export_dates":
@@ -14220,6 +14398,107 @@ paths:
14220
14398
  err.(*recurly.Error); ok {\n\tfmt.Printf(\"Unexpected Recurly error: %v\",
14221
14399
  e)\n\treturn nil, err\n}\n\nfor _, file := range exportFiles.Files {\n\tfmt.Println(\"Export
14222
14400
  file download URL: \", file.Href)\n}"
14401
+ "/sites/{site_id}/dunning_campaigns":
14402
+ get:
14403
+ tags:
14404
+ - dunning_campaigns
14405
+ operationId: list_dunning_campaigns
14406
+ summary: Show the dunning campaigns for a site
14407
+ description: See the [Pagination Guide](/guides/pagination.html) to learn how
14408
+ to use pagination in the API and Client Libraries.
14409
+ parameters:
14410
+ - "$ref": "#/components/parameters/sort_dates"
14411
+ responses:
14412
+ '200':
14413
+ description: A list of the the dunning_campaigns on an account.
14414
+ content:
14415
+ application/json:
14416
+ schema:
14417
+ "$ref": "#/components/schemas/DunningCampaignList"
14418
+ '404':
14419
+ description: Incorrect site.
14420
+ content:
14421
+ application/json:
14422
+ schema:
14423
+ "$ref": "#/components/schemas/Error"
14424
+ default:
14425
+ description: Unexpected error.
14426
+ content:
14427
+ application/json:
14428
+ schema:
14429
+ "$ref": "#/components/schemas/Error"
14430
+ x-code-samples: []
14431
+ "/dunning_campaigns/{dunning_campaign_id}":
14432
+ parameters:
14433
+ - "$ref": "#/components/parameters/dunning_campaign_id"
14434
+ get:
14435
+ tags:
14436
+ - dunning_campaigns
14437
+ operationId: get_dunning_campaign
14438
+ summary: Show the settings for a dunning campaign
14439
+ responses:
14440
+ '200':
14441
+ description: Settings for a dunning campaign.
14442
+ content:
14443
+ application/json:
14444
+ schema:
14445
+ "$ref": "#/components/schemas/DunningCampaign"
14446
+ '400':
14447
+ description: Bad request; perhaps missing or invalid parameters.
14448
+ content:
14449
+ application/json:
14450
+ schema:
14451
+ "$ref": "#/components/schemas/Error"
14452
+ '404':
14453
+ description: Incorrect site or campaign ID.
14454
+ content:
14455
+ application/json:
14456
+ schema:
14457
+ "$ref": "#/components/schemas/Error"
14458
+ default:
14459
+ description: Unexpected error.
14460
+ content:
14461
+ application/json:
14462
+ schema:
14463
+ "$ref": "#/components/schemas/Error"
14464
+ x-code-samples: []
14465
+ "/dunning_campaigns/{dunning_campaign_id}/bulk_update":
14466
+ put:
14467
+ tags:
14468
+ - dunning_campaigns
14469
+ operationId: put_dunning_campaign_bulk_update
14470
+ summary: Assign a dunning campaign to multiple plans
14471
+ requestBody:
14472
+ content:
14473
+ application/json:
14474
+ schema:
14475
+ "$ref": "#/components/schemas/DunningCampaignsBulkUpdate"
14476
+ responses:
14477
+ '200':
14478
+ description: A list of updated plans.
14479
+ content:
14480
+ application/json:
14481
+ schema:
14482
+ "$ref": "#/components/schemas/DunningCampaignsBulkUpdateResponse"
14483
+ '400':
14484
+ description: Bad request; perhaps missing or invalid parameters.
14485
+ content:
14486
+ application/json:
14487
+ schema:
14488
+ "$ref": "#/components/schemas/Error"
14489
+ '404':
14490
+ description: Incorrect site or campaign ID.
14491
+ content:
14492
+ application/json:
14493
+ schema:
14494
+ "$ref": "#/components/schemas/Error"
14495
+ default:
14496
+ description: Unexpected error.
14497
+ content:
14498
+ application/json:
14499
+ schema:
14500
+ "$ref": "#/components/schemas/Error"
14501
+ x-code-samples: []
14223
14502
  servers:
14224
14503
  - url: https://v3.recurly.com
14225
14504
  components:
@@ -14251,7 +14530,8 @@ components:
14251
14530
  billing_info_id:
14252
14531
  name: billing_info_id
14253
14532
  in: path
14254
- description: Billing Info ID.
14533
+ description: Billing Info ID. Can ONLY be used for sites utilizing the Wallet
14534
+ feature.
14255
14535
  required: true
14256
14536
  schema:
14257
14537
  type: string
@@ -14363,6 +14643,13 @@ components:
14363
14643
  required: true
14364
14644
  schema:
14365
14645
  type: string
14646
+ dunning_campaign_id:
14647
+ name: dunning_campaign_id
14648
+ in: path
14649
+ description: Dunning Campaign ID, e.g. `e28zov4fw0v2`.
14650
+ required: true
14651
+ schema:
14652
+ type: string
14366
14653
  ids:
14367
14654
  name: ids
14368
14655
  in: query
@@ -15124,20 +15411,26 @@ components:
15124
15411
  - en-AU
15125
15412
  - en-CA
15126
15413
  - en-GB
15414
+ - en-IE
15127
15415
  - en-NZ
15128
15416
  - en-US
15129
15417
  - es-ES
15130
15418
  - es-MX
15131
15419
  - es-US
15420
+ - fi-FI
15132
15421
  - fr-CA
15133
15422
  - fr-FR
15134
15423
  - hi-IN
15424
+ - it-IT
15135
15425
  - ja-JP
15426
+ - ko-KR
15136
15427
  - nl-BE
15137
15428
  - nl-NL
15138
15429
  - pt-BR
15139
15430
  - pt-PT
15431
+ - ro-RO
15140
15432
  - ru-RU
15433
+ - sk-SK
15141
15434
  - tr-TR
15142
15435
  - zh-CN
15143
15436
  cc_emails:
@@ -15204,6 +15497,13 @@ components:
15204
15497
  mail order and telephone transactions.
15205
15498
  enum:
15206
15499
  - moto
15500
+ dunning_campaign_id:
15501
+ type: string
15502
+ title: Dunning Campaign ID
15503
+ description: Unique ID to identify a dunning campaign. Used to specify if
15504
+ a non-default dunning campaign should be assigned to this account. For
15505
+ sites without multiple dunning campaigns enabled, the default dunning
15506
+ campaign will always be used.
15207
15507
  address:
15208
15508
  "$ref": "#/components/schemas/Address"
15209
15509
  billing_info:
@@ -15241,20 +15541,26 @@ components:
15241
15541
  - en-AU
15242
15542
  - en-CA
15243
15543
  - en-GB
15544
+ - en-IE
15244
15545
  - en-NZ
15245
15546
  - en-US
15246
15547
  - es-ES
15247
15548
  - es-MX
15248
15549
  - es-US
15550
+ - fi-FI
15249
15551
  - fr-CA
15250
15552
  - fr-FR
15251
15553
  - hi-IN
15554
+ - it-IT
15252
15555
  - ja-JP
15556
+ - ko-KR
15253
15557
  - nl-BE
15254
15558
  - nl-NL
15255
15559
  - pt-BR
15256
15560
  - pt-PT
15561
+ - ro-RO
15257
15562
  - ru-RU
15563
+ - sk-SK
15258
15564
  - tr-TR
15259
15565
  - zh-CN
15260
15566
  cc_emails:
@@ -15300,6 +15606,13 @@ components:
15300
15606
  enum:
15301
15607
  - self
15302
15608
  - parent
15609
+ dunning_campaign_id:
15610
+ type: string
15611
+ title: Dunning Campaign ID
15612
+ description: Unique ID to identify a dunning campaign. Used to specify if
15613
+ a non-default dunning campaign should be assigned to this account. For
15614
+ sites without multiple dunning campaigns enabled, the default dunning
15615
+ campaign will always be used.
15303
15616
  address:
15304
15617
  "$ref": "#/components/schemas/Address"
15305
15618
  billing_info:
@@ -15365,6 +15678,13 @@ components:
15365
15678
  bill_to:
15366
15679
  type: string
15367
15680
  maxLength: 6
15681
+ dunning_campaign_id:
15682
+ type: string
15683
+ title: Dunning Campaign ID
15684
+ description: Unique ID to identify a dunning campaign. Used to specify if
15685
+ a non-default dunning campaign should be assigned to this account. For
15686
+ sites without multiple dunning campaigns enabled, the default dunning
15687
+ campaign will always be used.
15368
15688
  AccountBalance:
15369
15689
  type: object
15370
15690
  properties:
@@ -15437,7 +15757,7 @@ components:
15437
15757
  country:
15438
15758
  type: string
15439
15759
  title: Country
15440
- description: Country, 2-letter ISO code.
15760
+ description: Country, 2-letter ISO 3166-1 alpha-2 code.
15441
15761
  AddOnMini:
15442
15762
  type: object
15443
15763
  title: Add-on mini details
@@ -15679,7 +15999,6 @@ components:
15679
15999
  required:
15680
16000
  - code
15681
16001
  - name
15682
- - currencies
15683
16002
  AddOnCreate:
15684
16003
  type: object
15685
16004
  title: Add-on
@@ -15689,16 +16008,16 @@ components:
15689
16008
  type: string
15690
16009
  title: Item Code
15691
16010
  description: Unique code to identify an item. Avaliable when the `Credit
15692
- Invoices` and `Subscription Billing Terms` features are enabled. If `item_id`
15693
- and `item_code` are both present, `item_id` will be used.
16011
+ Invoices` feature is enabled. If `item_id` and `item_code` are both present,
16012
+ `item_id` will be used.
15694
16013
  pattern: "/^[a-z0-9_+-]+$/"
15695
16014
  maxLength: 50
15696
16015
  item_id:
15697
16016
  type: string
15698
16017
  title: Item ID
15699
16018
  description: System-generated unique identifier for an item. Available when
15700
- the `Credit Invoices` and `Subscription Billing Terms` features are enabled.
15701
- If `item_id` and `item_code` are both present, `item_id` will be used.
16019
+ the `Credit Invoices` feature is enabled. If `item_id` and `item_code`
16020
+ are both present, `item_id` will be used.
15702
16021
  maxLength: 13
15703
16022
  code:
15704
16023
  type: string
@@ -15839,6 +16158,7 @@ components:
15839
16158
  is not present `currencies` is required.
15840
16159
  * If the add-on's `tier_type` is `tiered`, `volume`, or `stairstep`,
15841
16160
  then `currencies` must be absent.
16161
+ * Must be absent if `add_on_type` is `usage` and `usage_type` is `percentage`.
15842
16162
  tier_type:
15843
16163
  type: string
15844
16164
  title: Tier type
@@ -15866,7 +16186,6 @@ components:
15866
16186
  required:
15867
16187
  - code
15868
16188
  - name
15869
- - currencies
15870
16189
  AddOnUpdate:
15871
16190
  type: object
15872
16191
  title: Add-on
@@ -15986,7 +16305,8 @@ components:
15986
16305
  minItems: 1
15987
16306
  description: |
15988
16307
  If the add-on's `tier_type` is `tiered`, `volume` or `stairstep`,
15989
- then `currencies` must be absent.
16308
+ then `currencies` must be absent. Must also be absent if `add_on_type` is
16309
+ `usage` and `usage_type` is `percentage`.
15990
16310
  tiers:
15991
16311
  type: array
15992
16312
  title: Tiers
@@ -16058,14 +16378,14 @@ components:
16058
16378
  title: Kount rules
16059
16379
  primary_payment_method:
16060
16380
  type: boolean
16061
- description: The `primary_payment_method` indicator is used to designate
16062
- the primary billing info on the account. The first billing info created
16063
- on an account will always become primary. Adding additional billing infos
16064
- provides the flexibility to mark another billing info as primary, or adding
16065
- additional non-primary billing infos. This can be accomplished by passing
16066
- the `primary_payment_method` indicator. When adding billing infos via
16067
- the billing_info and /accounts endpoints, this value is not permitted,
16068
- and will return an error if provided.
16381
+ description: The `primary_payment_method` field is used to indicate the
16382
+ primary billing info on the account. The first billing info created on
16383
+ an account will always become primary. This payment method will be used
16384
+ backup_payment_method:
16385
+ type: boolean
16386
+ description: The `backup_payment_method` field is used to indicate a billing
16387
+ info as a backup on the account that will be tried if the initial billing
16388
+ info used for an invoice is declined.
16069
16389
  created_at:
16070
16390
  type: string
16071
16391
  format: date-time
@@ -16087,7 +16407,8 @@ components:
16087
16407
  maxLength: 20
16088
16408
  country:
16089
16409
  type: string
16090
- description: Country of IP address, if known by Recurly.
16410
+ description: Country, 2-letter ISO 3166-1 alpha-2 code matching the
16411
+ origin IP address, if known by Recurly.
16091
16412
  maxLength: 2
16092
16413
  BillingInfoCreate:
16093
16414
  type: object
@@ -16198,8 +16519,9 @@ components:
16198
16519
  type: string
16199
16520
  enum:
16200
16521
  - bacs
16522
+ - becs
16201
16523
  description: The payment method type for a non-credit card based billing
16202
- info. The value of `bacs` is the only accepted value (Bacs only)
16524
+ info. `bacs` and `becs` are the only accepted values.
16203
16525
  account_type:
16204
16526
  type: string
16205
16527
  enum:
@@ -16220,14 +16542,29 @@ components:
16220
16542
  primary_payment_method:
16221
16543
  type: boolean
16222
16544
  title: Primary Payment Method
16223
- description: The `primary_payment_method` indicator is used to designate
16224
- the primary billing info on the account. The first billing info created
16225
- on an account will always become primary. Adding additional billing infos
16545
+ description: The `primary_payment_method` field is used to designate the
16546
+ primary billing info on the account. The first billing info created on
16547
+ an account will always become primary. Adding additional billing infos
16226
16548
  provides the flexibility to mark another billing info as primary, or adding
16227
16549
  additional non-primary billing infos. This can be accomplished by passing
16228
- the `primary_payment_method` indicator. When adding billing infos via
16229
- the billing_info and /accounts endpoints, this value is not permitted,
16230
- and will return an error if provided.
16550
+ the `primary_payment_method` with a value of `true`. When adding billing
16551
+ infos via the billing_info and /accounts endpoints, this value is not
16552
+ permitted, and will return an error if provided.
16553
+ backup_payment_method:
16554
+ type: boolean
16555
+ description: The `backup_payment_method` field is used to designate a billing
16556
+ info as a backup on the account that will be tried if the initial billing
16557
+ info used for an invoice is declined. All payment methods, including the
16558
+ billing info marked `primary_payment_method` can be set as a backup. An
16559
+ account can have a maximum of 1 backup, if a user sets a different payment
16560
+ method as a backup, the existing backup will no longer be marked as such.
16561
+ BillingInfoVerify:
16562
+ type: object
16563
+ properties:
16564
+ gateway_code:
16565
+ type: string
16566
+ description: An identifier for a specific payment gateway.
16567
+ maxLength: 13
16231
16568
  Coupon:
16232
16569
  type: object
16233
16570
  properties:
@@ -17324,6 +17661,12 @@ components:
17324
17661
  - gift_card
17325
17662
  - write_off
17326
17663
  - prepayment
17664
+ - refund
17665
+ - external_refund
17666
+ - carryforward_credit
17667
+ - carryforward_gift_credit
17668
+ - usage_correction
17669
+ - import
17327
17670
  state:
17328
17671
  type: string
17329
17672
  title: Invoice state
@@ -17344,7 +17687,8 @@ components:
17344
17687
  description: The `billing_info_id` is the value that represents a specific
17345
17688
  billing info for an end customer. When `billing_info_id` is used to assign
17346
17689
  billing info to the subscription, all future billing events for the subscription
17347
- will bill to the specified billing info.
17690
+ will bill to the specified billing info. `billing_info_id` can ONLY be
17691
+ used for sites utilizing the Wallet feature.
17348
17692
  subscription_ids:
17349
17693
  type: array
17350
17694
  title: Subscription IDs
@@ -17414,7 +17758,8 @@ components:
17414
17758
  type: number
17415
17759
  format: float
17416
17760
  title: Subtotal
17417
- description: The summation of charges, discounts, and credits, before tax.
17761
+ description: The summation of charges and credits, before discounts and
17762
+ taxes.
17418
17763
  tax:
17419
17764
  type: number
17420
17765
  format: float
@@ -17504,6 +17849,12 @@ components:
17504
17849
  format: date-time
17505
17850
  title: Closed at
17506
17851
  description: Date invoice was marked paid or failed.
17852
+ dunning_campaign_id:
17853
+ type: string
17854
+ title: Dunning Campaign ID
17855
+ description: Unique ID to identify the dunning campaign used when dunning
17856
+ the invoice. For sites without multiple dunning campaigns enabled, this
17857
+ will always be the default dunning campaign.
17507
17858
  InvoiceCreate:
17508
17859
  type: object
17509
17860
  properties:
@@ -17592,7 +17943,8 @@ components:
17592
17943
  description: The `billing_info_id` is the value that represents a specific
17593
17944
  billing info for an end customer. When `billing_info_id` is used to assign
17594
17945
  billing info to the subscription, all future billing events for the subscription
17595
- will bill to the specified billing info.
17946
+ will bill to the specified billing info. `billing_info_id` can ONLY be
17947
+ used for sites utilizing the Wallet feature.
17596
17948
  InvoiceCollection:
17597
17949
  type: object
17598
17950
  title: Invoice collection
@@ -17883,20 +18235,20 @@ components:
17883
18235
  type: string
17884
18236
  title: Item Code
17885
18237
  description: Unique code to identify an item. Available when the Credit
17886
- Invoices and Subscription Billing Terms features are enabled.
18238
+ Invoices feature is enabled.
17887
18239
  pattern: "/^[a-z0-9_+-]+$/"
17888
18240
  maxLength: 50
17889
18241
  item_id:
17890
18242
  type: string
17891
18243
  title: Item ID
17892
18244
  description: System-generated unique identifier for an item. Available when
17893
- the Credit Invoices and Subscription Billing Terms features are enabled.
18245
+ the Credit Invoices feature is enabled.
17894
18246
  maxLength: 13
17895
18247
  external_sku:
17896
18248
  type: string
17897
18249
  title: External SKU
17898
18250
  description: Optional Stock Keeping Unit assigned to an item. Available
17899
- when the Credit Invoices and Subscription Billing Terms features are enabled.
18251
+ when the Credit Invoices feature is enabled.
17900
18252
  maxLength: 50
17901
18253
  revenue_schedule_type:
17902
18254
  type: string
@@ -17932,6 +18284,12 @@ components:
17932
18284
  - carryforward
17933
18285
  account:
17934
18286
  "$ref": "#/components/schemas/AccountMini"
18287
+ bill_for_account_id:
18288
+ type: string
18289
+ title: Bill For Account ID
18290
+ maxLength: 13
18291
+ description: The UUID of the account responsible for originating the line
18292
+ item.
17935
18293
  subscription_id:
17936
18294
  type: string
17937
18295
  title: Subscription ID
@@ -18198,6 +18556,13 @@ components:
18198
18556
  A positive or negative amount with `type=credit` will result in a negative `unit_amount`.
18199
18557
  If `item_code`/`item_id` is present, `unit_amount` can be passed in, to override the `Item`'s
18200
18558
  `unit_amount`. If `item_code`/`item_id` is not present then `unit_amount` is required.
18559
+ tax_inclusive:
18560
+ type: boolean
18561
+ title: Tax Inclusive?
18562
+ default: false
18563
+ description: Determines whether or not tax is included in the unit amount.
18564
+ The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing
18565
+ feature) must be enabled to use this flag.
18201
18566
  quantity:
18202
18567
  type: integer
18203
18568
  title: Quantity
@@ -18214,14 +18579,14 @@ components:
18214
18579
  type: string
18215
18580
  title: Item Code
18216
18581
  description: Unique code to identify an item. Avaliable when the Credit
18217
- Invoices and Subscription Billing Terms features are enabled.
18582
+ Invoices feature is enabled.
18218
18583
  pattern: "/^[a-z0-9_+-]+$/"
18219
18584
  maxLength: 50
18220
18585
  item_id:
18221
18586
  type: string
18222
18587
  title: Item ID
18223
18588
  description: System-generated unique identifier for an item. Available when
18224
- the Credit Invoices and Subscription Billing Terms features are enabled.
18589
+ the Credit Invoices feature is enabled.
18225
18590
  maxLength: 13
18226
18591
  revenue_schedule_type:
18227
18592
  type: string
@@ -18522,6 +18887,13 @@ components:
18522
18887
  Used to determine whether items can be assigned as add-ons to individual subscriptions.
18523
18888
  If `true`, items can be assigned as add-ons to individual subscription add-ons.
18524
18889
  If `false`, only plan add-ons can be used.
18890
+ dunning_campaign_id:
18891
+ type: string
18892
+ title: Dunning Campaign ID
18893
+ description: Unique ID to identify a dunning campaign. Used to specify if
18894
+ a non-default dunning campaign should be assigned to this plan. For sites
18895
+ without multiple dunning campaigns enabled, the default dunning campaign
18896
+ will always be used.
18525
18897
  created_at:
18526
18898
  type: string
18527
18899
  format: date-time
@@ -18694,6 +19066,13 @@ components:
18694
19066
  Used to determine whether items can be assigned as add-ons to individual subscriptions.
18695
19067
  If `true`, items can be assigned as add-ons to individual subscription add-ons.
18696
19068
  If `false`, only plan add-ons can be used.
19069
+ dunning_campaign_id:
19070
+ type: string
19071
+ title: Dunning Campaign ID
19072
+ description: Unique ID to identify a dunning campaign. Used to specify if
19073
+ a non-default dunning campaign should be assigned to this plan. For sites
19074
+ without multiple dunning campaigns enabled, the default dunning campaign
19075
+ will always be used.
18697
19076
  required:
18698
19077
  - code
18699
19078
  - name
@@ -18744,6 +19123,13 @@ components:
18744
19123
  title: Unit price
18745
19124
  minimum: 0
18746
19125
  maximum: 1000000
19126
+ tax_inclusive:
19127
+ type: boolean
19128
+ title: Tax Inclusive?
19129
+ default: false
19130
+ description: Determines whether or not tax is included in the unit amount.
19131
+ The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing
19132
+ feature) must be enabled to use this flag.
18747
19133
  PlanUpdate:
18748
19134
  type: object
18749
19135
  properties:
@@ -18883,6 +19269,13 @@ components:
18883
19269
  Used to determine whether items can be assigned as add-ons to individual subscriptions.
18884
19270
  If `true`, items can be assigned as add-ons to individual subscription add-ons.
18885
19271
  If `false`, only plan add-ons can be used.
19272
+ dunning_campaign_id:
19273
+ type: string
19274
+ title: Dunning Campaign ID
19275
+ description: Unique ID to identify a dunning campaign. Used to specify if
19276
+ a non-default dunning campaign should be assigned to this plan. For sites
19277
+ without multiple dunning campaigns enabled, the default dunning campaign
19278
+ will always be used.
18886
19279
  AddOnPricing:
18887
19280
  type: object
18888
19281
  properties:
@@ -18897,6 +19290,13 @@ components:
18897
19290
  title: Unit price
18898
19291
  minimum: 0
18899
19292
  maximum: 1000000
19293
+ tax_inclusive:
19294
+ type: boolean
19295
+ title: Tax Inclusive?
19296
+ default: false
19297
+ description: Determines whether or not tax is included in the unit amount.
19298
+ The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing
19299
+ feature) must be enabled to use this flag.
18900
19300
  required:
18901
19301
  - currency
18902
19302
  - unit_amount
@@ -18914,6 +19314,13 @@ components:
18914
19314
  title: Unit price
18915
19315
  minimum: 0
18916
19316
  maximum: 1000000
19317
+ tax_inclusive:
19318
+ type: boolean
19319
+ title: Tax Inclusive?
19320
+ default: false
19321
+ description: Determines whether or not tax is included in the unit amount.
19322
+ The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing
19323
+ feature) must be enabled to use this flag.
18917
19324
  required:
18918
19325
  - currency
18919
19326
  - unit_amount
@@ -19018,7 +19425,7 @@ components:
19018
19425
  country:
19019
19426
  type: string
19020
19427
  maxLength: 50
19021
- description: Country, 2-letter ISO code.
19428
+ description: Country, 2-letter ISO 3166-1 alpha-2 code.
19022
19429
  created_at:
19023
19430
  type: string
19024
19431
  title: Created at
@@ -19073,7 +19480,7 @@ components:
19073
19480
  country:
19074
19481
  type: string
19075
19482
  maxLength: 50
19076
- description: Country, 2-letter ISO code.
19483
+ description: Country, 2-letter ISO 3166-1 alpha-2 code.
19077
19484
  required:
19078
19485
  - first_name
19079
19486
  - last_name
@@ -19323,7 +19730,7 @@ components:
19323
19730
  country:
19324
19731
  type: string
19325
19732
  maxLength: 50
19326
- description: Country, 2-letter ISO code.
19733
+ description: Country, 2-letter ISO 3166-1 alpha-2 code.
19327
19734
  Site:
19328
19735
  type: object
19329
19736
  properties:
@@ -19592,6 +19999,13 @@ components:
19592
19999
  type: string
19593
20000
  title: Billing Info ID
19594
20001
  description: Billing Info ID.
20002
+ active_invoice_id:
20003
+ type: string
20004
+ title: Active invoice ID
20005
+ description: The invoice ID of the latest invoice created for an active
20006
+ subscription.
20007
+ maxLength: 13
20008
+ readOnly: true
19595
20009
  SubscriptionAddOn:
19596
20010
  type: object
19597
20011
  title: Subscription Add-on
@@ -19871,6 +20285,13 @@ components:
19871
20285
  type: number
19872
20286
  format: float
19873
20287
  title: Unit amount
20288
+ tax_inclusive:
20289
+ type: boolean
20290
+ title: Tax Inclusive?
20291
+ default: false
20292
+ description: Determines whether or not tax is included in the unit amount.
20293
+ The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing
20294
+ feature) must be enabled to use this flag.
19874
20295
  quantity:
19875
20296
  type: integer
19876
20297
  title: Subscription quantity
@@ -19921,6 +20342,21 @@ components:
19921
20342
  format: date-time
19922
20343
  title: Deleted at
19923
20344
  readOnly: true
20345
+ billing_info:
20346
+ "$ref": "#/components/schemas/SubscriptionChangeBillingInfo"
20347
+ SubscriptionChangeBillingInfo:
20348
+ type: object
20349
+ description: Accept nested attributes for three_d_secure_action_result_token_id
20350
+ properties:
20351
+ three_d_secure_action_result_token_id:
20352
+ type: string
20353
+ title: 3-D Secure action result token ID
20354
+ description: A token generated by Recurly.js after completing a 3-D Secure
20355
+ device fingerprinting or authentication challenge.
20356
+ maxLength: 22
20357
+ SubscriptionChangeBillingInfoCreate:
20358
+ allOf:
20359
+ - "$ref": "#/components/schemas/SubscriptionChangeBillingInfo"
19924
20360
  SubscriptionChangeCreate:
19925
20361
  type: object
19926
20362
  properties:
@@ -19961,6 +20397,13 @@ components:
19961
20397
  be used.
19962
20398
  minimum: 0
19963
20399
  maximum: 1000000
20400
+ tax_inclusive:
20401
+ type: boolean
20402
+ title: Tax Inclusive?
20403
+ default: false
20404
+ description: Determines whether or not tax is included in the unit amount.
20405
+ The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing
20406
+ feature) must be enabled to use this flag.
19964
20407
  quantity:
19965
20408
  type: integer
19966
20409
  title: Quantity
@@ -20039,6 +20482,8 @@ components:
20039
20482
  mail order and telephone transactions.
20040
20483
  enum:
20041
20484
  - moto
20485
+ billing_info:
20486
+ "$ref": "#/components/schemas/SubscriptionChangeBillingInfoCreate"
20042
20487
  SubscriptionChangePreview:
20043
20488
  type: object
20044
20489
  allOf:
@@ -20091,7 +20536,8 @@ components:
20091
20536
  description: The `billing_info_id` is the value that represents a specific
20092
20537
  billing info for an end customer. When `billing_info_id` is used to assign
20093
20538
  billing info to the subscription, all future billing events for the subscription
20094
- will bill to the specified billing info.
20539
+ will bill to the specified billing info. `billing_info_id` can ONLY be
20540
+ used for sites utilizing the Wallet feature.
20095
20541
  shipping:
20096
20542
  title: Shipping address
20097
20543
  description: Create a shipping address on the account and assign it to the
@@ -20118,6 +20564,13 @@ components:
20118
20564
  the subscription plan for the provided currency.
20119
20565
  minimum: 0
20120
20566
  maximum: 1000000
20567
+ tax_inclusive:
20568
+ type: boolean
20569
+ title: Tax Inclusive?
20570
+ default: false
20571
+ description: Determines whether or not tax is included in the unit amount.
20572
+ The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing
20573
+ feature) must be enabled to use this flag.
20121
20574
  quantity:
20122
20575
  type: integer
20123
20576
  title: Quantity
@@ -20141,8 +20594,11 @@ components:
20141
20594
  type: string
20142
20595
  format: date-time
20143
20596
  title: Trial ends at
20144
- description: If set, overrides the default trial behavior for the subscription.
20145
- The date must be in the future.
20597
+ description: IIf set, overrides the default trial behavior for the subscription.
20598
+ When the current date time or a past date time is provided the subscription
20599
+ will begin with no trial phase (overriding any plan default trial). When
20600
+ a future date time is provided the subscription will begin with a trial
20601
+ phase ending at the specified date time.
20146
20602
  starts_at:
20147
20603
  type: string
20148
20604
  format: date-time
@@ -20248,10 +20704,17 @@ components:
20248
20704
  format: float
20249
20705
  title: Custom subscription pricing
20250
20706
  description: Override the unit amount of the subscription plan by setting
20251
- this value in cents. If not provided, the subscription will inherit the
20252
- price from the subscription plan for the provided currency.
20707
+ this value. If not provided, the subscription will inherit the price from
20708
+ the subscription plan for the provided currency.
20253
20709
  minimum: 0
20254
20710
  maximum: 1000000
20711
+ tax_inclusive:
20712
+ type: boolean
20713
+ title: Tax Inclusive?
20714
+ default: false
20715
+ description: Determines whether or not tax is included in the unit amount.
20716
+ The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing
20717
+ feature) must be enabled to use this flag.
20255
20718
  quantity:
20256
20719
  type: integer
20257
20720
  title: Quantity
@@ -20275,7 +20738,10 @@ components:
20275
20738
  format: date-time
20276
20739
  title: Trial ends at
20277
20740
  description: If set, overrides the default trial behavior for the subscription.
20278
- The date must be in the future.
20741
+ When the current date time or a past date time is provided the subscription
20742
+ will begin with no trial phase (overriding any plan default trial). When
20743
+ a future date time is provided the subscription will begin with a trial
20744
+ phase ending at the specified date time.
20279
20745
  starts_at:
20280
20746
  type: string
20281
20747
  format: date-time
@@ -20392,6 +20858,14 @@ components:
20392
20858
  at 31 days exactly.
20393
20859
  minimum: 0
20394
20860
  default: 0
20861
+ tax_inclusive:
20862
+ type: boolean
20863
+ title: Tax Inclusive?
20864
+ default: false
20865
+ description: This field is deprecated. Do not use it anymore to update a
20866
+ subscription's tax inclusivity. Use the POST subscription change route
20867
+ instead.
20868
+ deprecated: true
20395
20869
  shipping:
20396
20870
  "$ref": "#/components/schemas/SubscriptionShippingUpdate"
20397
20871
  billing_info_id:
@@ -20400,14 +20874,16 @@ components:
20400
20874
  description: The `billing_info_id` is the value that represents a specific
20401
20875
  billing info for an end customer. When `billing_info_id` is used to assign
20402
20876
  billing info to the subscription, all future billing events for the subscription
20403
- will bill to the specified billing info.
20877
+ will bill to the specified billing info. `billing_info_id` can ONLY be
20878
+ used for sites utilizing the Wallet feature.
20404
20879
  SubscriptionPause:
20405
20880
  type: object
20406
20881
  properties:
20407
20882
  remaining_pause_cycles:
20408
20883
  type: integer
20409
20884
  title: Remaining pause cycles
20410
- description: Number of billing cycles to pause the subscriptions.
20885
+ description: Number of billing cycles to pause the subscriptions. A value
20886
+ of 0 will cancel any pending pauses on the subscription.
20411
20887
  required:
20412
20888
  - remaining_pause_cycles
20413
20889
  SubscriptionShipping:
@@ -20516,6 +20992,38 @@ components:
20516
20992
  type: number
20517
20993
  format: float
20518
20994
  title: Rate
20995
+ tax_details:
20996
+ type: array
20997
+ description: Provides additional tax details for Canadian Sales Tax when
20998
+ there is tax applied at both the country and province levels. This will
20999
+ only be populated for the Invoice response when fetching a single invoice
21000
+ and not for the InvoiceList or LineItem.
21001
+ items:
21002
+ "$ref": "#/components/schemas/TaxDetail"
21003
+ TaxDetail:
21004
+ type: object
21005
+ title: Tax detail
21006
+ properties:
21007
+ type:
21008
+ type: string
21009
+ title: Type
21010
+ description: Provides the tax type for the region. For Canadian Sales Tax,
21011
+ this will be GST, HST, QST or PST.
21012
+ region:
21013
+ type: string
21014
+ title: Region
21015
+ description: Provides the tax region applied on an invoice. For Canadian
21016
+ Sales Tax, this will be either the 2 letter province code or country code.
21017
+ rate:
21018
+ type: number
21019
+ format: float
21020
+ title: Rate
21021
+ description: Provides the tax rate for the region.
21022
+ tax:
21023
+ type: number
21024
+ format: float
21025
+ title: Tax
21026
+ description: The total tax applied for this tax type.
20519
21027
  Transaction:
20520
21028
  type: object
20521
21029
  properties:
@@ -20612,6 +21120,10 @@ components:
20612
21120
  type: boolean
20613
21121
  title: Success?
20614
21122
  description: Did this transaction complete successfully?
21123
+ backup_payment_method_used:
21124
+ type: boolean
21125
+ title: Backup Payment Method Used?
21126
+ description: Indicates if the transaction was completed using a backup payment
20615
21127
  refunded:
20616
21128
  type: boolean
20617
21129
  title: Refunded?
@@ -20637,7 +21149,8 @@ components:
20637
21149
  - When the merchant enters billing information using the UI, no IP address is recorded.
20638
21150
  ip_address_country:
20639
21151
  type: string
20640
- title: IP address's country
21152
+ title: Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known
21153
+ by Recurly.
20641
21154
  status_code:
20642
21155
  type: string
20643
21156
  title: Status code
@@ -21031,7 +21544,8 @@ components:
21031
21544
  description: The `billing_info_id` is the value that represents a specific
21032
21545
  billing info for an end customer. When `billing_info_id` is used to assign
21033
21546
  billing info to the subscription, all future billing events for the subscription
21034
- will bill to the specified billing info.
21547
+ will bill to the specified billing info. `billing_info_id` can ONLY be
21548
+ used for sites utilizing the Wallet feature.
21035
21549
  collection_method:
21036
21550
  type: string
21037
21551
  title: Collection method
@@ -21136,6 +21650,155 @@ components:
21136
21650
  required:
21137
21651
  - currency
21138
21652
  - account
21653
+ DunningCampaign:
21654
+ type: object
21655
+ description: Settings for a dunning campaign.
21656
+ properties:
21657
+ id:
21658
+ type: string
21659
+ object:
21660
+ type: string
21661
+ title: Object type
21662
+ code:
21663
+ type: string
21664
+ description: Campaign code.
21665
+ name:
21666
+ type: string
21667
+ description: Campaign name.
21668
+ description:
21669
+ type: string
21670
+ description: Campaign description.
21671
+ default_campaign:
21672
+ type: boolean
21673
+ description: Whether or not this is the default campaign for accounts or
21674
+ plans without an assigned dunning campaign.
21675
+ dunning_cycles:
21676
+ type: array
21677
+ description: Dunning Cycle settings.
21678
+ items:
21679
+ "$ref": "#/components/schemas/DunningCycle"
21680
+ created_at:
21681
+ type: string
21682
+ format: date-time
21683
+ description: When the current campaign was created in Recurly.
21684
+ updated_at:
21685
+ type: string
21686
+ format: date-time
21687
+ description: When the current campaign was updated in Recurly.
21688
+ deleted_at:
21689
+ type: string
21690
+ format: date-time
21691
+ description: When the current campaign was deleted in Recurly.
21692
+ DunningCampaignList:
21693
+ type: object
21694
+ properties:
21695
+ object:
21696
+ type: string
21697
+ title: Object type
21698
+ description: Will always be List.
21699
+ has_more:
21700
+ type: boolean
21701
+ description: Indicates there are more results on subsequent pages.
21702
+ next:
21703
+ type: string
21704
+ description: Path to subsequent page of results.
21705
+ data:
21706
+ type: array
21707
+ items:
21708
+ "$ref": "#/components/schemas/DunningCampaign"
21709
+ DunningCycle:
21710
+ type: object
21711
+ properties:
21712
+ type:
21713
+ type: string
21714
+ description: The type of invoice this cycle applies to.
21715
+ enum:
21716
+ - automatic
21717
+ - manual
21718
+ - trial
21719
+ applies_to_manual_trial:
21720
+ type: boolean
21721
+ description: Whether the dunning settings will be applied to manual trials.
21722
+ Only applies to trial cycles.
21723
+ first_communication_interval:
21724
+ type: integer
21725
+ description: The number of days after a transaction failure before the first
21726
+ dunning email is sent.
21727
+ send_immediately_on_hard_decline:
21728
+ type: boolean
21729
+ description: Whether or not to send an extra email immediately to customers
21730
+ whose initial payment attempt fails with either a hard decline or invalid
21731
+ billing info.
21732
+ intervals:
21733
+ type: array
21734
+ description: Dunning intervals.
21735
+ items:
21736
+ "$ref": "#/components/schemas/DunningInterval"
21737
+ expire_subscription:
21738
+ type: boolean
21739
+ description: Whether the subscription(s) should be cancelled at the end
21740
+ of the dunning cycle.
21741
+ fail_invoice:
21742
+ type: boolean
21743
+ description: Whether the invoice should be failed at the end of the dunning
21744
+ cycle.
21745
+ total_dunning_days:
21746
+ type: integer
21747
+ description: The number of days between the first dunning email being sent
21748
+ and the end of the dunning cycle.
21749
+ total_recycling_days:
21750
+ type: integer
21751
+ description: The number of days between a transaction failure and the end
21752
+ of the dunning cycle.
21753
+ version:
21754
+ type: integer
21755
+ description: Current campaign version.
21756
+ created_at:
21757
+ type: string
21758
+ format: date-time
21759
+ description: When the current settings were created in Recurly.
21760
+ updated_at:
21761
+ type: string
21762
+ format: date-time
21763
+ description: When the current settings were updated in Recurly.
21764
+ DunningInterval:
21765
+ properties:
21766
+ days:
21767
+ type: integer
21768
+ description: Number of days before sending the next email.
21769
+ email_template:
21770
+ type: string
21771
+ description: Email template being used.
21772
+ DunningCampaignsBulkUpdate:
21773
+ properties:
21774
+ plan_codes:
21775
+ type: array
21776
+ maxItems: 200
21777
+ description: List of `plan_codes` associated with the Plans for which the
21778
+ dunning campaign should be updated. Required unless `plan_ids` is present.
21779
+ items:
21780
+ type: string
21781
+ plan_ids:
21782
+ type: array
21783
+ maxItems: 200
21784
+ description: List of `plan_ids` associated with the Plans for which the
21785
+ dunning campaign should be updated. Required unless `plan_codes` is present.
21786
+ items:
21787
+ type: string
21788
+ DunningCampaignsBulkUpdateResponse:
21789
+ properties:
21790
+ object:
21791
+ type: string
21792
+ title: Object type
21793
+ readOnly: true
21794
+ plans:
21795
+ type: array
21796
+ title: Plans
21797
+ description: An array containing all of the `Plan` resources that have been
21798
+ updated.
21799
+ maxItems: 200
21800
+ items:
21801
+ "$ref": "#/components/schemas/Plan"
21139
21802
  PaymentMethod:
21140
21803
  properties:
21141
21804
  object:
@@ -21157,6 +21820,7 @@ components:
21157
21820
  - gateway_token
21158
21821
  - iban_bank_account
21159
21822
  - other
21823
+ - braintree_v_zero
21160
21824
  card_type:
21161
21825
  type: string
21162
21826
  description: Visa, MasterCard, American Express, Discover, JCB, etc.
@@ -21174,6 +21838,7 @@ components:
21174
21838
  - Union Pay
21175
21839
  - Unknown
21176
21840
  - Visa
21841
+ - Tarjeta Naranja
21177
21842
  first_six:
21178
21843
  type: string
21179
21844
  description: Credit card number's first six digits.
@@ -21200,6 +21865,11 @@ components:
21200
21865
  description: A token used in place of a credit card in order to perform
21201
21866
  transactions.
21202
21867
  maxLength: 50
21868
+ cc_bin_country:
21869
+ type: string
21870
+ description: The 2-letter ISO 3166-1 alpha-2 country code associated with
21871
+ the credit card BIN, if known by Recurly. Available on the BillingInfo
21872
+ object only. Available when the BIN country lookup feature is enabled.
21203
21873
  gateway_code:
21204
21874
  type: string
21205
21875
  description: An identifier for a specific payment gateway.
@@ -21249,6 +21919,7 @@ components:
21249
21919
  - validation
21250
21920
  - missing_feature
21251
21921
  - rate_limited
21922
+ - tax_service_error
21252
21923
  message:
21253
21924
  type: string
21254
21925
  title: Message
@@ -21328,6 +21999,8 @@ components:
21328
21999
  - batch_processing_error
21329
22000
  - billing_agreement_already_accepted
21330
22001
  - billing_agreement_not_accepted
22002
+ - billing_agreement_not_found
22003
+ - billing_agreement_replaced
21331
22004
  - call_issuer
21332
22005
  - call_issuer_update_cardholder_data
21333
22006
  - cannot_refund_unsettled_transactions
@@ -21373,6 +22046,7 @@ components:
21373
22046
  - invalid_data
21374
22047
  - invalid_email
21375
22048
  - invalid_gateway_configuration
22049
+ - invalid_gateway_access_token
21376
22050
  - invalid_issuer
21377
22051
  - invalid_login
21378
22052
  - invalid_merchant_type