recurly 3.18.1 → 3.19.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_config.yaml +11 -0
- data/.github/workflows/docs.yml +1 -1
- data/.travis.yml +2 -0
- data/CHANGELOG.md +231 -163
- data/GETTING_STARTED.md +1 -1
- data/lib/recurly/client/operations.rb +212 -134
- data/lib/recurly/client.rb +5 -3
- data/lib/recurly/errors/api_errors.rb +2 -0
- data/lib/recurly/pager.rb +1 -1
- data/lib/recurly/requests/account_create.rb +4 -0
- data/lib/recurly/requests/account_purchase.rb +4 -0
- data/lib/recurly/requests/account_update.rb +4 -0
- data/lib/recurly/requests/add_on_create.rb +3 -3
- data/lib/recurly/requests/add_on_pricing.rb +4 -0
- data/lib/recurly/requests/add_on_update.rb +1 -1
- data/lib/recurly/requests/address.rb +1 -1
- data/lib/recurly/requests/billing_info_create.rb +6 -2
- data/lib/recurly/requests/billing_info_verify.rb +14 -0
- data/lib/recurly/requests/dunning_campaigns_bulk_update.rb +18 -0
- data/lib/recurly/requests/invoice_address.rb +1 -1
- data/lib/recurly/requests/invoice_collect.rb +1 -1
- data/lib/recurly/requests/line_item_create.rb +6 -2
- data/lib/recurly/requests/plan_create.rb +4 -0
- data/lib/recurly/requests/plan_pricing.rb +4 -0
- data/lib/recurly/requests/plan_update.rb +4 -0
- data/lib/recurly/requests/pricing.rb +4 -0
- data/lib/recurly/requests/purchase_create.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_change_billing_info_create.rb +14 -0
- data/lib/recurly/requests/subscription_change_create.rb +8 -0
- data/lib/recurly/requests/subscription_create.rb +6 -2
- data/lib/recurly/requests/subscription_pause.rb +1 -1
- data/lib/recurly/requests/subscription_purchase.rb +6 -2
- data/lib/recurly/requests/subscription_update.rb +5 -1
- data/lib/recurly/resources/account.rb +4 -0
- data/lib/recurly/resources/account_mini.rb +4 -0
- data/lib/recurly/resources/add_on_pricing.rb +4 -0
- data/lib/recurly/resources/address.rb +1 -1
- data/lib/recurly/resources/billing_info.rb +5 -1
- data/lib/recurly/resources/billing_info_updated_by.rb +1 -1
- data/lib/recurly/resources/dunning_campaign.rb +50 -0
- data/lib/recurly/resources/dunning_campaigns_bulk_update_response.rb +18 -0
- data/lib/recurly/resources/dunning_cycle.rb +58 -0
- data/lib/recurly/resources/dunning_interval.rb +18 -0
- data/lib/recurly/resources/invoice.rb +6 -2
- data/lib/recurly/resources/invoice_address.rb +1 -1
- data/lib/recurly/resources/line_item.rb +7 -3
- data/lib/recurly/resources/payment_method.rb +4 -0
- data/lib/recurly/resources/plan.rb +4 -0
- data/lib/recurly/resources/plan_pricing.rb +4 -0
- data/lib/recurly/resources/pricing.rb +4 -0
- data/lib/recurly/resources/shipping_address.rb +1 -1
- data/lib/recurly/resources/subscription.rb +4 -0
- data/lib/recurly/resources/subscription_change.rb +8 -0
- data/lib/recurly/resources/subscription_change_billing_info.rb +14 -0
- data/lib/recurly/resources/subscription_change_preview.rb +8 -0
- data/lib/recurly/resources/tax_detail.rb +26 -0
- data/lib/recurly/resources/tax_info.rb +4 -0
- data/lib/recurly/resources/transaction.rb +5 -1
- data/lib/recurly/version.rb +1 -1
- data/openapi/api.yaml +796 -122
- data/scripts/build +2 -2
- data/scripts/format +2 -2
- data/scripts/prepare-release +43 -29
- data/scripts/release +5 -20
- metadata +16 -9
- data/.github_changelog_generator +0 -8
- data/scripts/bump +0 -11
- data/scripts/changelog +0 -14
@@ -0,0 +1,58 @@
|
|
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 DunningCycle < Resource
|
8
|
+
|
9
|
+
# @!attribute applies_to_manual_trial
|
10
|
+
# @return [Boolean] Whether the dunning settings will be applied to manual trials. Only applies to trial cycles.
|
11
|
+
define_attribute :applies_to_manual_trial, :Boolean
|
12
|
+
|
13
|
+
# @!attribute created_at
|
14
|
+
# @return [DateTime] When the current settings were created in Recurly.
|
15
|
+
define_attribute :created_at, DateTime
|
16
|
+
|
17
|
+
# @!attribute expire_subscription
|
18
|
+
# @return [Boolean] Whether the subscription(s) should be cancelled at the end of the dunning cycle.
|
19
|
+
define_attribute :expire_subscription, :Boolean
|
20
|
+
|
21
|
+
# @!attribute fail_invoice
|
22
|
+
# @return [Boolean] Whether the invoice should be failed at the end of the dunning cycle.
|
23
|
+
define_attribute :fail_invoice, :Boolean
|
24
|
+
|
25
|
+
# @!attribute first_communication_interval
|
26
|
+
# @return [Integer] The number of days after a transaction failure before the first dunning email is sent.
|
27
|
+
define_attribute :first_communication_interval, Integer
|
28
|
+
|
29
|
+
# @!attribute intervals
|
30
|
+
# @return [Array[DunningInterval]] Dunning intervals.
|
31
|
+
define_attribute :intervals, Array, { :item_type => :DunningInterval }
|
32
|
+
|
33
|
+
# @!attribute send_immediately_on_hard_decline
|
34
|
+
# @return [Boolean] Whether or not to send an extra email immediately to customers whose initial payment attempt fails with either a hard decline or invalid billing info.
|
35
|
+
define_attribute :send_immediately_on_hard_decline, :Boolean
|
36
|
+
|
37
|
+
# @!attribute total_dunning_days
|
38
|
+
# @return [Integer] The number of days between the first dunning email being sent and the end of the dunning cycle.
|
39
|
+
define_attribute :total_dunning_days, Integer
|
40
|
+
|
41
|
+
# @!attribute total_recycling_days
|
42
|
+
# @return [Integer] The number of days between a transaction failure and the end of the dunning cycle.
|
43
|
+
define_attribute :total_recycling_days, Integer
|
44
|
+
|
45
|
+
# @!attribute type
|
46
|
+
# @return [String] The type of invoice this cycle applies to.
|
47
|
+
define_attribute :type, String
|
48
|
+
|
49
|
+
# @!attribute updated_at
|
50
|
+
# @return [DateTime] When the current settings were updated in Recurly.
|
51
|
+
define_attribute :updated_at, DateTime
|
52
|
+
|
53
|
+
# @!attribute version
|
54
|
+
# @return [Integer] Current campaign version.
|
55
|
+
define_attribute :version, Integer
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,18 @@
|
|
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 DunningInterval < Resource
|
8
|
+
|
9
|
+
# @!attribute days
|
10
|
+
# @return [Integer] Number of days before sending the next email.
|
11
|
+
define_attribute :days, Integer
|
12
|
+
|
13
|
+
# @!attribute email_template
|
14
|
+
# @return [String] Email template being used.
|
15
|
+
define_attribute :email_template, String
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -19,7 +19,7 @@ module Recurly
|
|
19
19
|
define_attribute :balance, Float
|
20
20
|
|
21
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.
|
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. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature.
|
23
23
|
define_attribute :billing_info_id, String
|
24
24
|
|
25
25
|
# @!attribute closed_at
|
@@ -54,6 +54,10 @@ module Recurly
|
|
54
54
|
# @return [DateTime] Date invoice is due. This is the date the net terms are reached.
|
55
55
|
define_attribute :due_at, DateTime
|
56
56
|
|
57
|
+
# @!attribute dunning_campaign_id
|
58
|
+
# @return [String] Unique ID to identify the dunning campaign used when dunning the invoice. For sites without multiple dunning campaigns enabled, this will always be the default dunning campaign.
|
59
|
+
define_attribute :dunning_campaign_id, String
|
60
|
+
|
57
61
|
# @!attribute id
|
58
62
|
# @return [String] Invoice ID
|
59
63
|
define_attribute :id, String
|
@@ -107,7 +111,7 @@ module Recurly
|
|
107
111
|
define_attribute :subscription_ids, Array, { :item_type => String }
|
108
112
|
|
109
113
|
# @!attribute subtotal
|
110
|
-
# @return [Float] The summation of charges
|
114
|
+
# @return [Float] The summation of charges and credits, before discounts and taxes.
|
111
115
|
define_attribute :subtotal, Float
|
112
116
|
|
113
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
|
@@ -34,6 +34,10 @@ module Recurly
|
|
34
34
|
# @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
|
35
35
|
define_attribute :avalara_transaction_type, Integer
|
36
36
|
|
37
|
+
# @!attribute bill_for_account_id
|
38
|
+
# @return [String] The UUID of the account responsible for originating the line item.
|
39
|
+
define_attribute :bill_for_account_id, String
|
40
|
+
|
37
41
|
# @!attribute created_at
|
38
42
|
# @return [DateTime] When the line item was created.
|
39
43
|
define_attribute :created_at, DateTime
|
@@ -63,7 +67,7 @@ module Recurly
|
|
63
67
|
define_attribute :end_date, DateTime
|
64
68
|
|
65
69
|
# @!attribute external_sku
|
66
|
-
# @return [String] Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices
|
70
|
+
# @return [String] Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices feature is enabled.
|
67
71
|
define_attribute :external_sku, String
|
68
72
|
|
69
73
|
# @!attribute id
|
@@ -79,11 +83,11 @@ module Recurly
|
|
79
83
|
define_attribute :invoice_number, String
|
80
84
|
|
81
85
|
# @!attribute item_code
|
82
|
-
# @return [String] Unique code to identify an item. Available when the Credit Invoices
|
86
|
+
# @return [String] Unique code to identify an item. Available when the Credit Invoices feature is enabled.
|
83
87
|
define_attribute :item_code, String
|
84
88
|
|
85
89
|
# @!attribute item_id
|
86
|
-
# @return [String] System-generated unique identifier for an item. Available when the Credit Invoices
|
90
|
+
# @return [String] System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled.
|
87
91
|
define_attribute :item_id, String
|
88
92
|
|
89
93
|
# @!attribute legacy_category
|
@@ -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
|
@@ -46,6 +46,10 @@ module Recurly
|
|
46
46
|
# @return [String] Optional description, not displayed.
|
47
47
|
define_attribute :description, String
|
48
48
|
|
49
|
+
# @!attribute dunning_campaign_id
|
50
|
+
# @return [String] Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
|
51
|
+
define_attribute :dunning_campaign_id, String
|
52
|
+
|
49
53
|
# @!attribute hosted_pages
|
50
54
|
# @return [PlanHostedPages] Hosted pages settings
|
51
55
|
define_attribute :hosted_pages, :PlanHostedPages
|
@@ -14,6 +14,10 @@ module Recurly
|
|
14
14
|
# @return [Float] Amount of one-time setup fee automatically charged at the beginning of a subscription billing cycle. For subscription plans with a trial, the setup fee will be charged at the time of signup. Setup fees do not increase with the quantity of a subscription plan.
|
15
15
|
define_attribute :setup_fee, Float
|
16
16
|
|
17
|
+
# @!attribute tax_inclusive
|
18
|
+
# @return [Boolean] Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.
|
19
|
+
define_attribute :tax_inclusive, :Boolean
|
20
|
+
|
17
21
|
# @!attribute unit_amount
|
18
22
|
# @return [Float] Unit price
|
19
23
|
define_attribute :unit_amount, Float
|
@@ -10,6 +10,10 @@ module Recurly
|
|
10
10
|
# @return [String] 3-letter ISO 4217 currency code.
|
11
11
|
define_attribute :currency, String
|
12
12
|
|
13
|
+
# @!attribute tax_inclusive
|
14
|
+
# @return [Boolean] Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.
|
15
|
+
define_attribute :tax_inclusive, :Boolean
|
16
|
+
|
13
17
|
# @!attribute unit_amount
|
14
18
|
# @return [Float] Unit price
|
15
19
|
define_attribute :unit_amount, Float
|
@@ -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
|
@@ -14,6 +14,10 @@ module Recurly
|
|
14
14
|
# @return [DateTime] Activated at
|
15
15
|
define_attribute :activated_at, DateTime
|
16
16
|
|
17
|
+
# @!attribute active_invoice_id
|
18
|
+
# @return [String] The invoice ID of the latest invoice created for an active subscription.
|
19
|
+
define_attribute :active_invoice_id, String
|
20
|
+
|
17
21
|
# @!attribute add_ons
|
18
22
|
# @return [Array[SubscriptionAddOn]] Add-ons
|
19
23
|
define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOn }
|
@@ -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
|
@@ -66,6 +70,10 @@ module Recurly
|
|
66
70
|
# @return [String] The ID of the subscription that is going to be changed.
|
67
71
|
define_attribute :subscription_id, String
|
68
72
|
|
73
|
+
# @!attribute tax_inclusive
|
74
|
+
# @return [Boolean] Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.
|
75
|
+
define_attribute :tax_inclusive, :Boolean
|
76
|
+
|
69
77
|
# @!attribute unit_amount
|
70
78
|
# @return [Float] Unit amount
|
71
79
|
define_attribute :unit_amount, Float
|
@@ -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
|
@@ -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
|
@@ -66,6 +70,10 @@ module Recurly
|
|
66
70
|
# @return [String] The ID of the subscription that is going to be changed.
|
67
71
|
define_attribute :subscription_id, String
|
68
72
|
|
73
|
+
# @!attribute tax_inclusive
|
74
|
+
# @return [Boolean] Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.
|
75
|
+
define_attribute :tax_inclusive, :Boolean
|
76
|
+
|
69
77
|
# @!attribute unit_amount
|
70
78
|
# @return [Float] Unit amount
|
71
79
|
define_attribute :unit_amount, Float
|
@@ -0,0 +1,26 @@
|
|
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 TaxDetail < Resource
|
8
|
+
|
9
|
+
# @!attribute rate
|
10
|
+
# @return [Float] Provides the tax rate for the region.
|
11
|
+
define_attribute :rate, Float
|
12
|
+
|
13
|
+
# @!attribute region
|
14
|
+
# @return [String] Provides the tax region applied on an invoice. For Canadian Sales Tax, this will be either the 2 letter province code or country code.
|
15
|
+
define_attribute :region, String
|
16
|
+
|
17
|
+
# @!attribute tax
|
18
|
+
# @return [Float] The total tax applied for this tax type.
|
19
|
+
define_attribute :tax, Float
|
20
|
+
|
21
|
+
# @!attribute type
|
22
|
+
# @return [String] Provides the tax type for the region. For Canadian Sales Tax, this will be GST, HST, QST or PST.
|
23
|
+
define_attribute :type, String
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -14,6 +14,10 @@ module Recurly
|
|
14
14
|
# @return [String] Provides the tax region applied on an invoice. For U.S. Sales Tax, this will be the 2 letter state code. For EU VAT this will be the 2 letter country code. For all country level tax types, this will display the regional tax, like VAT, GST, or PST.
|
15
15
|
define_attribute :region, String
|
16
16
|
|
17
|
+
# @!attribute tax_details
|
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
|
+
define_attribute :tax_details, Array, { :item_type => :TaxDetail }
|
20
|
+
|
17
21
|
# @!attribute type
|
18
22
|
# @return [String] Provides the tax type as "vat" for EU VAT, "usst" for U.S. Sales Tax, or the 2 letter country code for country level tax types like Canada, Australia, New Zealand, Israel, and all non-EU European countries.
|
19
23
|
define_attribute :type, String
|
@@ -18,6 +18,10 @@ module Recurly
|
|
18
18
|
# @return [String] When processed, result from checking the overall AVS on the transaction.
|
19
19
|
define_attribute :avs_check, String
|
20
20
|
|
21
|
+
# @!attribute backup_payment_method_used
|
22
|
+
# @return [Boolean] Indicates if the transaction was completed using a backup payment
|
23
|
+
define_attribute :backup_payment_method_used, :Boolean
|
24
|
+
|
21
25
|
# @!attribute billing_address
|
22
26
|
# @return [Address]
|
23
27
|
define_attribute :billing_address, :Address
|
@@ -83,7 +87,7 @@ module Recurly
|
|
83
87
|
define_attribute :invoice, :InvoiceMini
|
84
88
|
|
85
89
|
# @!attribute ip_address_country
|
86
|
-
# @return [String] IP address
|
90
|
+
# @return [String] Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known by Recurly.
|
87
91
|
define_attribute :ip_address_country, String
|
88
92
|
|
89
93
|
# @!attribute ip_address_v4
|
data/lib/recurly/version.rb
CHANGED