recurly 4.3.0 → 4.7.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: 946f99f504cb40b5cfe6d19fa930a2a2f56e9e65896ae117f51f6dc765c93520
4
- data.tar.gz: 17f8e1d63237dd4a442afa351a89a84880ae189a31224b3de855d2c932808397
3
+ metadata.gz: 2e93393e1aee1ef2ace7f7df79d0f815b9ab54a99189807f92070b327d940307
4
+ data.tar.gz: 2ea549f2a93dda275202ce603c6a53e8b00a88c2eda91d212f473c66a0bea981
5
5
  SHA512:
6
- metadata.gz: a882e57fd39d3519f308f1bcaeb5a3eced0674ab9d6b2425b561b7a66a30e414df91e844c6b237239e45c796a30999a0ba6137aadbaa955cfb5d4f702ee817cf
7
- data.tar.gz: 1d5ba672b2caf851be6dd564b3fec80572588620bd3ca5a01729e0bba5b5a5ec4c05957ff54daa18cadba2554bb1a7c417c1931eb9eddab511e887245494bed3
6
+ metadata.gz: e64f85ad01d99cb0001717137bfe8011c06cee11e5ac932d26042f297261d50d8ab54dfbf926c8811ae5f370c12609410fcaac082fa40c1abca3b99de7eaacd5
7
+ data.tar.gz: de50a1d18e695ce700b0f1125a68045c07e212c919236a485df2dcb21ed7e16b035cafde525c07c43275629c8fc64640565c605fb2d9c86ed5b41d70e4e3e0c7
data/.bumpversion.cfg CHANGED
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 4.3.0
2
+ current_version = 4.7.0
3
3
  parse = (?P<major>\d+)
4
4
  \.(?P<minor>\d+)
5
5
  \.(?P<patch>\d+)
