recurly 4.7.0 → 4.8.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/client/operations.rb +45 -0
- 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/dunning_campaigns_bulk_update.rb +18 -0
- data/lib/recurly/requests/plan_create.rb +4 -0
- data/lib/recurly/requests/plan_update.rb +4 -0
- data/lib/recurly/resources/account.rb +4 -0
- data/lib/recurly/resources/account_mini.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 +4 -0
- data/lib/recurly/resources/plan.rb +4 -0
- data/lib/recurly/version.rb +1 -1
- data/openapi/api.yaml +319 -0
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37656e729dc7f26fa5d3b76f5eb7df142c2e4cc1f8ff25d2d53a4ef0a3ab31a5
|
4
|
+
data.tar.gz: b09061036a53cd15415e8ec84d4e2153cf16351d5ff9570ca6b9c6e5b4616bce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6871927fe2f08fd44758d19b2ddc134a63fe9db3bacbd6b4b2bb0145597c058f916cccfc65ffdca97211d153eb98c459daa031b453f30863ad5c689ec10eccb
|
7
|
+
data.tar.gz: 2b3a3d585b16dcaad4319c43534e2be85c294b8a10fddc9d7255fe3a6dc10740a4ec20d9242363a6724bcd3f783accb268b6b297f7111ce2304b27bf5b5357e6
|
data/.bumpversion.cfg
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [4.8.0](https://github.com/recurly/recurly-client-ruby/tree/4.8.0) (2021-09-01)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.7.0...4.8.0)
|
6
|
+
|
7
|
+
|
8
|
+
**Merged Pull Requests**
|
9
|
+
|
10
|
+
- Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#724](https://github.com/recurly/recurly-client-ruby/pull/724) ([recurly-integrations](https://github.com/recurly-integrations))
|
11
|
+
|
12
|
+
|
13
|
+
|
3
14
|
## [4.7.0](https://github.com/recurly/recurly-client-ruby/tree/4.7.0) (2021-08-19)
|
4
15
|
|
5
16
|
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.6.0...4.7.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.8'
|
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.
|
@@ -3903,5 +3903,50 @@ module Recurly
|
|
3903
3903
|
path = interpolate_path("/export_dates/{export_date}/export_files", export_date: export_date)
|
3904
3904
|
get(path, **options)
|
3905
3905
|
end
|
3906
|
+
|
3907
|
+
# Show the dunning campaigns for a site
|
3908
|
+
#
|
3909
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/list_dunning_campaigns list_dunning_campaigns api documenation}
|
3910
|
+
#
|
3911
|
+
# @param params [Hash] Optional query string parameters:
|
3912
|
+
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
|
3913
|
+
# order. In descending order updated records will move behind the cursor and could
|
3914
|
+
# prevent some records from being returned.
|
3915
|
+
#
|
3916
|
+
#
|
3917
|
+
# @return [Pager<Resources::DunningCampaign>] A list of the the dunning_campaigns on an account.
|
3918
|
+
#
|
3919
|
+
def list_dunning_campaigns(**options)
|
3920
|
+
path = "/dunning_campaigns"
|
3921
|
+
pager(path, **options)
|
3922
|
+
end
|
3923
|
+
|
3924
|
+
# Show the settings for a dunning campaign
|
3925
|
+
#
|
3926
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/get_dunning_campaign get_dunning_campaign api documenation}
|
3927
|
+
#
|
3928
|
+
# @param dunning_campaign_id [String] Dunning Campaign ID, e.g. +e28zov4fw0v2+.
|
3929
|
+
# @param params [Hash] Optional query string parameters:
|
3930
|
+
#
|
3931
|
+
# @return [Resources::DunningCampaign] Settings for a dunning campaign.
|
3932
|
+
#
|
3933
|
+
def get_dunning_campaign(dunning_campaign_id:, **options)
|
3934
|
+
path = interpolate_path("/dunning_campaigns/{dunning_campaign_id}", dunning_campaign_id: dunning_campaign_id)
|
3935
|
+
get(path, **options)
|
3936
|
+
end
|
3937
|
+
|
3938
|
+
# Assign a dunning campaign to multiple plans
|
3939
|
+
#
|
3940
|
+
# {https://developers.recurly.com/api/v2021-02-25#operation/put_dunning_campaign_bulk_update put_dunning_campaign_bulk_update api documenation}
|
3941
|
+
#
|
3942
|
+
# @param body [Requests::DunningCampaignsBulkUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::DunningCampaignsBulkUpdate}
|
3943
|
+
# @param params [Hash] Optional query string parameters:
|
3944
|
+
#
|
3945
|
+
# @return [Resources::DunningCampaignsBulkUpdateResponse] A list of updated plans.
|
3946
|
+
#
|
3947
|
+
def put_dunning_campaign_bulk_update(body:, **options)
|
3948
|
+
path = "/dunning_campaigns/{dunning_campaign_id}/bulk_update"
|
3949
|
+
put(path, body, Requests::DunningCampaignsBulkUpdate, **options)
|
3950
|
+
end
|
3906
3951
|
end
|
3907
3952
|
end
|
@@ -38,6 +38,10 @@ module Recurly
|
|
38
38
|
# @return [Array[CustomField]] The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
|
39
39
|
define_attribute :custom_fields, Array, { :item_type => :CustomField }
|
40
40
|
|
41
|
+
# @!attribute dunning_campaign_id
|
42
|
+
# @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 account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
|
43
|
+
define_attribute :dunning_campaign_id, String
|
44
|
+
|
41
45
|
# @!attribute email
|
42
46
|
# @return [String] The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.
|
43
47
|
define_attribute :email, String
|
@@ -38,6 +38,10 @@ module Recurly
|
|
38
38
|
# @return [Array[CustomField]] The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
|
39
39
|
define_attribute :custom_fields, Array, { :item_type => :CustomField }
|
40
40
|
|
41
|
+
# @!attribute dunning_campaign_id
|
42
|
+
# @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 account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
|
43
|
+
define_attribute :dunning_campaign_id, String
|
44
|
+
|
41
45
|
# @!attribute email
|
42
46
|
# @return [String] The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.
|
43
47
|
define_attribute :email, String
|
@@ -30,6 +30,10 @@ module Recurly
|
|
30
30
|
# @return [Array[CustomField]] The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
|
31
31
|
define_attribute :custom_fields, Array, { :item_type => :CustomField }
|
32
32
|
|
33
|
+
# @!attribute dunning_campaign_id
|
34
|
+
# @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 account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
|
35
|
+
define_attribute :dunning_campaign_id, String
|
36
|
+
|
33
37
|
# @!attribute email
|
34
38
|
# @return [String] The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.
|
35
39
|
define_attribute :email, String
|
@@ -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 Requests
|
7
|
+
class DunningCampaignsBulkUpdate < Request
|
8
|
+
|
9
|
+
# @!attribute plan_codes
|
10
|
+
# @return [Array[String]] List of `plan_codes` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_ids` is present.
|
11
|
+
define_attribute :plan_codes, Array, { :item_type => String }
|
12
|
+
|
13
|
+
# @!attribute plan_ids
|
14
|
+
# @return [Array[String]] List of `plan_ids` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_codes` is present.
|
15
|
+
define_attribute :plan_ids, Array, { :item_type => String }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -42,6 +42,10 @@ module Recurly
|
|
42
42
|
# @return [String] Optional description, not displayed.
|
43
43
|
define_attribute :description, String
|
44
44
|
|
45
|
+
# @!attribute dunning_campaign_id
|
46
|
+
# @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.
|
47
|
+
define_attribute :dunning_campaign_id, String
|
48
|
+
|
45
49
|
# @!attribute hosted_pages
|
46
50
|
# @return [PlanHostedPages] Hosted pages settings
|
47
51
|
define_attribute :hosted_pages, :PlanHostedPages
|
@@ -38,6 +38,10 @@ module Recurly
|
|
38
38
|
# @return [String] Optional description, not displayed.
|
39
39
|
define_attribute :description, String
|
40
40
|
|
41
|
+
# @!attribute dunning_campaign_id
|
42
|
+
# @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.
|
43
|
+
define_attribute :dunning_campaign_id, String
|
44
|
+
|
41
45
|
# @!attribute hosted_pages
|
42
46
|
# @return [PlanHostedPages] Hosted pages settings
|
43
47
|
define_attribute :hosted_pages, :PlanHostedPages
|
@@ -42,6 +42,10 @@ module Recurly
|
|
42
42
|
# @return [DateTime] If present, when the account was last marked inactive.
|
43
43
|
define_attribute :deleted_at, DateTime
|
44
44
|
|
45
|
+
# @!attribute dunning_campaign_id
|
46
|
+
# @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 account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
|
47
|
+
define_attribute :dunning_campaign_id, String
|
48
|
+
|
45
49
|
# @!attribute email
|
46
50
|
# @return [String] The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.
|
47
51
|
define_attribute :email, String
|
@@ -18,6 +18,10 @@ module Recurly
|
|
18
18
|
# @return [String]
|
19
19
|
define_attribute :company, String
|
20
20
|
|
21
|
+
# @!attribute dunning_campaign_id
|
22
|
+
# @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 account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
|
23
|
+
define_attribute :dunning_campaign_id, String
|
24
|
+
|
21
25
|
# @!attribute email
|
22
26
|
# @return [String] The email address used for communicating with this customer.
|
23
27
|
define_attribute :email, String
|
@@ -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
|
@@ -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
|
@@ -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
|
data/lib/recurly/version.rb
CHANGED
data/openapi/api.yaml
CHANGED
@@ -219,6 +219,7 @@ x-tagGroups:
|
|
219
219
|
- site
|
220
220
|
- custom_field_definition
|
221
221
|
- shipping_method
|
222
|
+
- dunning_campaigns
|
222
223
|
tags:
|
223
224
|
- name: site
|
224
225
|
x-displayName: Site
|
@@ -332,6 +333,9 @@ tags:
|
|
332
333
|
- name: automated_exports
|
333
334
|
x-displayName: Automated Exports
|
334
335
|
description: Automated exports of customer data.
|
336
|
+
- name: dunning_campaigns
|
337
|
+
x-displayName: Dunning Campaigns
|
338
|
+
description: Settings used when attempting to dun customers whose payments are declined.
|
335
339
|
paths:
|
336
340
|
"/sites":
|
337
341
|
get:
|
@@ -14432,6 +14436,107 @@ paths:
|
|
14432
14436
|
err.(*recurly.Error); ok {\n\tfmt.Printf(\"Unexpected Recurly error: %v\",
|
14433
14437
|
e)\n\treturn nil, err\n}\n\nfor _, file := range exportFiles.Files {\n\tfmt.Println(\"Export
|
14434
14438
|
file download URL: \", file.Href)\n}"
|
14439
|
+
"/dunning_campaigns":
|
14440
|
+
get:
|
14441
|
+
tags:
|
14442
|
+
- dunning_campaigns
|
14443
|
+
operationId: list_dunning_campaigns
|
14444
|
+
summary: Show the dunning campaigns for a site
|
14445
|
+
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
14446
|
+
to use pagination in the API and Client Libraries.
|
14447
|
+
parameters:
|
14448
|
+
- "$ref": "#/components/parameters/sort_dates"
|
14449
|
+
responses:
|
14450
|
+
'200':
|
14451
|
+
description: A list of the the dunning_campaigns on an account.
|
14452
|
+
content:
|
14453
|
+
application/json:
|
14454
|
+
schema:
|
14455
|
+
"$ref": "#/components/schemas/DunningCampaignList"
|
14456
|
+
'404':
|
14457
|
+
description: Incorrect site.
|
14458
|
+
content:
|
14459
|
+
application/json:
|
14460
|
+
schema:
|
14461
|
+
"$ref": "#/components/schemas/Error"
|
14462
|
+
default:
|
14463
|
+
description: Unexpected error.
|
14464
|
+
content:
|
14465
|
+
application/json:
|
14466
|
+
schema:
|
14467
|
+
"$ref": "#/components/schemas/Error"
|
14468
|
+
x-code-samples: []
|
14469
|
+
"/dunning_campaigns/{dunning_campaign_id}":
|
14470
|
+
parameters:
|
14471
|
+
- "$ref": "#/components/parameters/dunning_campaign_id"
|
14472
|
+
get:
|
14473
|
+
tags:
|
14474
|
+
- dunning_campaigns
|
14475
|
+
operationId: get_dunning_campaign
|
14476
|
+
summary: Show the settings for a dunning campaign
|
14477
|
+
responses:
|
14478
|
+
'200':
|
14479
|
+
description: Settings for a dunning campaign.
|
14480
|
+
content:
|
14481
|
+
application/json:
|
14482
|
+
schema:
|
14483
|
+
"$ref": "#/components/schemas/DunningCampaign"
|
14484
|
+
'400':
|
14485
|
+
description: Bad request; perhaps missing or invalid parameters.
|
14486
|
+
content:
|
14487
|
+
application/json:
|
14488
|
+
schema:
|
14489
|
+
"$ref": "#/components/schemas/Error"
|
14490
|
+
'404':
|
14491
|
+
description: Incorrect site or campaign ID.
|
14492
|
+
content:
|
14493
|
+
application/json:
|
14494
|
+
schema:
|
14495
|
+
"$ref": "#/components/schemas/Error"
|
14496
|
+
default:
|
14497
|
+
description: Unexpected error.
|
14498
|
+
content:
|
14499
|
+
application/json:
|
14500
|
+
schema:
|
14501
|
+
"$ref": "#/components/schemas/Error"
|
14502
|
+
x-code-samples: []
|
14503
|
+
"/dunning_campaigns/{dunning_campaign_id}/bulk_update":
|
14504
|
+
put:
|
14505
|
+
tags:
|
14506
|
+
- dunning_campaigns
|
14507
|
+
operationId: put_dunning_campaign_bulk_update
|
14508
|
+
summary: Assign a dunning campaign to multiple plans
|
14509
|
+
requestBody:
|
14510
|
+
content:
|
14511
|
+
application/json:
|
14512
|
+
schema:
|
14513
|
+
"$ref": "#/components/schemas/DunningCampaignsBulkUpdate"
|
14514
|
+
responses:
|
14515
|
+
'200':
|
14516
|
+
description: A list of updated plans.
|
14517
|
+
content:
|
14518
|
+
application/json:
|
14519
|
+
schema:
|
14520
|
+
"$ref": "#/components/schemas/DunningCampaignsBulkUpdateResponse"
|
14521
|
+
'400':
|
14522
|
+
description: Bad request; perhaps missing or invalid parameters.
|
14523
|
+
content:
|
14524
|
+
application/json:
|
14525
|
+
schema:
|
14526
|
+
"$ref": "#/components/schemas/Error"
|
14527
|
+
'404':
|
14528
|
+
description: Incorrect site or campaign ID.
|
14529
|
+
content:
|
14530
|
+
application/json:
|
14531
|
+
schema:
|
14532
|
+
"$ref": "#/components/schemas/Error"
|
14533
|
+
default:
|
14534
|
+
description: Unexpected error.
|
14535
|
+
content:
|
14536
|
+
application/json:
|
14537
|
+
schema:
|
14538
|
+
"$ref": "#/components/schemas/Error"
|
14539
|
+
x-code-samples: []
|
14435
14540
|
servers:
|
14436
14541
|
- url: https://v3.recurly.com
|
14437
14542
|
components:
|
@@ -14575,6 +14680,13 @@ components:
|
|
14575
14680
|
required: true
|
14576
14681
|
schema:
|
14577
14682
|
type: string
|
14683
|
+
dunning_campaign_id:
|
14684
|
+
name: dunning_campaign_id
|
14685
|
+
in: path
|
14686
|
+
description: Dunning Campaign ID, e.g. `e28zov4fw0v2`.
|
14687
|
+
required: true
|
14688
|
+
schema:
|
14689
|
+
type: string
|
14578
14690
|
ids:
|
14579
14691
|
name: ids
|
14580
14692
|
in: query
|
@@ -15324,6 +15436,14 @@ components:
|
|
15324
15436
|
created by this request. Supports 'moto' value, which is the acronym for
|
15325
15437
|
mail order and telephone transactions.
|
15326
15438
|
"$ref": "#/components/schemas/GatewayTransactionTypeEnum"
|
15439
|
+
dunning_campaign_id:
|
15440
|
+
type: string
|
15441
|
+
title: Dunning Campaign ID
|
15442
|
+
description: Unique ID to identify a dunning campaign. Available when the
|
15443
|
+
Dunning Campaigns feature is enabled. Used to specify if a non-default
|
15444
|
+
dunning campaign should be assigned to this account. For sites without
|
15445
|
+
multiple dunning campaigns enabled, the default dunning campaign will
|
15446
|
+
always be used.
|
15327
15447
|
address:
|
15328
15448
|
"$ref": "#/components/schemas/Address"
|
15329
15449
|
billing_info:
|
@@ -15394,6 +15514,14 @@ components:
|
|
15394
15514
|
specifically whether the account is self-paying or will rely on the parent
|
15395
15515
|
account to pay.
|
15396
15516
|
"$ref": "#/components/schemas/BillToEnum"
|
15517
|
+
dunning_campaign_id:
|
15518
|
+
type: string
|
15519
|
+
title: Dunning Campaign ID
|
15520
|
+
description: Unique ID to identify a dunning campaign. Available when the
|
15521
|
+
Dunning Campaigns feature is enabled. Used to specify if a non-default
|
15522
|
+
dunning campaign should be assigned to this account. For sites without
|
15523
|
+
multiple dunning campaigns enabled, the default dunning campaign will
|
15524
|
+
always be used.
|
15397
15525
|
address:
|
15398
15526
|
"$ref": "#/components/schemas/Address"
|
15399
15527
|
billing_info:
|
@@ -15459,6 +15587,14 @@ components:
|
|
15459
15587
|
bill_to:
|
15460
15588
|
type: string
|
15461
15589
|
maxLength: 6
|
15590
|
+
dunning_campaign_id:
|
15591
|
+
type: string
|
15592
|
+
title: Dunning Campaign ID
|
15593
|
+
description: Unique ID to identify a dunning campaign. Available when the
|
15594
|
+
Dunning Campaigns feature is enabled. Used to specify if a non-default
|
15595
|
+
dunning campaign should be assigned to this account. For sites without
|
15596
|
+
multiple dunning campaigns enabled, the default dunning campaign will
|
15597
|
+
always be used.
|
15462
15598
|
AccountBalance:
|
15463
15599
|
type: object
|
15464
15600
|
properties:
|
@@ -17375,6 +17511,13 @@ components:
|
|
17375
17511
|
format: date-time
|
17376
17512
|
title: Closed at
|
17377
17513
|
description: Date invoice was marked paid or failed.
|
17514
|
+
dunning_campaign_id:
|
17515
|
+
type: string
|
17516
|
+
title: Dunning Campaign ID
|
17517
|
+
description: Unique ID to identify the dunning campaign used when dunning
|
17518
|
+
the invoice. Available when the Dunning Campaigns feature is enabled.
|
17519
|
+
For sites without multiple dunning campaigns enabled, this will always
|
17520
|
+
be the default dunning campaign.
|
17378
17521
|
InvoiceCreate:
|
17379
17522
|
type: object
|
17380
17523
|
properties:
|
@@ -18287,6 +18430,14 @@ components:
|
|
18287
18430
|
Used to determine whether items can be assigned as add-ons to individual subscriptions.
|
18288
18431
|
If `true`, items can be assigned as add-ons to individual subscription add-ons.
|
18289
18432
|
If `false`, only plan add-ons can be used.
|
18433
|
+
dunning_campaign_id:
|
18434
|
+
type: string
|
18435
|
+
title: Dunning Campaign ID
|
18436
|
+
description: Unique ID to identify a dunning campaign. Available when the
|
18437
|
+
Dunning Campaigns feature is enabled. Used to specify if a non-default
|
18438
|
+
dunning campaign should be assigned to this plan. For sites without multiple
|
18439
|
+
dunning campaigns enabled, the default dunning campaign will always be
|
18440
|
+
used.
|
18290
18441
|
created_at:
|
18291
18442
|
type: string
|
18292
18443
|
format: date-time
|
@@ -18443,6 +18594,14 @@ components:
|
|
18443
18594
|
Used to determine whether items can be assigned as add-ons to individual subscriptions.
|
18444
18595
|
If `true`, items can be assigned as add-ons to individual subscription add-ons.
|
18445
18596
|
If `false`, only plan add-ons can be used.
|
18597
|
+
dunning_campaign_id:
|
18598
|
+
type: string
|
18599
|
+
title: Dunning Campaign ID
|
18600
|
+
description: Unique ID to identify a dunning campaign. Available when the
|
18601
|
+
Dunning Campaigns feature is enabled. Used to specify if a non-default
|
18602
|
+
dunning campaign should be assigned to this plan. For sites without multiple
|
18603
|
+
dunning campaigns enabled, the default dunning campaign will always be
|
18604
|
+
used.
|
18446
18605
|
required:
|
18447
18606
|
- code
|
18448
18607
|
- name
|
@@ -18619,6 +18778,14 @@ components:
|
|
18619
18778
|
Used to determine whether items can be assigned as add-ons to individual subscriptions.
|
18620
18779
|
If `true`, items can be assigned as add-ons to individual subscription add-ons.
|
18621
18780
|
If `false`, only plan add-ons can be used.
|
18781
|
+
dunning_campaign_id:
|
18782
|
+
type: string
|
18783
|
+
title: Dunning Campaign ID
|
18784
|
+
description: Unique ID to identify a dunning campaign. Available when the
|
18785
|
+
Dunning Campaigns feature is enabled. Used to specify if a non-default
|
18786
|
+
dunning campaign should be assigned to this plan. For sites without multiple
|
18787
|
+
dunning campaigns enabled, the default dunning campaign will always be
|
18788
|
+
used.
|
18622
18789
|
AddOnPricing:
|
18623
18790
|
type: object
|
18624
18791
|
properties:
|
@@ -20803,6 +20970,150 @@ components:
|
|
20803
20970
|
required:
|
20804
20971
|
- currency
|
20805
20972
|
- account
|
20973
|
+
DunningCampaign:
|
20974
|
+
type: object
|
20975
|
+
description: Settings for a dunning campaign.
|
20976
|
+
properties:
|
20977
|
+
id:
|
20978
|
+
type: string
|
20979
|
+
object:
|
20980
|
+
type: string
|
20981
|
+
title: Object type
|
20982
|
+
code:
|
20983
|
+
type: string
|
20984
|
+
description: Campaign code.
|
20985
|
+
name:
|
20986
|
+
type: string
|
20987
|
+
description: Campaign name.
|
20988
|
+
description:
|
20989
|
+
type: string
|
20990
|
+
description: Campaign description.
|
20991
|
+
default_campaign:
|
20992
|
+
type: boolean
|
20993
|
+
description: Whether or not this is the default campaign for accounts or
|
20994
|
+
plans without an assigned dunning campaign.
|
20995
|
+
dunning_cycles:
|
20996
|
+
type: array
|
20997
|
+
description: Dunning Cycle settings.
|
20998
|
+
items:
|
20999
|
+
"$ref": "#/components/schemas/DunningCycle"
|
21000
|
+
created_at:
|
21001
|
+
type: string
|
21002
|
+
format: date-time
|
21003
|
+
description: When the current campaign was created in Recurly.
|
21004
|
+
updated_at:
|
21005
|
+
type: string
|
21006
|
+
format: date-time
|
21007
|
+
description: When the current campaign was updated in Recurly.
|
21008
|
+
deleted_at:
|
21009
|
+
type: string
|
21010
|
+
format: date-time
|
21011
|
+
description: When the current campaign was deleted in Recurly.
|
21012
|
+
DunningCampaignList:
|
21013
|
+
type: object
|
21014
|
+
properties:
|
21015
|
+
object:
|
21016
|
+
type: string
|
21017
|
+
title: Object type
|
21018
|
+
description: Will always be List.
|
21019
|
+
has_more:
|
21020
|
+
type: boolean
|
21021
|
+
description: Indicates there are more results on subsequent pages.
|
21022
|
+
next:
|
21023
|
+
type: string
|
21024
|
+
description: Path to subsequent page of results.
|
21025
|
+
data:
|
21026
|
+
type: array
|
21027
|
+
items:
|
21028
|
+
"$ref": "#/components/schemas/DunningCampaign"
|
21029
|
+
DunningCycle:
|
21030
|
+
type: object
|
21031
|
+
properties:
|
21032
|
+
type:
|
21033
|
+
"$ref": "#/components/schemas/DunningCycleTypeEnum"
|
21034
|
+
applies_to_manual_trial:
|
21035
|
+
type: boolean
|
21036
|
+
description: Whether the dunning settings will be applied to manual trials.
|
21037
|
+
Only applies to trial cycles.
|
21038
|
+
first_communication_interval:
|
21039
|
+
type: integer
|
21040
|
+
description: The number of days after a transaction failure before the first
|
21041
|
+
dunning email is sent.
|
21042
|
+
send_immediately_on_hard_decline:
|
21043
|
+
type: boolean
|
21044
|
+
description: Whether or not to send an extra email immediately to customers
|
21045
|
+
whose initial payment attempt fails with either a hard decline or invalid
|
21046
|
+
billing info.
|
21047
|
+
intervals:
|
21048
|
+
type: array
|
21049
|
+
description: Dunning intervals.
|
21050
|
+
items:
|
21051
|
+
"$ref": "#/components/schemas/DunningInterval"
|
21052
|
+
expire_subscription:
|
21053
|
+
type: boolean
|
21054
|
+
description: Whether the subscription(s) should be cancelled at the end
|
21055
|
+
of the dunning cycle.
|
21056
|
+
fail_invoice:
|
21057
|
+
type: boolean
|
21058
|
+
description: Whether the invoice should be failed at the end of the dunning
|
21059
|
+
cycle.
|
21060
|
+
total_dunning_days:
|
21061
|
+
type: integer
|
21062
|
+
description: The number of days between the first dunning email being sent
|
21063
|
+
and the end of the dunning cycle.
|
21064
|
+
total_recycling_days:
|
21065
|
+
type: integer
|
21066
|
+
description: The number of days between a transaction failure and the end
|
21067
|
+
of the dunning cycle.
|
21068
|
+
version:
|
21069
|
+
type: integer
|
21070
|
+
description: Current campaign version.
|
21071
|
+
created_at:
|
21072
|
+
type: string
|
21073
|
+
format: date-time
|
21074
|
+
description: When the current settings were created in Recurly.
|
21075
|
+
updated_at:
|
21076
|
+
type: string
|
21077
|
+
format: date-time
|
21078
|
+
description: When the current settings were updated in Recurly.
|
21079
|
+
DunningInterval:
|
21080
|
+
properties:
|
21081
|
+
days:
|
21082
|
+
type: integer
|
21083
|
+
description: Number of days before sending the next email.
|
21084
|
+
email_template:
|
21085
|
+
type: string
|
21086
|
+
description: Email template being used.
|
21087
|
+
DunningCampaignsBulkUpdate:
|
21088
|
+
properties:
|
21089
|
+
plan_codes:
|
21090
|
+
type: array
|
21091
|
+
maxItems: 200
|
21092
|
+
description: List of `plan_codes` associated with the Plans for which the
|
21093
|
+
dunning campaign should be updated. Required unless `plan_ids` is present.
|
21094
|
+
items:
|
21095
|
+
type: string
|
21096
|
+
plan_ids:
|
21097
|
+
type: array
|
21098
|
+
maxItems: 200
|
21099
|
+
description: List of `plan_ids` associated with the Plans for which the
|
21100
|
+
dunning campaign should be updated. Required unless `plan_codes` is present.
|
21101
|
+
items:
|
21102
|
+
type: string
|
21103
|
+
DunningCampaignsBulkUpdateResponse:
|
21104
|
+
properties:
|
21105
|
+
object:
|
21106
|
+
type: string
|
21107
|
+
title: Object type
|
21108
|
+
readOnly: true
|
21109
|
+
plans:
|
21110
|
+
type: array
|
21111
|
+
title: Plans
|
21112
|
+
description: An array containing all of the `Plan` resources that have been
|
21113
|
+
updated.
|
21114
|
+
maxItems: 200
|
21115
|
+
items:
|
21116
|
+
"$ref": "#/components/schemas/Plan"
|
20806
21117
|
PaymentMethod:
|
20807
21118
|
properties:
|
20808
21119
|
object:
|
@@ -21442,6 +21753,7 @@ components:
|
|
21442
21753
|
- Union Pay
|
21443
21754
|
- Unknown
|
21444
21755
|
- Visa
|
21756
|
+
- Tarjeta Naranja
|
21445
21757
|
AccountTypeEnum:
|
21446
21758
|
type: string
|
21447
21759
|
enum:
|
@@ -21655,3 +21967,10 @@ components:
|
|
21655
21967
|
enum:
|
21656
21968
|
- cpf
|
21657
21969
|
- cuit
|
21970
|
+
DunningCycleTypeEnum:
|
21971
|
+
type: string
|
21972
|
+
description: The type of invoice this cycle applies to.
|
21973
|
+
enum:
|
21974
|
+
- automatic
|
21975
|
+
- manual
|
21976
|
+
- trial
|
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.8.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-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -162,6 +162,7 @@ files:
|
|
162
162
|
- lib/recurly/requests/coupon_redemption_create.rb
|
163
163
|
- lib/recurly/requests/coupon_update.rb
|
164
164
|
- lib/recurly/requests/custom_field.rb
|
165
|
+
- lib/recurly/requests/dunning_campaigns_bulk_update.rb
|
165
166
|
- lib/recurly/requests/external_refund.rb
|
166
167
|
- lib/recurly/requests/external_transaction.rb
|
167
168
|
- lib/recurly/requests/invoice_address.rb
|
@@ -231,6 +232,10 @@ files:
|
|
231
232
|
- lib/recurly/resources/credit_payment.rb
|
232
233
|
- lib/recurly/resources/custom_field.rb
|
233
234
|
- lib/recurly/resources/custom_field_definition.rb
|
235
|
+
- lib/recurly/resources/dunning_campaign.rb
|
236
|
+
- lib/recurly/resources/dunning_campaigns_bulk_update_response.rb
|
237
|
+
- lib/recurly/resources/dunning_cycle.rb
|
238
|
+
- lib/recurly/resources/dunning_interval.rb
|
234
239
|
- lib/recurly/resources/error.rb
|
235
240
|
- lib/recurly/resources/error_may_have_transaction.rb
|
236
241
|
- lib/recurly/resources/export_dates.rb
|
@@ -297,7 +302,7 @@ metadata:
|
|
297
302
|
changelog_uri: https://github.com/recurly/recurly-client-ruby/blob/master/CHANGELOG.md
|
298
303
|
documentation_uri: https://recurly.github.io/recurly-client-ruby/
|
299
304
|
homepage_uri: https://github.com/recurly/recurly-client-ruby
|
300
|
-
source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.
|
305
|
+
source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.8.0
|
301
306
|
post_install_message:
|
302
307
|
rdoc_options: []
|
303
308
|
require_paths:
|