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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d45224bbd99e205cb61df3b688a47b73527e19b0cb12bc1dd64c01fabf035ec6
|
4
|
+
data.tar.gz: c921de862702509c3b4929c610e4565dc4ad868ba72daa8668781b2162a06362
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3598292853a0f0a551fd653c46ab53cfe223276acf9155eb20dd1a0df1bf6e60d09a7f184838efaff53ecb6b910f33d5c26fe0d4f83efadb8ceadccb37c5708
|
7
|
+
data.tar.gz: 2c5faf56692a870a199c94baff93aa4017564b32cce82104654b377a04bed36dd7623a90ce7c65a5020d57f4f3361732ddf9d43f1c3860d4d5544eaa4b61237b
|
data/.bumpversion.cfg
CHANGED
data/.travis.yml
CHANGED
@@ -8,7 +8,9 @@ rvm:
|
|
8
8
|
- 3.0
|
9
9
|
bundler_args: --binstubs
|
10
10
|
before_install:
|
11
|
+
- sudo apt-get update && sudo apt-get install apt-transport-https ca-certificates -y && sudo update-ca-certificates
|
11
12
|
- gem update --system
|
12
13
|
- gem install bundler
|
14
|
+
dist: focal
|
13
15
|
script:
|
14
|
-
- ./scripts/test
|
16
|
+
- ./scripts/test
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,53 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [4.11.0](https://github.com/recurly/recurly-client-ruby/tree/4.11.0) (2021-12-29)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.10.0...4.11.0)
|
6
|
+
|
7
|
+
|
8
|
+
**Merged Pull Requests**
|
9
|
+
|
10
|
+
- Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#741](https://github.com/recurly/recurly-client-ruby/pull/741) ([recurly-integrations](https://github.com/recurly-integrations))
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
## [4.10.0](https://github.com/recurly/recurly-client-ruby/tree/4.10.0) (2021-11-22)
|
15
|
+
|
16
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.9.0...4.10.0)
|
17
|
+
|
18
|
+
|
19
|
+
**Merged Pull Requests**
|
20
|
+
|
21
|
+
- Generated Latest Changes for v2021-02-25 [#739](https://github.com/recurly/recurly-client-ruby/pull/739) ([recurly-integrations](https://github.com/recurly-integrations))
|
22
|
+
- Generated Latest Changes for v2021-02-25 [#736](https://github.com/recurly/recurly-client-ruby/pull/736) ([recurly-integrations](https://github.com/recurly-integrations))
|
23
|
+
- Allow API base url configuration [#735](https://github.com/recurly/recurly-client-ruby/pull/735) ([cbarton](https://github.com/cbarton))
|
24
|
+
- Generated Latest Changes for v2021-02-25 [#734](https://github.com/recurly/recurly-client-ruby/pull/734) ([recurly-integrations](https://github.com/recurly-integrations))
|
25
|
+
- Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-ruby/pull/728) ([recurly-integrations](https://github.com/recurly-integrations))
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
## [4.9.0](https://github.com/recurly/recurly-client-ruby/tree/4.9.0) (2021-09-16)
|
30
|
+
|
31
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.8.0...4.9.0)
|
32
|
+
|
33
|
+
|
34
|
+
**Merged Pull Requests**
|
35
|
+
|
36
|
+
- Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#725](https://github.com/recurly/recurly-client-ruby/pull/725) ([recurly-integrations](https://github.com/recurly-integrations))
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
## [4.8.0](https://github.com/recurly/recurly-client-ruby/tree/4.8.0) (2021-09-01)
|
41
|
+
|
42
|
+
[Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.7.0...4.8.0)
|
43
|
+
|
44
|
+
|
45
|
+
**Merged Pull Requests**
|
46
|
+
|
47
|
+
- 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))
|
48
|
+
|
49
|
+
|
50
|
+
|
3
51
|
## [4.7.0](https://github.com/recurly/recurly-client-ruby/tree/4.7.0) (2021-08-19)
|
4
52
|
|
5
53
|
[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.11'
|
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.
|
@@ -532,7 +532,7 @@ module Recurly
|
|
532
532
|
# {https://developers.recurly.com/api/v2021-02-25#operation/get_a_billing_info get_a_billing_info api documenation}
|
533
533
|
#
|
534
534
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
535
|
-
# @param billing_info_id [String] Billing Info ID.
|
535
|
+
# @param billing_info_id [String] Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature.
|
536
536
|
# @param params [Hash] Optional query string parameters:
|
537
537
|
#
|
538
538
|
# @return [Resources::BillingInfo] A billing info.
|
@@ -547,7 +547,7 @@ module Recurly
|
|
547
547
|
# {https://developers.recurly.com/api/v2021-02-25#operation/update_a_billing_info update_a_billing_info api documenation}
|
548
548
|
#
|
549
549
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
550
|
-
# @param billing_info_id [String] Billing Info ID.
|
550
|
+
# @param billing_info_id [String] Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature.
|
551
551
|
# @param body [Requests::BillingInfoCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::BillingInfoCreate}
|
552
552
|
# @param params [Hash] Optional query string parameters:
|
553
553
|
#
|
@@ -563,7 +563,7 @@ module Recurly
|
|
563
563
|
# {https://developers.recurly.com/api/v2021-02-25#operation/remove_a_billing_info remove_a_billing_info api documenation}
|
564
564
|
#
|
565
565
|
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
|
566
|
-
# @param billing_info_id [String] Billing Info ID.
|
566
|
+
# @param billing_info_id [String] Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature.
|
567
567
|
# @param params [Hash] Optional query string parameters:
|
568
568
|
#
|
569
569
|
# @return [Resources::Empty] Billing information deleted
|
@@ -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
|
data/lib/recurly/client.rb
CHANGED
@@ -3,6 +3,7 @@ require "erb"
|
|
3
3
|
require "net/https"
|
4
4
|
require "base64"
|
5
5
|
require "securerandom"
|
6
|
+
require "uri"
|
6
7
|
require_relative "./schema/json_parser"
|
7
8
|
require_relative "./schema/file_parser"
|
8
9
|
|
@@ -10,8 +11,7 @@ module Recurly
|
|
10
11
|
class Client
|
11
12
|
require_relative "./client/operations"
|
12
13
|
|
13
|
-
|
14
|
-
BASE_PORT = 443
|
14
|
+
BASE_URL = "https://v3.recurly.com"
|
15
15
|
CA_FILE = File.join(File.dirname(__FILE__), "../data/ca-certificates.crt")
|
16
16
|
BINARY_TYPES = [
|
17
17
|
"application/pdf",
|
@@ -52,12 +52,15 @@ module Recurly
|
|
52
52
|
# client = Recurly::Client.new(api_key: API_KEY2)
|
53
53
|
# sub = client.get_subscription(subscription_id: 'uuid-abcd7890')
|
54
54
|
#
|
55
|
+
# @param base_url [String] The base URL for the API. Defaults to "https://v3.recurly.com"
|
56
|
+
# @param ca_file [String] The CA bundle to use when connecting to the API. Defaults to "data/ca-certificates.crt"
|
55
57
|
# @param api_key [String] The private API key
|
56
58
|
# @param logger [Logger] A logger to use. Defaults to creating a new STDOUT logger with level WARN.
|
57
|
-
def initialize(api_key:, logger: nil)
|
59
|
+
def initialize(base_url: BASE_URL, ca_file: CA_FILE, api_key:, logger: nil)
|
58
60
|
raise ArgumentError, "'api_key' must be set to a non-nil value" if api_key.nil?
|
59
61
|
|
60
62
|
set_api_key(api_key)
|
63
|
+
set_connection_options(base_url, ca_file)
|
61
64
|
|
62
65
|
if logger.nil?
|
63
66
|
@logger = Logger.new(STDOUT).tap do |l|
|
@@ -158,7 +161,7 @@ module Recurly
|
|
158
161
|
end
|
159
162
|
|
160
163
|
def run_request(request, options = {})
|
161
|
-
self.class.connection_pool.with_connection do |http|
|
164
|
+
self.class.connection_pool.with_connection(uri: @base_uri, ca_file: @ca_file) do |http|
|
162
165
|
set_http_options(http, options)
|
163
166
|
|
164
167
|
retries = 0
|
@@ -338,6 +341,11 @@ module Recurly
|
|
338
341
|
@api_key = api_key.to_s
|
339
342
|
end
|
340
343
|
|
344
|
+
def set_connection_options(base_url, ca_file)
|
345
|
+
@base_uri = URI.parse(base_url)
|
346
|
+
@ca_file = ca_file
|
347
|
+
end
|
348
|
+
|
341
349
|
def build_url(path, options)
|
342
350
|
path = scope_by_site(path, options)
|
343
351
|
query_params = map_array_params(options.fetch(:params, {}))
|
@@ -1,36 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "net/https"
|
2
4
|
|
3
5
|
module Recurly
|
4
6
|
class ConnectionPool
|
5
7
|
def initialize
|
6
8
|
@mutex = Mutex.new
|
7
|
-
@pool = []
|
9
|
+
@pool = Hash.new { |h, k| h[k] = [] }
|
8
10
|
end
|
9
11
|
|
10
|
-
def with_connection
|
12
|
+
def with_connection(uri:, ca_file: nil)
|
11
13
|
http = nil
|
12
14
|
@mutex.synchronize do
|
13
|
-
http = @pool.pop
|
15
|
+
http = @pool[[uri.host, uri.port]].pop
|
14
16
|
end
|
15
17
|
|
16
18
|
# create connection if the pool was empty
|
17
|
-
http ||= init_http_connection
|
19
|
+
http ||= init_http_connection(uri, ca_file)
|
18
20
|
|
19
21
|
response = yield http
|
20
22
|
|
21
23
|
if http.started?
|
22
24
|
@mutex.synchronize do
|
23
|
-
@pool.push(http)
|
25
|
+
@pool[[uri.host, uri.port]].push(http)
|
24
26
|
end
|
25
27
|
end
|
26
28
|
|
27
29
|
response
|
28
30
|
end
|
29
31
|
|
30
|
-
def init_http_connection
|
31
|
-
http = Net::HTTP.new(
|
32
|
-
http.use_ssl =
|
33
|
-
http.ca_file =
|
32
|
+
def init_http_connection(uri, ca_file)
|
33
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
34
|
+
http.use_ssl = uri.scheme == "https"
|
35
|
+
http.ca_file = ca_file
|
34
36
|
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
35
37
|
http.keep_alive_timeout = 600
|
36
38
|
|
@@ -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
|
@@ -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] Allows up to 2 decimal places. Required unless `unit_amount_decimal` is provided.
|
15
19
|
define_attribute :unit_amount, Float
|
@@ -6,6 +6,14 @@ module Recurly
|
|
6
6
|
module Requests
|
7
7
|
class BillingInfoCreate < Request
|
8
8
|
|
9
|
+
# @!attribute account_number
|
10
|
+
# @return [String] The bank account number. (ACH, Bacs only)
|
11
|
+
define_attribute :account_number, String
|
12
|
+
|
13
|
+
# @!attribute account_type
|
14
|
+
# @return [String] The bank account type. (ACH only)
|
15
|
+
define_attribute :account_type, String
|
16
|
+
|
9
17
|
# @!attribute address
|
10
18
|
# @return [Address]
|
11
19
|
define_attribute :address, :Address
|
@@ -58,6 +66,10 @@ module Recurly
|
|
58
66
|
# @return [String] Expiration month
|
59
67
|
define_attribute :month, String
|
60
68
|
|
69
|
+
# @!attribute name_on_account
|
70
|
+
# @return [String] The name associated with the bank account (ACH, SEPA, Bacs only)
|
71
|
+
define_attribute :name_on_account, String
|
72
|
+
|
61
73
|
# @!attribute number
|
62
74
|
# @return [String] Credit card number, spaces and dashes are accepted.
|
63
75
|
define_attribute :number, String
|
@@ -70,6 +82,14 @@ module Recurly
|
|
70
82
|
# @return [Boolean] The `primary_payment_method` field is used to designate the primary billing info on the account. The first billing info created on an account will always become primary. Adding additional billing infos provides the flexibility to mark another billing info as primary, or adding additional non-primary billing infos. This can be accomplished by passing the `primary_payment_method` with a value of `true`. When adding billing infos via the billing_info and /accounts endpoints, this value is not permitted, and will return an error if provided.
|
71
83
|
define_attribute :primary_payment_method, :Boolean
|
72
84
|
|
85
|
+
# @!attribute routing_number
|
86
|
+
# @return [String] The bank's rounting number. (ACH only)
|
87
|
+
define_attribute :routing_number, String
|
88
|
+
|
89
|
+
# @!attribute sort_code
|
90
|
+
# @return [String] Bank identifier code for UK based banks. Required for Bacs based billing infos. (Bacs only)
|
91
|
+
define_attribute :sort_code, String
|
92
|
+
|
73
93
|
# @!attribute tax_identifier
|
74
94
|
# @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
95
|
define_attribute :tax_identifier, String
|
@@ -90,6 +110,10 @@ module Recurly
|
|
90
110
|
# @return [String] An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
|
91
111
|
define_attribute :transaction_type, String
|
92
112
|
|
113
|
+
# @!attribute type
|
114
|
+
# @return [String] The payment method type for a non-credit card based billing info. The value of `bacs` is the only accepted value (Bacs only)
|
115
|
+
define_attribute :type, String
|
116
|
+
|
93
117
|
# @!attribute vat_number
|
94
118
|
# @return [String] VAT number
|
95
119
|
define_attribute :vat_number, 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
|
@@ -7,7 +7,7 @@ module Recurly
|
|
7
7
|
class InvoiceCollect < Request
|
8
8
|
|
9
9
|
# @!attribute billing_info_id
|
10
|
-
# @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.
|
10
|
+
# @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.
|
11
11
|
define_attribute :billing_info_id, String
|
12
12
|
|
13
13
|
# @!attribute three_d_secure_action_result_token_id
|
@@ -70,6 +70,10 @@ module Recurly
|
|
70
70
|
# @return [Boolean] `true` exempts tax on charges, `false` applies tax on charges. If not defined, then defaults to the Plan and Site settings. This attribute does not work for credits (negative line items). Credits are always applied post-tax. Pre-tax discounts should use the Coupons feature.
|
71
71
|
define_attribute :tax_exempt, :Boolean
|
72
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
|
+
|
73
77
|
# @!attribute type
|
74
78
|
# @return [String] Line item type. If `item_code`/`item_id` is present then `type` should not be present. If `item_code`/`item_id` is not present then `type` is required.
|
75
79
|
define_attribute :type, String
|
@@ -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
|
@@ -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
|
@@ -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
|
@@ -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
|
@@ -11,7 +11,7 @@ module Recurly
|
|
11
11
|
define_attribute :account, :AccountPurchase
|
12
12
|
|
13
13
|
# @!attribute billing_info_id
|
14
|
-
# @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.
|
14
|
+
# @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.
|
15
15
|
define_attribute :billing_info_id, String
|
16
16
|
|
17
17
|
# @!attribute collection_method
|
@@ -51,9 +51,13 @@ module Recurly
|
|
51
51
|
define_attribute :revenue_schedule_type, String
|
52
52
|
|
53
53
|
# @!attribute shipping
|
54
|
-
# @return [SubscriptionChangeShippingCreate]
|
54
|
+
# @return [SubscriptionChangeShippingCreate] Shipping addresses are tied to a customer's account. Each account can have up to 20 different shipping addresses, and if you have enabled multiple subscriptions per account, you can associate different shipping addresses to each subscription.
|
55
55
|
define_attribute :shipping, :SubscriptionChangeShippingCreate
|
56
56
|
|
57
|
+
# @!attribute tax_inclusive
|
58
|
+
# @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.
|
59
|
+
define_attribute :tax_inclusive, :Boolean
|
60
|
+
|
57
61
|
# @!attribute timeframe
|
58
62
|
# @return [String] The timeframe parameter controls when the upgrade or downgrade takes place. The subscription change can occur now, when the subscription is next billed, or when the subscription term ends. Generally, if you're performing an upgrade, you will want the change to occur immediately (now). If you're performing a downgrade, you should set the timeframe to `term_end` or `bill_date` so the change takes effect at a scheduled billing date. The `renewal` timeframe option is accepted as an alias for `term_end`.
|
59
63
|
define_attribute :timeframe, String
|
@@ -6,6 +6,14 @@ module Recurly
|
|
6
6
|
module Requests
|
7
7
|
class SubscriptionChangeShippingCreate < Request
|
8
8
|
|
9
|
+
# @!attribute address
|
10
|
+
# @return [ShippingAddressCreate]
|
11
|
+
define_attribute :address, :ShippingAddressCreate
|
12
|
+
|
13
|
+
# @!attribute address_id
|
14
|
+
# @return [String] Assign a shipping address from the account's existing shipping addresses. If this and address are both present, address will take precedence.
|
15
|
+
define_attribute :address_id, String
|
16
|
+
|
9
17
|
# @!attribute amount
|
10
18
|
# @return [Float] Assigns the subscription's shipping cost. If this is greater than zero then a `method_id` or `method_code` is required.
|
11
19
|
define_attribute :amount, Float
|
@@ -19,7 +19,7 @@ module Recurly
|
|
19
19
|
define_attribute :auto_renew, :Boolean
|
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 collection_method
|
@@ -86,6 +86,10 @@ module Recurly
|
|
86
86
|
# @return [DateTime] If set, the subscription will begin in the future on this date. The subscription will apply the setup fee and trial period, unless the plan has no trial.
|
87
87
|
define_attribute :starts_at, DateTime
|
88
88
|
|
89
|
+
# @!attribute tax_inclusive
|
90
|
+
# @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.
|
91
|
+
define_attribute :tax_inclusive, :Boolean
|
92
|
+
|
89
93
|
# @!attribute terms_and_conditions
|
90
94
|
# @return [String] This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin. Specify custom notes to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals.
|
91
95
|
define_attribute :terms_and_conditions, String
|
@@ -50,6 +50,10 @@ module Recurly
|
|
50
50
|
# @return [DateTime] If set, the subscription will begin in the future on this date. The subscription will apply the setup fee and trial period, unless the plan has no trial.
|
51
51
|
define_attribute :starts_at, DateTime
|
52
52
|
|
53
|
+
# @!attribute tax_inclusive
|
54
|
+
# @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.
|
55
|
+
define_attribute :tax_inclusive, :Boolean
|
56
|
+
|
53
57
|
# @!attribute total_billing_cycles
|
54
58
|
# @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.
|
55
59
|
define_attribute :total_billing_cycles, Integer
|
@@ -11,7 +11,7 @@ module Recurly
|
|
11
11
|
define_attribute :auto_renew, :Boolean
|
12
12
|
|
13
13
|
# @!attribute billing_info_id
|
14
|
-
# @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.
|
14
|
+
# @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.
|
15
15
|
define_attribute :billing_info_id, String
|
16
16
|
|
17
17
|
# @!attribute collection_method
|
@@ -26,6 +26,10 @@ module Recurly
|
|
26
26
|
# @return [String] Specify custom notes to add or override Customer Notes. Custom notes will stay with a subscription on all renewals.
|
27
27
|
define_attribute :customer_notes, String
|
28
28
|
|
29
|
+
# @!attribute gateway_code
|
30
|
+
# @return [String] If present, this subscription's transactions will use the payment gateway with this code.
|
31
|
+
define_attribute :gateway_code, String
|
32
|
+
|
29
33
|
# @!attribute net_terms
|
30
34
|
# @return [Integer] Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly.
|
31
35
|
define_attribute :net_terms, Integer
|
@@ -54,6 +58,10 @@ module Recurly
|
|
54
58
|
# @return [SubscriptionShippingUpdate] Subscription shipping details
|
55
59
|
define_attribute :shipping, :SubscriptionShippingUpdate
|
56
60
|
|
61
|
+
# @!attribute tax_inclusive
|
62
|
+
# @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.
|
63
|
+
define_attribute :tax_inclusive, :Boolean
|
64
|
+
|
57
65
|
# @!attribute terms_and_conditions
|
58
66
|
# @return [String] Specify custom notes to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals.
|
59
67
|
define_attribute :terms_and_conditions, String
|
@@ -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
|
@@ -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] Allows up to 2 decimal places. Required unless `unit_amount_decimal` is provided.
|
15
19
|
define_attribute :unit_amount, Float
|