data/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.7.0](https://github.com/recurly/recurly-client-ruby/tree/4.7.0) (2021-08-19)
4
+
5
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.6.0...4.7.0)
6
+
7
+
8
+ **Merged Pull Requests**
9
+
10
+ - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#722](https://github.com/recurly/recurly-client-ruby/pull/722) ([recurly-integrations](https://github.com/recurly-integrations))
11
+
12
+
13
+
14
+ ## [4.6.0](https://github.com/recurly/recurly-client-ruby/tree/4.6.0) (2021-08-11)
15
+
16
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.5.0...4.6.0)
17
+
18
+
19
+ **Merged Pull Requests**
20
+
21
+ - Generated Latest Changes for v2021-02-25 [#720](https://github.com/recurly/recurly-client-ruby/pull/720) ([recurly-integrations](https://github.com/recurly-integrations))
22
+
23
+
24
+
25
+ ## [4.5.0](https://github.com/recurly/recurly-client-ruby/tree/4.5.0) (2021-08-02)
26
+
27
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.4.0...4.5.0)
28
+
29
+
30
+ **Merged Pull Requests**
31
+
32
+ - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-ruby/pull/714) ([recurly-integrations](https://github.com/recurly-integrations))
33
+
34
+
35
+
36
+ ## [4.4.0](https://github.com/recurly/recurly-client-ruby/tree/4.4.0) (2021-06-15)
37
+
38
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.3.0...4.4.0)
39
+
40
+
41
+ **Merged Pull Requests**
42
+
43
+ - Generated Latest Changes for v2021-02-25 [#705](https://github.com/recurly/recurly-client-ruby/pull/705) ([recurly-integrations](https://github.com/recurly-integrations))
44
+
45
+
46
+
3
47
  ## [4.3.0](https://github.com/recurly/recurly-client-ruby/tree/4.3.0) (2021-06-04)
4
48
 
5
49
  [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.2.0...4.3.0)
data/GETTING_STARTED.md CHANGED
@@ -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', '~> 4.3'
8
+ gem 'recurly', '~> 4.7'
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.
@@ -3300,6 +3300,20 @@ module Recurly
3300
3300
  put(path, **options)
3301
3301
  end
3302
3302
 
3303
+ # Fetch a preview of a subscription's renewal invoice(s)
3304
+ #
3305
+ # {https://developers.recurly.com/api/v2021-02-25#operation/get_preview_renewal get_preview_renewal api documenation}
3306
+ #
3307
+ # @param subscription_id [String] Subscription ID or UUID. For ID no prefix is used e.g. +e28zov4fw0v2+. For UUID use prefix +uuid-+, e.g. +uuid-123457890+.
3308
+ # @param params [Hash] Optional query string parameters:
3309
+ #
3310
+ # @return [Resources::InvoiceCollection] A preview of the subscription's renewal invoice(s).
3311
+ #
3312
+ def get_preview_renewal(subscription_id:, **options)
3313
+ path = interpolate_path("/subscriptions/{subscription_id}/preview_renewal", subscription_id: subscription_id)
3314
+ get(path, **options)
3315
+ end
3316
+
3303
3317
  # Fetch a subscription's pending change
3304
3318
  #
3305
3319
  # {https://developers.recurly.com/api/v2021-02-25#operation/get_subscription_change get_subscription_change api documenation}
@@ -11,7 +11,7 @@ module Recurly
11
11
  define_attribute :city, String
12
12
 
13
13
  # @!attribute country
14
- # @return [String] Country, 2-letter ISO code.
14
+ # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
15
15
  define_attribute :country, String
16
16
 
17
17
  # @!attribute phone
@@ -71,11 +71,11 @@ module Recurly
71
71
  define_attribute :primary_payment_method, :Boolean
72
72
 
73
73
  # @!attribute tax_identifier
74
- # @return [String] Tax identifier is required if adding a billing info that is a consumer card in Brazil. This would be the customer's CPF, CPF is a Brazilian tax identifier for all tax paying residents.
74
+ # @return [String] Tax identifier is required if adding a billing info that is a consumer card in Brazil or in Argentina. This would be the customer's CPF (Brazil) and CUIT (Argentina). CPF and CUIT are tax identifiers for all residents who pay taxes in Brazil and Argentina respectively.
75
75
  define_attribute :tax_identifier, String
76
76
 
77
77
  # @!attribute tax_identifier_type
78
- # @return [String] this field and a value of 'cpf' are required if adding a billing info that is an elo or hipercard type in Brazil.
78
+ # @return [String] This field and a value of `cpf` or `cuit` are required if adding a billing info that is an elo or hipercard type in Brazil or in Argentina.
79
79
  define_attribute :tax_identifier_type, String
80
80
 
81
81
  # @!attribute three_d_secure_action_result_token_id
@@ -15,7 +15,7 @@ module Recurly
15
15
  define_attribute :company, String
16
16
 
17
17
  # @!attribute country
18
- # @return [String] Country, 2-letter ISO code.
18
+ # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
19
19
  define_attribute :country, String
20
20
 
21
21
  # @!attribute first_name
@@ -15,7 +15,7 @@ module Recurly
15
15
  define_attribute :company, String
16
16
 
17
17
  # @!attribute country
18
- # @return [String] Country, 2-letter ISO code.
18
+ # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
19
19
  define_attribute :country, String
20
20
 
21
21
  # @!attribute email
@@ -15,7 +15,7 @@ module Recurly
15
15
  define_attribute :company, String
16
16
 
17
17
  # @!attribute country
18
- # @return [String] Country, 2-letter ISO code.
18
+ # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
19
19
  define_attribute :country, String
20
20
 
21
21
  # @!attribute email
@@ -0,0 +1,14 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Requests
7
+ class SubscriptionChangeBillingInfoCreate < Request
8
+
9
+ # @!attribute three_d_secure_action_result_token_id
10
+ # @return [String] A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge.
11
+ define_attribute :three_d_secure_action_result_token_id, String
12
+ end
13
+ end
14
+ end
@@ -10,6 +10,10 @@ module Recurly
10
10
  # @return [Array[SubscriptionAddOnUpdate]] If you provide a value for this field it will replace any existing add-ons. So, when adding or modifying an add-on, you need to include the existing subscription add-ons. Unchanged add-ons can be included just using the subscription add-on''s ID: `{"id": "abc123"}`. If this value is omitted your existing add-ons will be unaffected. To remove all existing add-ons, this value should be an empty array.' If a subscription add-on's `code` is supplied without the `id`, `{"code": "def456"}`, the subscription add-on attributes will be set to the current values of the plan add-on unless provided in the request. - If an `id` is passed, any attributes not passed in will pull from the existing subscription add-on - If a `code` is passed, any attributes not passed in will pull from the current values of the plan add-on - Attributes passed in as part of the request will override either of the above scenarios
11
11
  define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOnUpdate }
12
12
 
13
+ # @!attribute billing_info
14
+ # @return [SubscriptionChangeBillingInfoCreate]
15
+ define_attribute :billing_info, :SubscriptionChangeBillingInfoCreate
16
+
13
17
  # @!attribute collection_method
14
18
  # @return [String] Collection method
15
19
  define_attribute :collection_method, String
@@ -99,7 +99,7 @@ module Recurly
99
99
  define_attribute :transaction_type, String
100
100
 
101
101
  # @!attribute trial_ends_at
102
- # @return [DateTime] If set, overrides the default trial behavior for the subscription. The date must be in the future.
102
+ # @return [DateTime] If set, overrides the default trial behavior for the subscription. When the current date time or a past date time is provided the subscription will begin with no trial phase (overriding any plan default trial). When a future date time is provided the subscription will begin with a trial phase ending at the specified date time.
103
103
  define_attribute :trial_ends_at, DateTime
104
104
 
105
105
  # @!attribute unit_amount
@@ -7,7 +7,7 @@ module Recurly
7
7
  class SubscriptionPause < Request
8
8
 
9
9
  # @!attribute remaining_pause_cycles
10
- # @return [Integer] Number of billing cycles to pause the subscriptions.
10
+ # @return [Integer] Number of billing cycles to pause the subscriptions. A value of 0 will cancel any pending pauses on the subscription.
11
11
  define_attribute :remaining_pause_cycles, Integer
12
12
  end
13
13
  end
@@ -55,7 +55,7 @@ module Recurly
55
55
  define_attribute :total_billing_cycles, Integer
56
56
 
57
57
  # @!attribute trial_ends_at
58
- # @return [DateTime] If set, overrides the default trial behavior for the subscription. The date must be in the future.
58
+ # @return [DateTime] If set, overrides the default trial behavior for the subscription. When the current date time or a past date time is provided the subscription will begin with no trial phase (overriding any plan default trial). When a future date time is provided the subscription will begin with a trial phase ending at the specified date time.
59
59
  define_attribute :trial_ends_at, DateTime
60
60
 
61
61
  # @!attribute unit_amount
@@ -11,7 +11,7 @@ module Recurly
11
11
  define_attribute :city, String
12
12
 
13
13
  # @!attribute country
14
- # @return [String] Country, 2-letter ISO code.
14
+ # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
15
15
  define_attribute :country, String
16
16
 
17
17
  # @!attribute phone
@@ -11,7 +11,7 @@ module Recurly
11
11
  define_attribute :city, String
12
12
 
13
13
  # @!attribute country
14
- # @return [String] Country, 2-letter ISO code.
14
+ # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
15
15
  define_attribute :country, String
16
16
 
17
17
  # @!attribute first_name
@@ -7,7 +7,7 @@ module Recurly
7
7
  class BillingInfoUpdatedBy < Resource
8
8
 
9
9
  # @!attribute country
10
- # @return [String] Country of IP address, if known by Recurly.
10
+ # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code matching the origin IP address, if known by Recurly.
11
11
  define_attribute :country, String
12
12
 
13
13
  # @!attribute ip
@@ -111,7 +111,7 @@ module Recurly
111
111
  define_attribute :subscription_ids, Array, { :item_type => String }
112
112
 
113
113
  # @!attribute subtotal
114
- # @return [Float] The summation of charges, discounts, and credits, before tax.
114
+ # @return [Float] The summation of charges and credits, before discounts and taxes.
115
115
  define_attribute :subtotal, Float
116
116
 
117
117
  # @!attribute tax
@@ -15,7 +15,7 @@ module Recurly
15
15
  define_attribute :company, String
16
16
 
17
17
  # @!attribute country
18
- # @return [String] Country, 2-letter ISO code.
18
+ # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
19
19
  define_attribute :country, String
20
20
 
21
21
  # @!attribute first_name
@@ -18,6 +18,10 @@ module Recurly
18
18
  # @return [String] Visa, MasterCard, American Express, Discover, JCB, etc.
19
19
  define_attribute :card_type, String
20
20
 
21
+ # @!attribute cc_bin_country
22
+ # @return [String] The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled.
23
+ define_attribute :cc_bin_country, String
24
+
21
25
  # @!attribute exp_month
22
26
  # @return [Integer] Expiration month.
23
27
  define_attribute :exp_month, Integer
@@ -19,7 +19,7 @@ module Recurly
19
19
  define_attribute :company, String
20
20
 
21
21
  # @!attribute country
22
- # @return [String] Country, 2-letter ISO code.
22
+ # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
23
23
  define_attribute :country, String
24
24
 
25
25
  # @!attribute created_at
@@ -18,6 +18,10 @@ module Recurly
18
18
  # @return [Array[SubscriptionAddOn]] These add-ons will be used when the subscription renews.
19
19
  define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOn }
