recurly 3.14.0 → 3.15.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2bb35c82f1aea79ead43c5b2158031d946b71f6b21ce9118467d0f391fd000d6
4
- data.tar.gz: 204672929d178c8bd4485d0386767469f27fed7965c1f8c64313424ecadb73c7
3
+ metadata.gz: ecaa5f1cc2110480aac4355c469c84d7a423badce1a4860cd494ab9e4966a118
4
+ data.tar.gz: b5c805224d670c22eed575410d51af2e801279f7f5dae0d274d84ecc60731363
5
5
  SHA512:
6
- metadata.gz: fa8dfba5a7d51261f92dfdfe1fe232ac580a00180c1c304592834b60f22afe0d8ddc9256652b5be40d2c3fd35fa72442e99260dd9e6be922e31c57069e088b59
7
- data.tar.gz: 8d0a7738e9f8d97d1a9f2129e984d033e22ae72de0913ffca507de8c30fb19961e02d828c6530fa75e43274179c3ff6c15288c96c57f8cf5e0f7b60ec9daae5a
6
+ metadata.gz: 322cf51b9d06fb661860d02603896a370b92b0292eae793a1ec911bd5528f8452180e76a80199f0f938b9ff4f7c8458001941a18f899c3bdfdd6b49aaf6e0963
7
+ data.tar.gz: 2cace6d2929076220ae9f029865a9bc6ca73e66edd0bafb66bce496e5e70985bb1da9a72fa0265c659c725a187a1fdc42730b696524bc1a66bdd84495ccc6958
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 3.14.0
2
+ current_version = 3.15.0
3
3
  parse = (?P<major>\d+)
4
4
  \.(?P<minor>\d+)
5
5
  \.(?P<patch>\d+)
@@ -1,8 +1,20 @@
1
1
  # Changelog
2
2
 
3
- ## [3.14.0](https://github.com/recurly/recurly-client-ruby/tree/HEAD)
3
+ ## [3.15.0](https://github.com/recurly/recurly-client-ruby/tree/HEAD)
4
4
 
