recurly 4.7.0 → 4.11.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/.travis.yml +3 -1
- data/CHANGELOG.md +48 -0
- data/GETTING_STARTED.md +1 -1
- data/lib/recurly/client/operations.rb +48 -3
- data/lib/recurly/client.rb +12 -4
- data/lib/recurly/connection_pool.rb +11 -9
- 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_pricing.rb +4 -0
- data/lib/recurly/requests/billing_info_create.rb +24 -0
- data/lib/recurly/requests/dunning_campaigns_bulk_update.rb +18 -0
- data/lib/recurly/requests/invoice_collect.rb +1 -1
- data/lib/recurly/requests/line_item_create.rb +4 -0
- 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/subscription_change_create.rb +5 -1
- data/lib/recurly/requests/subscription_change_shipping_create.rb +8 -0
- data/lib/recurly/requests/subscription_create.rb +5 -1
- data/lib/recurly/requests/subscription_purchase.rb +4 -0
- data/lib/recurly/requests/subscription_update.rb +9 -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/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 +5 -1
- data/lib/recurly/resources/line_item.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/subscription.rb +16 -0
- data/lib/recurly/resources/subscription_change.rb +4 -0
- data/lib/recurly/version.rb +1 -1
- data/openapi/api.yaml +525 -11
- metadata +8 -3
@@ -0,0 +1,50 @@
|
|
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 DunningCampaign < Resource
|
8
|
+
|
9
|
+
# @!attribute code
|
10
|
+
# @return [String] Campaign code.
|
11
|
+
define_attribute :code, String
|
12
|
+
|
13
|
+
# @!attribute created_at
|
14
|
+
# @return [DateTime] When the current campaign was created in Recurly.
|
15
|
+
define_attribute :created_at, DateTime
|
16
|
+
|
17
|
+
# @!attribute default_campaign
|
18
|
+
# @return [Boolean] Whether or not this is the default campaign for accounts or plans without an assigned dunning campaign.
|
19
|
+
define_attribute :default_campaign, :Boolean
|
20
|
+
|
21
|
+
# @!attribute deleted_at
|
22
|
+
# @return [DateTime] When the current campaign was deleted in Recurly.
|
23
|
+
define_attribute :deleted_at, DateTime
|
24
|
+
|
25
|
+
# @!attribute description
|
26
|
+
# @return [String] Campaign description.
|
27
|
+
define_attribute :description, String
|
28
|
+
|
29
|
+
# @!attribute dunning_cycles
|
30
|
+
# @return [Array[DunningCycle]] Dunning Cycle settings.
|
31
|
+
define_attribute :dunning_cycles, Array, { :item_type => :DunningCycle }
|
32
|
+
|
33
|
+
# @!attribute id
|
34
|
+
# @return [String]
|
35
|
+
define_attribute :id, String
|
36
|
+
|
37
|
+
# @!attribute name
|
38
|
+
# @return [String] Campaign name.
|
39
|
+
define_attribute :name, String
|
40
|
+
|
41
|
+
# @!attribute object
|
42
|
+
# @return [String] Object type
|
43
|
+
define_attribute :object, String
|
44
|
+
|
45
|
+
# @!attribute updated_at
|
46
|
+
# @return [DateTime] When the current campaign was updated in Recurly.
|
47
|
+
define_attribute :updated_at, DateTime
|
48
|
+
end
|
49
|
+
end
|
50
|
+
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 DunningCampaignsBulkUpdateResponse < Resource
|
8
|
+
|
9
|
+
# @!attribute object
|
10
|
+
# @return [String] Object type
|
11
|
+
define_attribute :object, String
|
12
|
+
|
13
|
+
# @!attribute plans
|
14
|
+
# @return [Array[Plan]] An array containing all of the `Plan` resources that have been updated.
|
15
|
+
define_attribute :plans, Array, { :item_type => :Plan }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -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. Available when the Dunning Campaigns feature is enabled. 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 has_more_line_items
|
58
62
|
# @return [Boolean] Identifies if the invoice has more line items than are returned in `line_items`. If `has_more_line_items` is `true`, then a request needs to be made to the `list_invoice_line_items` endpoint.
|
59
63
|
define_attribute :has_more_line_items, :Boolean
|
@@ -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
|
@@ -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. Available when the Dunning Campaigns feature is enabled. 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
|
@@ -86,6 +86,10 @@ module Recurly
|
|
86
86
|
# @return [DateTime] Expires at
|
87
87
|
define_attribute :expires_at, DateTime
|
88
88
|
|
89
|
+
# @!attribute gateway_code
|
90
|
+
# @return [String] If present, this subscription's transactions will use the payment gateway with this code.
|
91
|
+
define_attribute :gateway_code, String
|
92
|
+
|
89
93
|
# @!attribute id
|
90
94
|
# @return [String] Subscription ID
|
91
95
|
define_attribute :id, String
|
@@ -146,10 +150,22 @@ module Recurly
|
|
146
150
|
# @return [Float] Estimated total, before tax.
|
147
151
|
define_attribute :subtotal, Float
|
148
152
|
|
153
|
+
# @!attribute tax
|
154
|
+
# @return [Float] Estimated tax
|
155
|
+
define_attribute :tax, Float
|
156
|
+
|
157
|
+
# @!attribute tax_info
|
158
|
+
# @return [TaxInfo] Tax info
|
159
|
+
define_attribute :tax_info, :TaxInfo
|
160
|
+
|
149
161
|
# @!attribute terms_and_conditions
|
150
162
|
# @return [String] Terms and conditions
|
151
163
|
define_attribute :terms_and_conditions, String
|
152
164
|
|
165
|
+
# @!attribute total
|
166
|
+
# @return [Float] Estimated total
|
167
|
+
define_attribute :total, Float
|
168
|
+
|
153
169
|
# @!attribute total_billing_cycles
|
154
170
|
# @return [Integer] The number of cycles/billing periods in a term. When `remaining_billing_cycles=0`, if `auto_renew=true` the subscription will renew and a new term will begin, otherwise the subscription will expire.
|
155
171
|
define_attribute :total_billing_cycles, Integer
|
@@ -66,6 +66,10 @@ module Recurly
|
|
66
66
|
# @return [String] The ID of the subscription that is going to be changed.
|
67
67
|
define_attribute :subscription_id, String
|
68
68
|
|
69
|
+
# @!attribute tax_inclusive
|
70
|
+
# @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.
|
71
|
+
define_attribute :tax_inclusive, :Boolean
|
72
|
+
|
69
73
|
# @!attribute unit_amount
|
70
74
|
# @return [Float] Unit amount
|
71
75
|
define_attribute :unit_amount, Float
|
data/lib/recurly/version.rb
CHANGED