20
20
 
21
+ # @!attribute billing_info
22
+ # @return [SubscriptionChangeBillingInfo] Accept nested attributes for three_d_secure_action_result_token_id
23
+ define_attribute :billing_info, :SubscriptionChangeBillingInfo
24
+
21
25
  # @!attribute created_at
22
26
  # @return [DateTime] Created at
23
27
  define_attribute :created_at, DateTime
@@ -0,0 +1,14 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Resources
7
+ class SubscriptionChangeBillingInfo < Resource
8
+
9
+ # @!attribute three_d_secure_action_result_token_id
10
+ # @return [String] A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge.
11
+ define_attribute :three_d_secure_action_result_token_id, String
12
+ end
13
+ end
14
+ end
@@ -15,7 +15,7 @@ module Recurly
15
15
  define_attribute :region, String
16
16
 
17
17
  # @!attribute tax_details
18
- # @return [Array[TaxDetail]]
18
+ # @return [Array[TaxDetail]] Provides additional tax details for Canadian Sales Tax when there is tax applied at both the country and province levels. This will only be populated for the Invoice response when fetching a single invoice and not for the InvoiceList or LineItem.
19
19
  define_attribute :tax_details, Array, { :item_type => :TaxDetail }
20
20
 
21
21
  # @!attribute type