5
- [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.13.0...HEAD)
5
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.14.0...HEAD)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Latest Changes for 2019-10-10 \(Wallet, Item Coupons\) [\#645](https://github.com/recurly/recurly-client-ruby/pull/645) ([douglasmiller](https://github.com/douglasmiller))
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Release 3.15.0 [\#647](https://github.com/recurly/recurly-client-ruby/pull/647) ([douglasmiller](https://github.com/douglasmiller))
14
+
15
+ ## [3.14.0](https://github.com/recurly/recurly-client-ruby/tree/3.14.0) (2020-10-20)
16
+
17
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.13.0...3.14.0)
6
18
 
7
19
  **Implemented enhancements:**
8
20
 
@@ -5,7 +5,7 @@ This repository houses the official ruby client for Recurly's V3 API.
5
5
  In your Gemfile, add `recurly` as a dependency.
6
6
 
7
7
  ```ruby
8
- gem 'recurly', '~> 3.14'
8
+ gem 'recurly', '~> 3.15'
9
9
  ```
10
10
 
11
11
  > *Note*: We try to follow [semantic versioning](https://semver.org/) and will only apply breaking changes to major versions.
@@ -444,6 +444,103 @@ module Recurly
444
444
  delete(path, **options)
445
445
  end
446
446
 
447
+ # Get the list of billing information associated with an account
448
+ #
449
+ # {https://developers.recurly.com/api/v2019-10-10#operation/list_billing_infos list_billing_infos api documenation}
450
+ #
451
+ # @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 ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
453
+ # commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
454
+ #
455
+ # *Important notes:*
456
+ #
457
+ # * The +ids+ parameter cannot be used with any other ordering or filtering
458
+ # parameters (+limit+, +order+, +sort+, +begin_time+, +end_time+, etc)
459
+ # * Invalid or unknown IDs will be ignored, so you should check that the
460
+ # results correspond to your request.
461
+ # * Records are returned in an arbitrary order. Since results are all
462
+ # returned at once you can sort the records yourself.
463
+ #
464
+ # @param sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
465
+ # order. In descending order updated records will move behind the cursor and could
466
+ # prevent some records from being returned.
467
+ #
468
+ # @param begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
469
+ # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
470
+ #
471
+ # @param end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
472
+ # *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
473
+ #
474
+ # @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+.
475
+ #
476
+ # @return [Pager<Resources::BillingInfo>] A list of the the billing information for an account's
477
+ #
478
+ def list_billing_infos(account_id:, **options)
479
+ path = interpolate_path("/accounts/{account_id}/billing_infos", account_id: account_id)
480
+ pager(path, **options)
481
+ end
482
+
483
+ # Set an account's billing information when the wallet feature is enabled
484
+ #
485
+ # {https://developers.recurly.com/api/v2019-10-10#operation/create_billing_info create_billing_info api documenation}
486
+ #
487
+ # @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
+ # @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 site_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
+ #
491
+ # @return [Resources::BillingInfo] Updated billing information.
492
+ #
493
+ def create_billing_info(account_id:, body:, **options)
494
+ path = interpolate_path("/accounts/{account_id}/billing_infos", account_id: account_id)
495
+ post(path, body, Requests::BillingInfoCreate, **options)
496
+ end
497
+
498
+ # Fetch a billing info
499
+ #
500
+ # {https://developers.recurly.com/api/v2019-10-10#operation/get_a_billing_info get_a_billing_info api documenation}
501
+ #
502
+ # @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
+ # @param billing_info_id [String] Billing Info ID.
504
+ # @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+.
505
+ #
506
+ # @return [Resources::BillingInfo] A billing info.
507
+ #
508
+ def get_a_billing_info(account_id:, billing_info_id:, **options)
509
+ path = interpolate_path("/accounts/{account_id}/billing_infos/{billing_info_id}", account_id: account_id, billing_info_id: billing_info_id)
510
+ get(path, **options)
511
+ end
512
+
513
+ # Update an account's billing information
514
+ #
515
+ # {https://developers.recurly.com/api/v2019-10-10#operation/update_a_billing_info update_a_billing_info api documenation}
516
+ #
517
+ # @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
+ # @param billing_info_id [String] Billing Info ID.
519
+ # @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 site_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
+ #
522
+ # @return [Resources::BillingInfo] Updated billing information.
523
+ #
524
+ def update_a_billing_info(account_id:, billing_info_id:, body:, **options)
525
+ path = interpolate_path("/accounts/{account_id}/billing_infos/{billing_info_id}", account_id: account_id, billing_info_id: billing_info_id)
526
+ put(path, body, Requests::BillingInfoCreate, **options)
527
+ end
528
+
529
+ # Remove an account's billing information
530
+ #
531
+ # {https://developers.recurly.com/api/v2019-10-10#operation/remove_a_billing_info remove_a_billing_info api documenation}
532
+ #
533
+ # @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
+ # @param billing_info_id [String] Billing Info ID.
535
+ # @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+.
536
+ #
537
+ # @return [Resources::Empty] Billing information deleted
538
+ #
539
+ def remove_a_billing_info(account_id:, billing_info_id:, **options)
540
+ path = interpolate_path("/accounts/{account_id}/billing_infos/{billing_info_id}", account_id: account_id, billing_info_id: billing_info_id)
541
+ delete(path, **options)
542
+ end
543
+
447
544
  # Show the coupon redemptions for an account
448
545
  #
449
546
  # {https://developers.recurly.com/api/v2019-10-10#operation/list_account_coupon_redemptions list_account_coupon_redemptions api documenation}
@@ -26,6 +26,8 @@ module Recurly
26
26
 
27
27
  class InternalServerError < ServerError; end
28
28
 
29
+ class ServiceNotAvailableError < InternalServerError; end
30
+
29
31
  class BadGatewayError < ServerError; end
30
32
 
31
33
  class ServiceUnavailableError < ServerError; end
@@ -74,6 +74,10 @@ module Recurly
74
74
  # @return [String] PayPal billing agreement ID
75
75
  define_attribute :paypal_billing_agreement_id, String
76
76
 
77
+ # @!attribute primary_payment_method
78
+ # @return [Boolean] The `primary_payment_method` indicator is used to designate the primary billing info on the account. The first billing info created on an account will always become primary. Adding additional billing infos provides the flexibility to mark another billing info as primary, or adding additional non-primary billing infos. This can be accomplished by passing the `primary_payment_method` indicator. When adding billing infos via the billing_info and /accounts endpoints, this value is not permitted, and will return an error if provided.
79
+ define_attribute :primary_payment_method, :Boolean
80
+
77
81
  # @!attribute routing_number
78
82
  # @return [String] The bank's rounting number. (ACH only)
79
83
  define_attribute :routing_number, String
@@ -6,6 +6,10 @@ module Recurly
6
6
  module Requests
7
7
  class CouponCreate < Request
8
8
 
9
+ # @!attribute applies_to_all_items
10
+ # @return [Boolean] To apply coupon to Items in your Catalog, include a list of `item_codes` in the request that the coupon will apply to. Or set value to true to apply to all Items in your Catalog. The following values are not permitted when `applies_to_all_items` is included: `free_trial_amount` and `free_trial_unit`.
11
+ define_attribute :applies_to_all_items, :Boolean
12
+
9
13
  # @!attribute applies_to_all_plans
10
14
  # @return [Boolean] The coupon is valid for all plans if true. If false then `plans` and `plans_names` will list the applicable plans.
11
15
  define_attribute :applies_to_all_plans, :Boolean
@@ -54,6 +58,10 @@ module Recurly
54
58
  # @return [String] Description of the coupon on the invoice.
55
59
  define_attribute :invoice_description, String
56
60
 
61
+ # @!attribute item_codes
62
+ # @return [Array[String]] List of item codes to which this coupon applies. Sending `item_codes` is only permitted when `applies_to_all_items` is set to false. The following values are not permitted when `item_codes` is included: `free_trial_amount` and `free_trial_unit`.
63
+ define_attribute :item_codes, Array, { :item_type => String }
64
+
57
65
  # @!attribute max_redemptions
58
66
  # @return [Integer] A maximum number of redemptions for the coupon. The coupon will expire when it hits its maximum redemptions.
59
67
  define_attribute :max_redemptions, Integer
@@ -6,6 +6,10 @@ module Recurly
6
6
  module Requests
7
7
  class InvoiceCollect < Request
8
8
 
9
+ # @!attribute billing_info_id
10
+ # @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info.
11
+ define_attribute :billing_info_id, String
12
+
9
13
  # @!attribute three_d_secure_action_result_token_id
10
14
  # @return [String] A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge.
11
15
  define_attribute :three_d_secure_action_result_token_id, String
@@ -10,6 +10,10 @@ module Recurly
10
10
  # @return [Boolean] Whether the subscription renews at the end of its term.
11
11
  define_attribute :auto_renew, :Boolean
12
12
 
13
+ # @!attribute billing_info_id
14
+ # @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info.
15
+ define_attribute :billing_info_id, String
16
+
13
17
  # @!attribute collection_method
14
18
  # @return [String] Change collection method
15
19
  define_attribute :collection_method, String
@@ -46,6 +46,10 @@ module Recurly
46
46
  # @return [PaymentMethod]
47
47
  define_attribute :payment_method, :PaymentMethod
48
48
 
49
+ # @!attribute primary_payment_method
50
+ # @return [Boolean] The `primary_payment_method` indicator is used to designate the primary billing info on the account. The first billing info created on an account will always become primary. Adding additional billing infos provides the flexibility to mark another billing info as primary, or adding additional non-primary billing infos. This can be accomplished by passing the `primary_payment_method` indicator. When adding billing infos via the billing_info and /accounts endpoints, this value is not permitted, and will return an error if provided.
51
+ define_attribute :primary_payment_method, :Boolean
52
+
49
53
  # @!attribute updated_at
50
54
  # @return [DateTime] When the billing information was last changed.
51
55
  define_attribute :updated_at, DateTime
@@ -6,6 +6,10 @@ module Recurly
6
6
  module Resources
7
7
  class Coupon < Resource
8
8
 
9
+ # @!attribute applies_to_all_items
10
+ # @return [Boolean] The coupon is valid for all items if true. If false then `items` will list the applicable items.
11
+ define_attribute :applies_to_all_items, :Boolean
12
+
9
13
  # @!attribute applies_to_all_plans
10
14
  # @return [Boolean] The coupon is valid for all plans if true. If false then `plans` and `plans_names` will list the applicable plans.
11
15
  define_attribute :applies_to_all_plans, :Boolean
@@ -66,6 +70,10 @@ module Recurly
66
70
  # @return [String] Description of the coupon on the invoice.
67
71
  define_attribute :invoice_description, String
68
72
 
73
+ # @!attribute items
74
+ # @return [Array[ItemMini]] A list of items for which this coupon applies. This will be `null` if `applies_to_all_items=true`.
75
+ define_attribute :items, Array, { :item_type => :ItemMini }
76
+
69
77
  # @!attribute max_redemptions
70
78
  # @return [Integer] A maximum number of redemptions for the coupon. The coupon will expire when it hits its maximum redemptions.
71
79
  define_attribute :max_redemptions, Integer
@@ -18,6 +18,10 @@ module Recurly
18
18
  # @return [Float] The outstanding balance remaining on this invoice.
19
19
  define_attribute :balance, Float
20
20
 
21
+ # @!attribute billing_info_id
22
+ # @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info.
23
+ define_attribute :billing_info_id, String
24
+
21
25
  # @!attribute closed_at
22
26
  # @return [DateTime] Date invoice was marked paid or failed.
23
27
  define_attribute :closed_at, DateTime
@@ -30,6 +30,10 @@ module Recurly
30
30
  # @return [DateTime] Recurring subscriptions paid with ACH will have this attribute set. This timestamp is used for alerting customers to reauthorize in 3 years in accordance with NACHA rules. If a subscription becomes inactive or the billing info is no longer a bank account, this timestamp is cleared.
31
31
  define_attribute :bank_account_authorized_at, DateTime
32
32
 
33
+ # @!attribute billing_info_id
34
+ # @return [String] Billing Info ID.
35
+ define_attribute :billing_info_id, String
36
+
33
37
  # @!attribute canceled_at
34
38
  # @return [DateTime] Canceled at
35
39
  define_attribute :canceled_at, DateTime
@@ -1,3 +1,3 @@
1
1
  module Recurly
2
- VERSION = "3.14.0"
2
+ VERSION = "3.15.0"
3
3
  end
@@ -1974,8 +1974,8 @@ paths:
1974
1974
  summary: Set an account's billing information
1975
1975
  description: |
1976
1976
  If you're using Recurly.js to securely submit data from webforms without sending it through your server,
1977
- you can associate the billing information with an account by passing in the `token_id`. Be sure to only
1978
- set this field.
1977
+ you can associate the billing information with an account by passing in the `token_id`. The only other
1978
+ field permitted with `token_id` is `primary_payment_method`.
1979
1979
 
1980
1980
  For credit card payments you'll need the following required fields:
1981
1981
 
@@ -2250,6 +2250,221 @@ paths:
2250
2250
  {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected
2251
2251
  Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfmt.Printf(\"Removed Billing
2252
2252
  Info: %v\", billingInfo)"
2253
+ "/sites/{site_id}/accounts/{account_id}/billing_infos":
2254
+ get:
2255
+ tags:
2256
+ - account
2257
+ - billing_info
2258
+ operationId: list_billing_infos
2259
+ summary: Get the list of billing information associated with an account
2260
+ description: See the [Pagination Guide](/guides/pagination.html) to learn how
2261
+ to use pagination in the API and Client Libraries.
2262
+ parameters:
2263
+ - "$ref": "#/components/parameters/site_id"
2264
+ - "$ref": "#/components/parameters/account_id"
2265
+ - "$ref": "#/components/parameters/ids"
2266
+ - "$ref": "#/components/parameters/sort_dates"
2267
+ - "$ref": "#/components/parameters/filter_begin_time"
2268
+ - "$ref": "#/components/parameters/filter_end_time"
2269
+ responses:
2270
+ '200':
2271
+ description: A list of the the billing information for an account's
2272
+ content:
2273
+ application/json:
2274
+ schema:
2275
+ "$ref": "#/components/schemas/BillingInfoList"
2276
+ '400':
2277
+ description: Invalid or unpermitted parameter
2278
+ content:
2279
+ application/json:
2280
+ schema:
2281
+ "$ref": "#/components/schemas/Error"
2282
+ '404':
2283
+ description: Incorrect site or account
2284
+ content:
2285
+ application/json:
2286
+ schema:
2287
+ "$ref": "#/components/schemas/Error"
2288
+ x-code-samples: []
2289
+ post:
2290
+ tags:
2291
+ - account
2292
+ - billing_info
2293
+ operationId: create_billing_info
2294
+ summary: Set an account's billing information when the wallet feature is enabled
2295
+ description: |
2296
+ If you're using Recurly.js to securely submit data from webforms without sending it through your server,
2297
+ you can associate the billing information with an account by passing in the `token_id`. The only other
2298
+ field permitted with `token_id` is `primary_payment_method`.
2299
+
2300
+ For credit card payments you'll need the following required fields:
2301
+
2302
+ - first_name
2303
+ - last_name
2304
+ - number
2305
+ - month
2306
+ - year
2307
+
2308
+ For external (not Recurly.js) tokenized payments you'll need the following required fields:
2309
+
2310
+ - first_name
2311
+ - last_name
2312
+ - gateway_token
2313
+ - gateway_code
2314
+ parameters:
2315
+ - "$ref": "#/components/parameters/site_id"
2316
+ - "$ref": "#/components/parameters/account_id"
2317
+ requestBody:
2318
+ content:
2319
+ application/json:
2320
+ schema:
2321
+ "$ref": "#/components/schemas/BillingInfoCreate"
2322
+ required: true
2323
+ responses:
2324
+ '200':
2325
+ description: Updated billing information.
2326
+ content:
2327
+ application/json:
2328
+ schema:
2329
+ "$ref": "#/components/schemas/BillingInfo"
2330
+ '400':
2331
+ description: Bad request, perhaps invalid JSON?
2332
+ content:
2333
+ application/json:
2334
+ schema:
2335
+ "$ref": "#/components/schemas/Error"
2336
+ '404':
2337
+ description: Incorrect site or account ID.
2338
+ content:
2339
+ application/json:
2340
+ schema:
2341
+ "$ref": "#/components/schemas/Error"
2342
+ '422':
2343
+ description: Invalid billing information, or error running the verification
2344
+ transaction.
2345
+ content:
2346
+ application/json:
2347
+ schema:
2348
+ "$ref": "#/components/schemas/ErrorMayHaveTransaction"
2349
+ x-code-samples: []
2350
+ "/sites/{site_id}/accounts/{account_id}/billing_infos/{billing_info_id}":
2351
+ get:
2352
+ tags:
2353
+ - account
2354
+ - billing_info
2355
+ operationId: get_a_billing_info
2356
+ summary: Fetch a billing info
2357
+ parameters:
2358
+ - "$ref": "#/components/parameters/site_id"
2359
+ - "$ref": "#/components/parameters/account_id"
2360
+ - "$ref": "#/components/parameters/billing_info_id"
2361
+ responses:
2362
+ '200':
2363
+ description: A billing info.
2364
+ content:
2365
+ application/json:
2366
+ schema:
2367
+ "$ref": "#/components/schemas/BillingInfo"
2368
+ '404':
2369
+ description: Incorrect site, account, or billing info ID.
2370
+ content:
2371
+ application/json:
2372
+ schema:
2373
+ "$ref": "#/components/schemas/Error"
2374
+ x-code-samples: []
2375
+ put:
2376
+ tags:
2377
+ - account
2378
+ - billing_info
2379
+ operationId: update_a_billing_info
2380
+ summary: Update an account's billing information
2381
+ description: |
2382
+ If you're using Recurly.js to securely submit data from webforms without sending it through your server,
2383
+ you can associate the billing information with an account by passing in the `token_id`. The only other
2384
+ field permitted with `token_id` is `primary_payment_method`.
2385
+
2386
+ For credit card payments you'll need the following required fields:
2387
+
2388
+ - first_name
2389
+ - last_name
2390
+ - number
2391
+ - month
2392
+ - year
2393
+
2394
+ For external (not Recurly.js) tokenized payments you'll need the following required fields:
2395
+
2396
+ - first_name
2397
+ - last_name
2398
+ - gateway_token
2399
+ - gateway_code
2400
+ parameters:
2401
+ - "$ref": "#/components/parameters/site_id"
2402
+ - "$ref": "#/components/parameters/account_id"
2403
+ - "$ref": "#/components/parameters/billing_info_id"
2404
+ requestBody:
2405
+ content:
2406
+ application/json:
2407
+ schema:
2408
+ "$ref": "#/components/schemas/BillingInfoCreate"
2409
+ required: true
2410
+ responses:
2411
+ '200':
2412
+ description: Updated billing information.
2413
+ content:
2414
+ application/json:
2415
+ schema:
2416
+ "$ref": "#/components/schemas/BillingInfo"
2417
+ '400':
2418
+ description: Bad request, perhaps invalid JSON?
2419
+ content:
2420
+ application/json:
2421
+ schema:
2422
+ "$ref": "#/components/schemas/Error"
2423
+ '404':
2424
+ description: Incorrect site or account ID.
2425
+ content:
2426
+ application/json:
2427
+ schema:
2428
+ "$ref": "#/components/schemas/Error"
2429
+ '422':
2430
+ description: Invalid billing information, or error running the verification
2431
+ transaction.
2432
+ content:
2433
+ application/json:
2434
+ schema:
2435
+ "$ref": "#/components/schemas/ErrorMayHaveTransaction"
2436
+ x-code-samples: []
2437
+ delete:
2438
+ tags:
2439
+ - account
2440
+ - billing_info
2441
+ operationId: remove_a_billing_info
2442
+ summary: Remove an account's billing information
2443
+ parameters:
2444
+ - "$ref": "#/components/parameters/site_id"
2445
+ - "$ref": "#/components/parameters/account_id"
2446
+ - "$ref": "#/components/parameters/billing_info_id"
2447
+ description: You may remove any stored billing information for an account. If
2448
+ the account has a subscription, the renewal will go into dunning unless the
2449
+ billing information is updated before the renewal occurs.
2450
+ responses:
2451
+ '204':
2452
+ description: Billing information deleted
2453
+ '404':
2454
+ description: Account has no billing information, or incorrect site or account
2455
+ ID.
2456
+ content:
2457
+ application/json:
2458
+ schema:
2459
+ "$ref": "#/components/schemas/Error"
2460
+ '422':
2461
+ description: Billing info cannot be deleted. Please set a new primary billing
2462
+ info before deleting this billing info
2463
+ content:
2464
+ application/json:
2465
+ schema:
2466
+ "$ref": "#/components/schemas/Error"
2467
+ x-code-samples: []
2253
2468
  "/sites/{site_id}/accounts/{account_id}/coupon_redemptions":
2254
2469
  get:
2255
2470
  tags:
@@ -13933,6 +14148,13 @@ components:
13933
14148
  required: true
13934
14149
  schema:
13935
14150
  type: string
14151
+ billing_info_id:
14152
+ name: billing_info_id
14153
+ in: path
14154
+ description: Billing Info ID.
14155
+ required: true
14156
+ schema:
14157
+ type: string
13936
14158
  usage_id:
13937
14159
  name: usage_id
13938
14160
  in: path
@@ -14360,6 +14582,23 @@ components:
14360
14582
  type: array
14361
14583
  items:
14362
14584
  "$ref": "#/components/schemas/AddOn"
14585
+ BillingInfoList:
14586
+ type: object
14587
+ properties:
14588
+ object:
14589
+ type: string
14590
+ title: Object type
14591
+ description: Will always be List.
14592
+ has_more:
14593
+ type: boolean
14594
+ description: Indicates there are more results on subsequent pages.
14595
+ next:
14596
+ type: string
14597
+ description: Path to subsequent page of results.
14598
+ data:
14599
+ type: array
14600
+ items:
14601
+ "$ref": "#/components/schemas/BillingInfo"
14363
14602
  CreditPaymentList:
14364
14603
  type: object
14365
14604
  properties:
@@ -15717,6 +15956,16 @@ components:
15717
15956
  risk_rules_triggered:
15718
15957
  type: object
15719
15958
  title: Kount rules
15959
+ primary_payment_method:
15960
+ type: boolean
15961
+ description: The `primary_payment_method` indicator is used to designate
15962
+ the primary billing info on the account. The first billing info created
15963
+ on an account will always become primary. Adding additional billing infos
15964
+ provides the flexibility to mark another billing info as primary, or adding
15965
+ additional non-primary billing infos. This can be accomplished by passing
15966
+ the `primary_payment_method` indicator. When adding billing infos via
15967
+ the billing_info and /accounts endpoints, this value is not permitted,
15968
+ and will return an error if provided.
15720
15969
  created_at:
15721
15970
  type: string
15722
15971
  format: date-time
@@ -15857,6 +16106,17 @@ components:
15857
16106
  - checking
15858
16107
  - savings
15859
16108
  description: The bank account type. (ACH only)
16109
+ primary_payment_method:
16110
+ type: boolean
16111
+ title: Primary Payment Method
16112
+ description: The `primary_payment_method` indicator is used to designate
16113
+ the primary billing info on the account. The first billing info created
16114
+ on an account will always become primary. Adding additional billing infos
16115
+ provides the flexibility to mark another billing info as primary, or adding
16116
+ additional non-primary billing infos. This can be accomplished by passing
16117
+ the `primary_payment_method` indicator. When adding billing infos via
16118
+ the billing_info and /accounts endpoints, this value is not permitted,
16119
+ and will return an error if provided.
15860
16120
  Coupon:
15861
16121
  type: object
15862
16122
  properties:
@@ -15955,6 +16215,13 @@ components:
15955
16215
  description: The coupon is valid for all plans if true. If false then `plans`
15956
16216
  and `plans_names` will list the applicable plans.
15957
16217
  default: true
16218
+ applies_to_all_items:
16219
+ type: boolean
16220
+ title: Applies to all items?
16221
+ description: |
16222
+ The coupon is valid for all items if true. If false then `items`
16223
+ will list the applicable items.
16224
+ default: false
15958
16225
  applies_to_non_plan_charges:
15959
16226
  type: boolean
15960
16227
  title: Applied to all non-plan charges?
@@ -15973,6 +16240,14 @@ components:
15973
16240
  `null` if `applies_to_all_plans=true`.
15974
16241
  items:
15975
16242
  "$ref": "#/components/schemas/PlanMini"
16243
+ items:
16244
+ type: array
16245
+ title: Items
16246
+ description: |
16247
+ A list of items for which this coupon applies. This will be
16248
+ `null` if `applies_to_all_items=true`.
16249
+ items:
16250
+ "$ref": "#/components/schemas/ItemMini"
15976
16251
  redemption_resource:
15977
16252
  type: string
15978
16253
  title: Redemption resource
@@ -16101,6 +16376,16 @@ components:
16101
16376
  The coupon is valid for all plans if true. If false then
16102
16377
  `plans` and `plans_names` will list the applicable plans.
16103
16378
  default: true
16379
+ applies_to_all_items:
16380
+ type: boolean
16381
+ title: Applies to all items?
16382
+ description: |
16383
+ To apply coupon to Items in your Catalog, include a list
16384
+ of `item_codes` in the request that the coupon will apply to. Or set value
16385
+ to true to apply to all Items in your Catalog. The following values
16386
+ are not permitted when `applies_to_all_items` is included: `free_trial_amount`
16387
+ and `free_trial_unit`.
16388
+ default: false
16104
16389
  plan_codes:
16105
16390
  type: array
16106
16391
  title: Plan codes
@@ -16110,6 +16395,16 @@ components:
16110
16395
  when `applies_to_all_plans` is true.
16111
16396
  items:
16112
16397
  type: string
16398
+ item_codes:
16399
+ type: array
16400
+ title: Item codes
16401
+ description: |
16402
+ List of item codes to which this coupon applies. Sending
16403
+ `item_codes` is only permitted when `applies_to_all_items` is set to false.
16404
+ The following values are not permitted when `item_codes` is included:
16405
+ `free_trial_amount` and `free_trial_unit`.
16406
+ items:
16407
+ type: string
16113
16408
  duration:
16114
16409
  type: string
16115
16410
  title: Duration
@@ -16926,6 +17221,13 @@ components:
16926
17221
  - voided
16927
17222
  account:
16928
17223
  "$ref": "#/components/schemas/AccountMini"
17224
+ billing_info_id:
17225
+ type: string
17226
+ title: Billing info ID
17227
+ description: The `billing_info_id` is the value that represents a specific
17228
+ billing info for an end customer. When `billing_info_id` is used to assign
17229
+ billing info to the subscription, all future billing events for the subscription
17230
+ will bill to the specified billing info.
16929
17231
  subscription_ids:
16930
17232
  type: array
16931
17233
  title: Subscription IDs
@@ -17167,6 +17469,13 @@ components:
17167
17469
  mail order and telephone transactions.
17168
17470
  enum:
17169
17471
  - moto
17472
+ billing_info_id:
17473
+ type: string
17474
+ title: Billing Info ID
17475
+ description: The `billing_info_id` is the value that represents a specific
17476
+ billing info for an end customer. When `billing_info_id` is used to assign
17477
+ billing info to the subscription, all future billing events for the subscription
17478
+ will bill to the specified billing info.
17170
17479
  InvoiceCollection:
17171
17480
  type: object
17172
17481
  title: Invoice collection
@@ -19165,6 +19474,10 @@ components:
19165
19474
  set. This timestamp is used for alerting customers to reauthorize in 3
19166
19475
  years in accordance with NACHA rules. If a subscription becomes inactive
19167
19476
  or the billing info is no longer a bank account, this timestamp is cleared.
19477
+ billing_info_id:
19478
+ type: string
19479
+ title: Billing Info ID
19480
+ description: Billing Info ID.
19168
19481
  SubscriptionAddOn:
19169
19482
  type: object
19170
19483
  title: Subscription Add-on
@@ -19957,6 +20270,13 @@ components:
19957
20270
  default: 0
19958
20271
  shipping:
19959
20272
  "$ref": "#/components/schemas/SubscriptionShippingUpdate"
20273
+ billing_info_id:
20274
+ type: string
20275
+ title: Billing Info ID
20276
+ description: The `billing_info_id` is the value that represents a specific
20277
+ billing info for an end customer. When `billing_info_id` is used to assign
20278
+ billing info to the subscription, all future billing events for the subscription
20279
+ will bill to the specified billing info.
19960
20280
  SubscriptionPause:
19961
20281
  type: object
19962
20282
  properties:
@@ -20789,6 +21109,7 @@ components:
20789
21109
  - invalid_permissions
20790
21110
  - invalid_token
20791
21111
  - not_found
21112
+ - service_not_available
20792
21113
  - simultaneous_request
20793
21114
  - transaction
20794
21115
  - unauthorized
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recurly
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.14.0
4
+ version: 3.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-20 00:00:00.000000000 Z
11
+ date: 2020-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -293,7 +293,7 @@ metadata:
293
293
  changelog_uri: https://github.com/recurly/recurly-client-ruby/blob/master/CHANGELOG.md
294
294
  documentation_uri: https://recurly.github.io/recurly-client-ruby/
295
295
  homepage_uri: https://github.com/recurly/recurly-client-ruby
296
- source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/3.14.0
296
+ source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/3.15.0
297
297
  post_install_message:
298
298
  rdoc_options: []
299
299
  require_paths: