recurly 4.4.0 → 4.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bumpversion.cfg +1 -1
- data/CHANGELOG.md +11 -0
- data/GETTING_STARTED.md +1 -1
- data/lib/recurly/requests/address.rb +1 -1
- data/lib/recurly/requests/billing_info_create.rb +2 -2
- data/lib/recurly/requests/invoice_address.rb +1 -1
- data/lib/recurly/requests/shipping_address_create.rb +1 -1
- data/lib/recurly/requests/shipping_address_update.rb +1 -1
- data/lib/recurly/requests/subscription_create.rb +1 -1
- data/lib/recurly/requests/subscription_purchase.rb +1 -1
- data/lib/recurly/resources/address.rb +1 -1
- data/lib/recurly/resources/address_with_name.rb +1 -1
- data/lib/recurly/resources/billing_info_updated_by.rb +1 -1
- data/lib/recurly/resources/invoice_address.rb +1 -1
- data/lib/recurly/resources/payment_method.rb +4 -0
- data/lib/recurly/resources/shipping_address.rb +1 -1
- data/lib/recurly/resources/tax_info.rb +1 -1
- data/lib/recurly/resources/transaction.rb +1 -1
- data/lib/recurly/version.rb +1 -1
- data/openapi/api.yaml +46 -23
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab15012ab4dc0ad0a98506632f63d7496dd6a4efe39d970810f353c10b10a22d
|
4
|
+
data.tar.gz: cec6000b28ccbf14ed002a73476c296df2d46b6266664e24b0978e6e1ed0600e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53a4a6da3a7e648e813678acc0a3f565ecead9c0c114fad15f75b4eeb46f2c049e689d563db26ea5fb958ca40e318f1e7a28ed435b9a14fefe4bb0fbc9bc45fd
|
7
|
+
data.tar.gz: a384b0e85ebad2b40a2aa4c1909c57c0e16065b2aa63c2084b815fdb1f6be81e2d97fa4e7bcaf22ce6599c7ddd7fd6935476e2f3f49aef5952f9cc4467d1484f
|
data/.bumpversion.cfg
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [4.5.0](https://github.com/recurly/recurly-client-ruby/tree/4.5.0) (2021-08-02)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.4.0...4.5.0)
|
6
|
+
|
7
|
+
|
8
|
+
**Merged Pull Requests**
|
9
|
+
|
10
|
+
- Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-ruby/pull/714) ([recurly-integrations](https://github.com/recurly-integrations))
|
11
|
+
|
12
|
+
|
13
|
+
|
3
14
|
## [4.4.0](https://github.com/recurly/recurly-client-ruby/tree/4.4.0) (2021-06-15)
|
4
15
|
|
5
16
|
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.3.0...4.4.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.
|
8
|
+
gem 'recurly', '~> 4.5'
|
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.
|
@@ -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
|
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]
|
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
|
@@ -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.
|
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
|
@@ -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.
|
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
|
@@ -7,7 +7,7 @@ module Recurly
|
|
7
7
|
class BillingInfoUpdatedBy < Resource
|
8
8
|
|
9
9
|
# @!attribute country
|
10
|
-
# @return [String] Country
|
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
|
@@ -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
|
@@ -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
|
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
|
data/lib/recurly/version.rb
CHANGED
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.
|
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.
|
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(
|
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
|
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.
|
10259
|
+
addOnPrice.setUnitAmount(new BigDecimal("10000.0"));
|
10260
10260
|
currencies.add(addOnPrice);
|
10261
10261
|
|
10262
10262
|
addOnCreate.setCurrencies(currencies);
|
@@ -13891,7 +13891,14 @@ paths:
|
|
13891
13891
|
// why. You can find the invalid params and reasons in e.getError().getParams()
|
13892
13892
|
System.out.println("Failed validation: " + e.getError().getMessage());
|
13893
13893
|
System.out.println("Params: " + e.getError().getParams());
|
13894
|
-
} catch (
|
13894
|
+
} catch (TransactionException e) {
|
13895
|
+
TransactionError tError = e.getError().getTransactionError();
|
13896
|
+
if (tError.getCategory() == Constants.ErrorCategory.THREE_D_SECURE_ACTION_REQUIRED) {
|
13897
|
+
String actionTokenId = tError.getThreeDSecureActionTokenId();
|
13898
|
+
System.out.println("Got 3DSecure TransactionError token: " + actionTokenId);
|
13899
|
+
}
|
13900
|
+
}
|
13901
|
+
catch (ApiException e) {
|
13895
13902
|
// Use ApiException to catch a generic error from the API
|
13896
13903
|
System.out.println("Unexpected Recurly Error: " + e.getError().getMessage());
|
13897
13904
|
}
|
@@ -15482,7 +15489,7 @@ components:
|
|
15482
15489
|
country:
|
15483
15490
|
type: string
|
15484
15491
|
title: Country
|
15485
|
-
description: Country, 2-letter ISO code.
|
15492
|
+
description: Country, 2-letter ISO 3166-1 alpha-2 code.
|
15486
15493
|
AddressWithName:
|
15487
15494
|
allOf:
|
15488
15495
|
- "$ref": "#/components/schemas/Address"
|
@@ -16066,7 +16073,8 @@ components:
|
|
16066
16073
|
maxLength: 20
|
16067
16074
|
country:
|
16068
16075
|
type: string
|
16069
|
-
description: Country
|
16076
|
+
description: Country, 2-letter ISO 3166-1 alpha-2 code matching the
|
16077
|
+
origin IP address, if known by Recurly.
|
16070
16078
|
maxLength: 2
|
16071
16079
|
BillingInfoCreate:
|
16072
16080
|
type: object
|
@@ -16156,11 +16164,12 @@ components:
|
|
16156
16164
|
tax_identifier:
|
16157
16165
|
type: string
|
16158
16166
|
description: Tax identifier is required if adding a billing info that is
|
16159
|
-
a consumer card in Brazil. This would be the customer's
|
16160
|
-
|
16167
|
+
a consumer card in Brazil or in Argentina. This would be the customer's
|
16168
|
+
CPF (Brazil) and CUIT (Argentina). CPF and CUIT are tax identifiers for
|
16169
|
+
all residents who pay taxes in Brazil and Argentina respectively.
|
16161
16170
|
tax_identifier_type:
|
16162
|
-
description:
|
16163
|
-
info that is an elo or hipercard type in Brazil.
|
16171
|
+
description: This field and a value of `cpf` or `cuit` are required if adding
|
16172
|
+
a billing info that is an elo or hipercard type in Brazil or in Argentina.
|
16164
16173
|
"$ref": "#/components/schemas/TaxIdentifierTypeEnum"
|
16165
16174
|
primary_payment_method:
|
16166
16175
|
type: boolean
|
@@ -18743,7 +18752,7 @@ components:
|
|
18743
18752
|
country:
|
18744
18753
|
type: string
|
18745
18754
|
maxLength: 50
|
18746
|
-
description: Country, 2-letter ISO code.
|
18755
|
+
description: Country, 2-letter ISO 3166-1 alpha-2 code.
|
18747
18756
|
created_at:
|
18748
18757
|
type: string
|
18749
18758
|
title: Created at
|
@@ -18798,7 +18807,7 @@ components:
|
|
18798
18807
|
country:
|
18799
18808
|
type: string
|
18800
18809
|
maxLength: 50
|
18801
|
-
description: Country, 2-letter ISO code.
|
18810
|
+
description: Country, 2-letter ISO 3166-1 alpha-2 code.
|
18802
18811
|
required:
|
18803
18812
|
- first_name
|
18804
18813
|
- last_name
|
@@ -19048,7 +19057,7 @@ components:
|
|
19048
19057
|
country:
|
19049
19058
|
type: string
|
19050
19059
|
maxLength: 50
|
19051
|
-
description: Country, 2-letter ISO code.
|
19060
|
+
description: Country, 2-letter ISO 3166-1 alpha-2 code.
|
19052
19061
|
Site:
|
19053
19062
|
type: object
|
19054
19063
|
properties:
|
@@ -19810,7 +19819,10 @@ components:
|
|
19810
19819
|
format: date-time
|
19811
19820
|
title: Trial ends at
|
19812
19821
|
description: If set, overrides the default trial behavior for the subscription.
|
19813
|
-
|
19822
|
+
When the current date time or a past date time is provided the subscription
|
19823
|
+
will begin with no trial phase (overriding any plan default trial). When
|
19824
|
+
a future date time is provided the subscription will begin with a trial
|
19825
|
+
phase ending at the specified date time.
|
19814
19826
|
starts_at:
|
19815
19827
|
type: string
|
19816
19828
|
format: date-time
|
@@ -19936,7 +19948,10 @@ components:
|
|
19936
19948
|
format: date-time
|
19937
19949
|
title: Trial ends at
|
19938
19950
|
description: If set, overrides the default trial behavior for the subscription.
|
19939
|
-
|
19951
|
+
When the current date time or a past date time is provided the subscription
|
19952
|
+
will begin with no trial phase (overriding any plan default trial). When
|
19953
|
+
a future date time is provided the subscription will begin with a trial
|
19954
|
+
phase ending at the specified date time.
|
19940
19955
|
starts_at:
|
19941
19956
|
type: string
|
19942
19957
|
format: date-time
|
@@ -20166,15 +20181,15 @@ components:
|
|
20166
20181
|
title: Rate
|
20167
20182
|
tax_details:
|
20168
20183
|
type: array
|
20184
|
+
description: Provides additional tax details for Canadian Sales Tax when
|
20185
|
+
there is tax applied at both the country and province levels. This will
|
20186
|
+
only be populated for the Invoice response when fetching a single invoice
|
20187
|
+
and not for the InvoiceList or LineItem.
|
20169
20188
|
items:
|
20170
20189
|
"$ref": "#/components/schemas/TaxDetail"
|
20171
20190
|
TaxDetail:
|
20172
20191
|
type: object
|
20173
|
-
title: Tax
|
20174
|
-
description: Provides additional tax details for Canadian Sales Tax when there
|
20175
|
-
is tax applied at both the country and province levels. This will only be
|
20176
|
-
populated for the Invoice response when fetching a single invoice and not
|
20177
|
-
for the InvoiceList or LineItem.
|
20192
|
+
title: Tax detail
|
20178
20193
|
properties:
|
20179
20194
|
type:
|
20180
20195
|
type: string
|
@@ -20292,7 +20307,8 @@ components:
|
|
20292
20307
|
- When the merchant enters billing information using the UI, no IP address is recorded.
|
20293
20308
|
ip_address_country:
|
20294
20309
|
type: string
|
20295
|
-
title: IP address
|
20310
|
+
title: Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known
|
20311
|
+
by Recurly.
|
20296
20312
|
status_code:
|
20297
20313
|
type: string
|
20298
20314
|
title: Status code
|
@@ -20777,6 +20793,11 @@ components:
|
|
20777
20793
|
description: A token used in place of a credit card in order to perform
|
20778
20794
|
transactions.
|
20779
20795
|
maxLength: 50
|
20796
|
+
cc_bin_country:
|
20797
|
+
type: string
|
20798
|
+
description: The 2-letter ISO 3166-1 alpha-2 country code associated with
|
20799
|
+
the credit card BIN, if known by Recurly. Available on the BillingInfo
|
20800
|
+
object only. Available when the BIN country lookup feature is enabled.
|
20780
20801
|
gateway_code:
|
20781
20802
|
type: string
|
20782
20803
|
description: An identifier for a specific payment gateway.
|
@@ -21497,6 +21518,7 @@ components:
|
|
21497
21518
|
- invalid_data
|
21498
21519
|
- invalid_email
|
21499
21520
|
- invalid_gateway_configuration
|
21521
|
+
- invalid_gateway_access_token
|
21500
21522
|
- invalid_issuer
|
21501
21523
|
- invalid_login
|
21502
21524
|
- invalid_merchant_type
|
@@ -21589,3 +21611,4 @@ components:
|
|
21589
21611
|
type: string
|
21590
21612
|
enum:
|
21591
21613
|
- cpf
|
21614
|
+
- 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.
|
4
|
+
version: 4.5.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-
|
11
|
+
date: 2021-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -296,7 +296,7 @@ metadata:
|
|
296
296
|
changelog_uri: https://github.com/recurly/recurly-client-ruby/blob/master/CHANGELOG.md
|
297
297
|
documentation_uri: https://recurly.github.io/recurly-client-ruby/
|
298
298
|
homepage_uri: https://github.com/recurly/recurly-client-ruby
|
299
|
-
source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.
|
299
|
+
source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.5.0
|
300
300
|
post_install_message:
|
301
301
|
rdoc_options: []
|
302
302
|
require_paths:
|