@@ -87,7 +87,7 @@ module Recurly
87
87
  define_attribute :invoice, :InvoiceMini
88
88
 
89
89
  # @!attribute ip_address_country
90
- # @return [String] IP address's country
90
+ # @return [String] Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known by Recurly.
91
91
  define_attribute :ip_address_country, String
92
92
 
93
93
  # @!attribute ip_address_v4
@@ -1,3 +1,3 @@
1
1
  module Recurly
2
- VERSION = "4.3.0"
2
+ VERSION = "4.7.0"
3
3
  end
data/openapi/api.yaml CHANGED
@@ -3846,7 +3846,7 @@ paths:
3846
3846
  try {
3847
3847
  LineItemCreate lineItemCreate = new LineItemCreate();
3848
3848
  lineItemCreate.setCurrency("USD");
3849
- lineItemCreate.setUnitAmount(1000.0f);
3849
+ lineItemCreate.setUnitAmount(new BigDecimal("1000.0"));
3850
3850
  lineItemCreate.setType(Constants.LineItemType.CHARGE); // choose "credit" for a credit
3851
3851
 
3852
3852
  LineItem lineItem = client.createLineItem(accountId, lineItemCreate);
@@ -5426,7 +5426,7 @@ paths:
5426
5426
  List<CouponPricing> currencies = new ArrayList<CouponPricing>();
5427
5427
  CouponPricing couponPrice = new CouponPricing();
5428
5428
  couponPrice.setCurrency("USD");
5429
- couponPrice.setDiscount(10.0f);
5429
+ couponPrice.setDiscount(new BigDecimal("10.0"));
5430
5430
  currencies.add(couponPrice);
5431
5431
 
5432
5432
  couponCreate.setCurrencies(currencies);
@@ -8957,7 +8957,7 @@ paths:
8957
8957
  final InvoiceRefund invoiceRefund = new InvoiceRefund();
8958
8958
  invoiceRefund.setCreditCustomerNotes("Notes on credits");
8959
8959
  invoiceRefund.setType(Constants.InvoiceRefundType.AMOUNT); // could also be "line_items"
8960
- invoiceRefund.setAmount(100f);
8960
+ invoiceRefund.setAmount(new BigDecimal("100"));
8961
8961
 
8962
8962
  final Invoice invoice = client.refundInvoice(invoiceId, invoiceRefund);
8963
8963
  System.out.println("Refunded invoice " + invoice.getNumber());
@@ -9587,7 +9587,7 @@ paths:
9587
9587
  List<PlanPricing> currencies = new ArrayList<PlanPricing>();
9588
9588
  PlanPricing planPrice = new PlanPricing();
9589
9589
  planPrice.setCurrency("USD");
9590
- planPrice.setUnitAmount(10000.0f);
9590
+ planPrice.setUnitAmount(new BigDecimal("10000"));
9591
9591
  currencies.add(planPrice);
9592
9592
 
9593
9593
  planCreate.setCurrencies(currencies);
@@ -10256,7 +10256,7 @@ paths:
10256
10256
  List<AddOnPricing> currencies = new ArrayList<AddOnPricing>();
10257
10257
  AddOnPricing addOnPrice = new AddOnPricing();
10258
10258
  addOnPrice.setCurrency("USD");
10259
- addOnPrice.setUnitAmount(10000.0f);
10259
+ addOnPrice.setUnitAmount(new BigDecimal("10000.0"));
10260
10260
  currencies.add(addOnPrice);
10261
10261
 
10262
10262
  addOnCreate.setCurrencies(currencies);
@@ -12434,6 +12434,43 @@ paths:
12434
12434
  schema:
12435
12435
  "$ref": "#/components/schemas/Error"
12436
12436
  x-code-samples: []
12437
+ "/subscriptions/{subscription_id}/preview_renewal":
12438
+ get:
12439
+ tags:
12440
+ - subscription
12441
+ operationId: get_preview_renewal
12442
+ summary: Fetch a preview of a subscription's renewal invoice(s)
12443
+ description: The subscriptions's renewal invoice(s) will be returned if they
12444
+ exist; if they don't (for example, if the subscription is not set to renew),
12445
+ it will return an result with no invoices.
12446
+ parameters:
12447
+ - "$ref": "#/components/parameters/subscription_id"
12448
+ responses:
12449
+ '200':
12450
+ description: A preview of the subscription's renewal invoice(s).
12451
+ content:
12452
+ application/json:
12453
+ schema:
12454
+ "$ref": "#/components/schemas/InvoiceCollection"
12455
+ '400':
12456
+ description: Invalid or unpermitted parameter.
12457
+ content:
12458
+ application/json:
12459
+ schema:
12460
+ "$ref": "#/components/schemas/Error"
12461
+ '404':
12462
+ description: Incorrect site ID or subscription ID.
12463
+ content:
12464
+ application/json:
12465
+ schema:
12466
+ "$ref": "#/components/schemas/Error"
12467
+ default:
12468
+ description: Unexpected error.
12469
+ content:
12470
+ application/json:
12471
+ schema:
12472
+ "$ref": "#/components/schemas/Error"
12473
+ x-code-samples: []
12437
12474
  "/subscriptions/{subscription_id}/change":
12438
12475
  get:
12439
12476
  tags:
@@ -13891,7 +13928,14 @@ paths:
13891
13928
  // why. You can find the invalid params and reasons in e.getError().getParams()
13892
13929
  System.out.println("Failed validation: " + e.getError().getMessage());
13893
13930
  System.out.println("Params: " + e.getError().getParams());
13894
- } catch (ApiException e) {
13931
+ } catch (TransactionException e) {
13932
+ TransactionError tError = e.getError().getTransactionError();
13933
+ if (tError.getCategory() == Constants.ErrorCategory.THREE_D_SECURE_ACTION_REQUIRED) {
13934
+ String actionTokenId = tError.getThreeDSecureActionTokenId();
13935
+ System.out.println("Got 3DSecure TransactionError token: " + actionTokenId);
13936
+ }
13937
+ }
13938
+ catch (ApiException e) {
13895
13939
  // Use ApiException to catch a generic error from the API
13896
13940
  System.out.println("Unexpected Recurly Error: " + e.getError().getMessage());
13897
13941
  }
@@ -15482,7 +15526,7 @@ components:
15482
15526
  country:
15483
15527
  type: string
15484
15528
  title: Country
15485
- description: Country, 2-letter ISO code.
15529
+ description: Country, 2-letter ISO 3166-1 alpha-2 code.
15486
15530
  AddressWithName:
15487
15531
  allOf:
15488
15532
  - "$ref": "#/components/schemas/Address"
@@ -16066,7 +16110,8 @@ components:
16066
16110
  maxLength: 20
16067
16111
  country:
16068
16112
  type: string
16069
- description: Country of IP address, if known by Recurly.
16113
+ description: Country, 2-letter ISO 3166-1 alpha-2 code matching the
16114
+ origin IP address, if known by Recurly.
16070
16115
  maxLength: 2
16071
16116
  BillingInfoCreate:
16072
16117
  type: object
@@ -16156,11 +16201,12 @@ components:
16156
16201
  tax_identifier:
16157
16202
  type: string
16158
16203
  description: Tax identifier is required if adding a billing info that is
16159
- a consumer card in Brazil. This would be the customer's CPF, CPF is a
16160
- Brazilian tax identifier for all tax paying residents.
16204
+ a consumer card in Brazil or in Argentina. This would be the customer's
16205
+ CPF (Brazil) and CUIT (Argentina). CPF and CUIT are tax identifiers for
16206
+ all residents who pay taxes in Brazil and Argentina respectively.
16161
16207
  tax_identifier_type:
16162
- description: this field and a value of 'cpf' are required if adding a billing
16163
- info that is an elo or hipercard type in Brazil.
16208
+ description: This field and a value of `cpf` or `cuit` are required if adding
16209
+ a billing info that is an elo or hipercard type in Brazil or in Argentina.
16164
16210
  "$ref": "#/components/schemas/TaxIdentifierTypeEnum"
16165
16211
  primary_payment_method:
16166
16212
  type: boolean
@@ -17229,7 +17275,8 @@ components:
17229
17275
  type: number
17230
17276
  format: float
17231
17277
  title: Subtotal
17232
- description: The summation of charges, discounts, and credits, before tax.
17278
+ description: The summation of charges and credits, before discounts and
17279
+ taxes.
17233
17280
  tax:
17234
17281
  type: number
17235
17282
  format: float
@@ -18742,7 +18789,7 @@ components:
18742
18789
  country:
18743
18790
  type: string
18744
18791
  maxLength: 50
18745
- description: Country, 2-letter ISO code.
18792
+ description: Country, 2-letter ISO 3166-1 alpha-2 code.
18746
18793
  created_at:
18747
18794
  type: string
18748
18795
  title: Created at
@@ -18797,7 +18844,7 @@ components:
18797
18844
  country:
18798
18845
  type: string
18799
18846
  maxLength: 50
18800
- description: Country, 2-letter ISO code.
18847
+ description: Country, 2-letter ISO 3166-1 alpha-2 code.
18801
18848
  required:
18802
18849
  - first_name
18803
18850
  - last_name
@@ -19047,7 +19094,7 @@ components:
19047
19094
  country:
19048
19095
  type: string
19049
19096
  maxLength: 50
19050
- description: Country, 2-letter ISO code.
19097
+ description: Country, 2-letter ISO 3166-1 alpha-2 code.
19051
19098
  Site:
19052
19099
  type: object
19053
19100
  properties:
@@ -19596,6 +19643,21 @@ components:
19596
19643
  format: date-time
19597
19644
  title: Deleted at
19598
19645
  readOnly: true
19646
+ billing_info:
19647
+ "$ref": "#/components/schemas/SubscriptionChangeBillingInfo"
19648
+ SubscriptionChangeBillingInfo:
19649
+ type: object
19650
+ description: Accept nested attributes for three_d_secure_action_result_token_id
19651
+ properties:
19652
+ three_d_secure_action_result_token_id:
19653
+ type: string
19654
+ title: 3-D Secure action result token ID
19655
+ description: A token generated by Recurly.js after completing a 3-D Secure
19656
+ device fingerprinting or authentication challenge.
19657
+ maxLength: 22
19658
+ SubscriptionChangeBillingInfoCreate:
19659
+ allOf:
19660
+ - "$ref": "#/components/schemas/SubscriptionChangeBillingInfo"
19599
19661
  SubscriptionChangeCreate:
19600
19662
  type: object
19601
19663
  properties:
@@ -19700,6 +19762,8 @@ components:
19700
19762
  created by this request. Supports 'moto' value, which is the acronym for
19701
19763
  mail order and telephone transactions.
19702
19764
  "$ref": "#/components/schemas/GatewayTransactionTypeEnum"
19765
+ billing_info:
19766
+ "$ref": "#/components/schemas/SubscriptionChangeBillingInfoCreate"
19703
19767
  SubscriptionChangeShippingCreate:
19704
19768
  type: object
19705
19769
  title: Shipping details that will be changed on a subscription
@@ -19797,7 +19861,10 @@ components:
19797
19861
  format: date-time
19798
19862
  title: Trial ends at
19799
19863
  description: If set, overrides the default trial behavior for the subscription.
19800
- The date must be in the future.
19864
+ When the current date time or a past date time is provided the subscription
19865
+ will begin with no trial phase (overriding any plan default trial). When
19866
+ a future date time is provided the subscription will begin with a trial
19867
+ phase ending at the specified date time.
19801
19868
  starts_at:
19802
19869
  type: string
19803
19870
  format: date-time
@@ -19923,7 +19990,10 @@ components:
19923
19990
  format: date-time
19924
19991
  title: Trial ends at
19925
19992
  description: If set, overrides the default trial behavior for the subscription.
19926
- The date must be in the future.
19993
+ When the current date time or a past date time is provided the subscription
19994
+ will begin with no trial phase (overriding any plan default trial). When
19995
+ a future date time is provided the subscription will begin with a trial
19996
+ phase ending at the specified date time.
19927
19997
  starts_at:
19928
19998
  type: string
19929
19999
  format: date-time
@@ -20042,7 +20112,8 @@ components:
20042
20112
  remaining_pause_cycles:
20043
20113
  type: integer
20044
20114
  title: Remaining pause cycles
20045
- description: Number of billing cycles to pause the subscriptions.
20115
+ description: Number of billing cycles to pause the subscriptions. A value
20116
+ of 0 will cancel any pending pauses on the subscription.
20046
20117
  required:
20047
20118
  - remaining_pause_cycles
20048
20119
  SubscriptionShipping:
@@ -20153,15 +20224,15 @@ components:
20153
20224
  title: Rate
20154
20225
  tax_details:
20155
20226
  type: array
20227
+ description: Provides additional tax details for Canadian Sales Tax when
20228
+ there is tax applied at both the country and province levels. This will
20229
+ only be populated for the Invoice response when fetching a single invoice
20230
+ and not for the InvoiceList or LineItem.
20156
20231
  items:
20157
20232
  "$ref": "#/components/schemas/TaxDetail"
20158
20233
  TaxDetail:
20159
20234
  type: object
20160
- title: Tax info
20161
- description: Provides additional tax details for Canadian Sales Tax when there
20162
- is tax applied at both the country and province levels. This will only be
20163
- populated for the Invoice response when fetching a single invoice and not
20164
- for the InvoiceList or LineItem.
20235
+ title: Tax detail
20165
20236
  properties:
20166
20237
  type:
20167
20238
  type: string
@@ -20279,7 +20350,8 @@ components:
20279
20350
  - When the merchant enters billing information using the UI, no IP address is recorded.
20280
20351
  ip_address_country:
20281
20352
  type: string
20282
- title: IP address's country
20353
+ title: Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known
20354
+ by Recurly.
20283
20355
  status_code:
20284
20356
  type: string
20285
20357
  title: Status code
@@ -20764,6 +20836,11 @@ components:
20764
20836
  description: A token used in place of a credit card in order to perform
20765
20837
  transactions.
20766
20838
  maxLength: 50
20839
+ cc_bin_country:
20840
+ type: string
20841
+ description: The 2-letter ISO 3166-1 alpha-2 country code associated with
20842
+ the credit card BIN, if known by Recurly. Available on the BillingInfo
20843
+ object only. Available when the BIN country lookup feature is enabled.
20767
20844
  gateway_code:
20768
20845
  type: string
20769
20846
  description: An identifier for a specific payment gateway.
@@ -21484,6 +21561,7 @@ components:
21484
21561
  - invalid_data
21485
21562
  - invalid_email
21486
21563
  - invalid_gateway_configuration
21564
+ - invalid_gateway_access_token
21487
21565
  - invalid_issuer
21488
21566
  - invalid_login
21489
21567
  - invalid_merchant_type
@@ -21576,3 +21654,4 @@ components:
21576
21654
  type: string
21577
21655
  enum:
21578
21656
  - cpf
21657
+ - cuit
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: 4.3.0
4
+ version: 4.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-04 00:00:00.000000000 Z
11
+ date: 2021-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -191,6 +191,7 @@ files:
191
191
  - lib/recurly/requests/subscription_add_on_tier.rb
192
192
  - lib/recurly/requests/subscription_add_on_update.rb
193
193
  - lib/recurly/requests/subscription_cancel.rb
194
+ - lib/recurly/requests/subscription_change_billing_info_create.rb
194
195
  - lib/recurly/requests/subscription_change_create.rb
195
196
  - lib/recurly/requests/subscription_change_shipping_create.rb
196
197
  - lib/recurly/requests/subscription_create.rb
@@ -259,6 +260,7 @@ files:
259
260
  - lib/recurly/resources/subscription_add_on.rb
260
261
  - lib/recurly/resources/subscription_add_on_tier.rb
261
262
  - lib/recurly/resources/subscription_change.rb
263
+ - lib/recurly/resources/subscription_change_billing_info.rb
262
264
  - lib/recurly/resources/subscription_shipping.rb
263
265
  - lib/recurly/resources/tax_detail.rb
264
266
  - lib/recurly/resources/tax_info.rb
@@ -295,7 +297,7 @@ metadata:
295
297
  changelog_uri: https://github.com/recurly/recurly-client-ruby/blob/master/CHANGELOG.md
296
298
  documentation_uri: https://recurly.github.io/recurly-client-ruby/
297
299
  homepage_uri: https://github.com/recurly/recurly-client-ruby
298
- source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.3.0
300
+ source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.7.0
299
301
  post_install_message:
300
302
  rdoc_options: []
301
303
  require_paths: