recurly 4.11.0 → 4.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/.bumpversion.cfg +1 -1
  3. data/CHANGELOG.md +35 -0
  4. data/GETTING_STARTED.md +9 -1
  5. data/lib/recurly/client/operations.rb +250 -134
  6. data/lib/recurly/client.rb +14 -2
  7. data/lib/recurly/errors/api_errors.rb +2 -0
  8. data/lib/recurly/requests/account_create.rb +5 -1
  9. data/lib/recurly/requests/account_purchase.rb +5 -1
  10. data/lib/recurly/requests/account_update.rb +5 -1
  11. data/lib/recurly/requests/add_on_create.rb +2 -2
  12. data/lib/recurly/requests/billing_info_create.rb +9 -1
  13. data/lib/recurly/requests/line_item_create.rb +2 -2
  14. data/lib/recurly/requests/plan_create.rb +1 -1
  15. data/lib/recurly/requests/plan_update.rb +1 -1
  16. data/lib/recurly/requests/subscription_add_on_tier.rb +1 -1
  17. data/lib/recurly/requests/tier.rb +1 -1
  18. data/lib/recurly/resources/account.rb +5 -1
  19. data/lib/recurly/resources/account_mini.rb +1 -1
  20. data/lib/recurly/resources/add_on.rb +4 -0
  21. data/lib/recurly/resources/invoice.rb +5 -1
  22. data/lib/recurly/resources/invoice_template.rb +34 -0
  23. data/lib/recurly/resources/line_item.rb +3 -3
  24. data/lib/recurly/resources/percentage_tier.rb +18 -0
  25. data/lib/recurly/resources/percentage_tiers_by_currency.rb +18 -0
  26. data/lib/recurly/resources/plan.rb +1 -1
  27. data/lib/recurly/resources/subscription_add_on.rb +4 -0
  28. data/lib/recurly/resources/subscription_add_on_percentage_tier.rb +18 -0
  29. data/lib/recurly/resources/subscription_add_on_tier.rb +1 -1
  30. data/lib/recurly/resources/tier.rb +1 -1
  31. data/lib/recurly/version.rb +1 -1
  32. data/openapi/api.yaml +573 -52
  33. metadata +7 -3
@@ -11,7 +11,11 @@ module Recurly
11
11
  class Client
12
12
  require_relative "./client/operations"
13
13
 
14
- BASE_URL = "https://v3.recurly.com"
14
+ API_HOSTS = {
15
+ us: "https://v3.recurly.com",
16
+ eu: "https://v3.eu.recurly.com",
17
+ }
18
+ REGION = :us
15
19
  CA_FILE = File.join(File.dirname(__FILE__), "../data/ca-certificates.crt")
16
20
  BINARY_TYPES = [
17
21
  "application/pdf",
@@ -52,13 +56,18 @@ module Recurly
52
56
  # client = Recurly::Client.new(api_key: API_KEY2)
53
57
  # sub = client.get_subscription(subscription_id: 'uuid-abcd7890')
54
58
  #
59
+ # @param region [String] The DataCenter that is called by the API. Default to "us"
55
60
  # @param base_url [String] The base URL for the API. Defaults to "https://v3.recurly.com"
56
61
  # @param ca_file [String] The CA bundle to use when connecting to the API. Defaults to "data/ca-certificates.crt"
57
62
  # @param api_key [String] The private API key
58
63
  # @param logger [Logger] A logger to use. Defaults to creating a new STDOUT logger with level WARN.
59
- def initialize(base_url: BASE_URL, ca_file: CA_FILE, api_key:, logger: nil)
64
+ def initialize(region: REGION, base_url: API_HOSTS[:us], ca_file: CA_FILE, api_key:, logger: nil)
60
65
  raise ArgumentError, "'api_key' must be set to a non-nil value" if api_key.nil?
61
66
 
67
+ raise ArgumentError, "Invalid region type. Expected one of: #{API_HOSTS.keys.join(", ")}" if !API_HOSTS.key?(region)
68
+
69
+ base_url = API_HOSTS[region] if base_url == API_HOSTS[:us] && API_HOSTS.key?(region)
70
+
62
71
  set_api_key(api_key)
63
72
  set_connection_options(base_url, ca_file)
64
73
 
@@ -110,7 +119,9 @@ module Recurly
110
119
 
111
120
  def get(path, **options)
112
121
  validate_options!(**options)
122
+
113
123
  request = Net::HTTP::Get.new build_url(path, options)
124
+
114
125
  set_headers(request, options[:headers])
115
126
  http_response = run_request(request, options)
116
127
  handle_response! request, http_response
@@ -168,6 +179,7 @@ module Recurly
168
179
 
169
180
  begin
170
181
  http.start unless http.started?
182
+
171
183
  log_attrs = {
172
184
  method: request.method,
173
185
  path: request.path,
@@ -29,6 +29,8 @@ module Recurly
29
29
 
30
30
  class ServiceNotAvailableError < InternalServerError; end
31
31
 
32
+ class TaxServiceError < InternalServerError; end
33
+
32
34
  class BadGatewayError < ServerError; end
33
35
 
34
36
  class ServiceUnavailableError < ServerError; end
@@ -39,7 +39,7 @@ module Recurly
39
39
  define_attribute :custom_fields, Array, { :item_type => :CustomField }
40
40
 
41
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.
42
+ # @return [String] Unique ID to identify a dunning campaign. 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
43
  define_attribute :dunning_campaign_id, String
44
44
 
45
45
  # @!attribute email
@@ -54,6 +54,10 @@ module Recurly
54
54
  # @return [String]
55
55
  define_attribute :first_name, String
56
56
 
57
+ # @!attribute invoice_template_id
58
+ # @return [String] Unique ID to identify an invoice template. Available when the Invoice Customization feature is enabled. Used to specify which invoice template, if any, should be used to generate invoices for the account.
59
+ define_attribute :invoice_template_id, String
60
+
57
61
  # @!attribute last_name
58
62
  # @return [String]
59
63
  define_attribute :last_name, String
@@ -39,7 +39,7 @@ module Recurly
39
39
  define_attribute :custom_fields, Array, { :item_type => :CustomField }
40
40
 
41
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.
42
+ # @return [String] Unique ID to identify a dunning campaign. 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
43
  define_attribute :dunning_campaign_id, String
44
44
 
45
45
  # @!attribute email
@@ -58,6 +58,10 @@ module Recurly
58
58
  # @return [String] Optional, but if present allows an existing account to be used and updated as part of the purchase.
59
59
  define_attribute :id, String
60
60
 
61
+ # @!attribute invoice_template_id
62
+ # @return [String] Unique ID to identify an invoice template. Available when the Invoice Customization feature is enabled. Used to specify which invoice template, if any, should be used to generate invoices for the account.
63
+ define_attribute :invoice_template_id, String
64
+
61
65
  # @!attribute last_name
62
66
  # @return [String]
63
67
  define_attribute :last_name, String
@@ -31,7 +31,7 @@ module Recurly
31
31
  define_attribute :custom_fields, Array, { :item_type => :CustomField }
32
32
 
33
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.
34
+ # @return [String] Unique ID to identify a dunning campaign. 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
35
  define_attribute :dunning_campaign_id, String
36
36
 
37
37
  # @!attribute email
@@ -46,6 +46,10 @@ module Recurly
46
46
  # @return [String]
47
47
  define_attribute :first_name, String
48
48
 
49
+ # @!attribute invoice_template_id
50
+ # @return [String] Unique ID to identify an invoice template. Available when the Invoice Customization feature is enabled. Used to specify which invoice template, if any, should be used to generate invoices for the account.
51
+ define_attribute :invoice_template_id, String
52
+
49
53
  # @!attribute last_name
50
54
  # @return [String]
51
55
  define_attribute :last_name, String
@@ -39,11 +39,11 @@ module Recurly
39
39
  define_attribute :display_quantity, :Boolean
40
40
 
41
41
  # @!attribute item_code
42
- # @return [String] Unique code to identify an item. Available when the `Credit Invoices` and `Subscription Billing Terms` features are enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
42
+ # @return [String] Unique code to identify an item. Available when the `Credit Invoices` feature are enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
43
43
  define_attribute :item_code, String
44
44
 
45
45
  # @!attribute item_id
46
- # @return [String] System-generated unique identifier for an item. Available when the `Credit Invoices` and `Subscription Billing Terms` features are enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
46
+ # @return [String] System-generated unique identifier for an item. Available when the `Credit Invoices` feature is enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
47
47
  define_attribute :item_id, String
48
48
 
49
49
  # @!attribute measured_unit_id
@@ -34,6 +34,10 @@ module Recurly
34
34
  # @return [String] *STRONGLY RECOMMENDED*
35
35
  define_attribute :cvv, String
36
36
 
37
+ # @!attribute external_hpp_type
38
+ # @return [String] Use for Adyen HPP billing info.
39
+ define_attribute :external_hpp_type, String
40
+
37
41
  # @!attribute first_name
38
42
  # @return [String] First name
39
43
  define_attribute :first_name, String
@@ -74,6 +78,10 @@ module Recurly
74
78
  # @return [String] Credit card number, spaces and dashes are accepted.
75
79
  define_attribute :number, String
76
80
 
81
+ # @!attribute online_banking_payment_type
82
+ # @return [String] Use for Online Banking billing info.
83
+ define_attribute :online_banking_payment_type, String
84
+
77
85
  # @!attribute paypal_billing_agreement_id
78
86
  # @return [String] PayPal billing agreement ID
79
87
  define_attribute :paypal_billing_agreement_id, String
@@ -111,7 +119,7 @@ module Recurly
111
119
  define_attribute :transaction_type, String
112
120
 
113
121
  # @!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)
122
+ # @return [String] The payment method type for a non-credit card based billing info. `bacs` and `becs` are the only accepted values.
115
123
  define_attribute :type, String
116
124
 
117
125
  # @!attribute vat_number
@@ -35,11 +35,11 @@ module Recurly
35
35
  define_attribute :end_date, DateTime
36
36
 
37
37
  # @!attribute item_code
38
- # @return [String] Unique code to identify an item. Available when the Credit Invoices and Subscription Billing Terms features are enabled.
38
+ # @return [String] Unique code to identify an item. Available when the Credit Invoices feature is enabled.
39
39
  define_attribute :item_code, String
40
40
 
41
41
  # @!attribute item_id
42
- # @return [String] System-generated unique identifier for an item. Available when the Credit Invoices and Subscription Billing Terms features are enabled.
42
+ # @return [String] System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled.
43
43
  define_attribute :item_id, String
44
44
 
45
45
  # @!attribute origin
@@ -43,7 +43,7 @@ module Recurly
43
43
  define_attribute :description, String
44
44
 
45
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.
46
+ # @return [String] Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
47
47
  define_attribute :dunning_campaign_id, String
48
48
 
49
49
  # @!attribute hosted_pages
@@ -39,7 +39,7 @@ module Recurly
39
39
  define_attribute :description, String
40
40
 
41
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.
42
+ # @return [String] Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
43
43
  define_attribute :dunning_campaign_id, String
44
44
 
45
45
  # @!attribute hosted_pages
@@ -19,7 +19,7 @@ module Recurly
19
19
  define_attribute :unit_amount_decimal, String
20
20
 
21
21
  # @!attribute usage_percentage
22
- # @return [String] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string. A value between 0.0 and 100.0. Optionally, override tiers' default usage percentage. Required if add-on's `add_on_type` is `usage` and `usage_type` is `percentage`. Must be omitted otherwise.
22
+ # @return [String] This field is deprecated. Do not used it anymore for percentage tiers subscription add ons. Use the percentage_tiers object instead.
23
23
  define_attribute :usage_percentage, String
24
24
  end
25
25
  end
@@ -15,7 +15,7 @@ module Recurly
15
15
  define_attribute :ending_quantity, Integer
16
16
 
17
17
  # @!attribute usage_percentage
18
- # @return [String] Decimal usage percentage.
18
+ # @return [String] This field is deprecated. Do not used it anymore for percentage tiers add ons. Use the percentage_tiers object instead.
19
19
  define_attribute :usage_percentage, String
20
20
  end
21
21
  end
@@ -43,7 +43,7 @@ module Recurly
43
43
  define_attribute :deleted_at, DateTime
44
44
 
45
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.
46
+ # @return [String] Unique ID to identify a dunning campaign. 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
47
  define_attribute :dunning_campaign_id, String
48
48
 
49
49
  # @!attribute email
@@ -90,6 +90,10 @@ module Recurly
90
90
  # @return [String]
91
91
  define_attribute :id, String
92
92
 
93
+ # @!attribute invoice_template_id
94
+ # @return [String] Unique ID to identify an invoice template. Available when the Invoice Customization feature is enabled. Used to specify if a non-default invoice template will be used to generate invoices for the account. For sites without multiple invoice templates enabled, the default template will always be used.
95
+ define_attribute :invoice_template_id, String
96
+
93
97
  # @!attribute last_name
94
98
  # @return [String]
95
99
  define_attribute :last_name, String
@@ -19,7 +19,7 @@ module Recurly
19
19
  define_attribute :company, String
20
20
 
21
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.
22
+ # @return [String] Unique ID to identify a dunning campaign. 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
23
  define_attribute :dunning_campaign_id, String
24
24
 
25
25
  # @!attribute email
@@ -74,6 +74,10 @@ module Recurly
74
74
  # @return [Boolean] Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API.
75
75
  define_attribute :optional, :Boolean
76
76
 
77
+ # @!attribute percentage_tiers
78
+ # @return [Array[PercentageTiersByCurrency]] Percentage Tiers
79
+ define_attribute :percentage_tiers, Array, { :item_type => :PercentageTiersByCurrency }
80
+
77
81
  # @!attribute plan_id
78
82
  # @return [String] Plan ID
79
83
  define_attribute :plan_id, String
@@ -55,7 +55,7 @@ module Recurly
55
55
  define_attribute :due_at, DateTime
56
56
 
57
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.
58
+ # @return [String] Unique ID to identify the dunning campaign used when dunning the invoice. For sites without multiple dunning campaigns enabled, this will always be the default dunning campaign.
59
59
  define_attribute :dunning_campaign_id, String
60
60
 
61
61
  # @!attribute has_more_line_items
@@ -146,6 +146,10 @@ module Recurly
146
146
  # @return [DateTime] Last updated at
147
147
  define_attribute :updated_at, DateTime
148
148
 
149
+ # @!attribute uuid
150
+ # @return [String] Invoice UUID
151
+ define_attribute :uuid, String
152
+
149
153
  # @!attribute vat_number
150
154
  # @return [String] VAT registration number for the customer on this invoice. This will come from the VAT Number field in the Billing Info or the Account Info depending on your tax settings and the invoice collection method.
151
155
  define_attribute :vat_number, String
@@ -0,0 +1,34 @@
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 InvoiceTemplate < Resource
8
+
9
+ # @!attribute code
10
+ # @return [String] Invoice template code.
11
+ define_attribute :code, String
12
+
13
+ # @!attribute created_at
14
+ # @return [DateTime] When the invoice template was created in Recurly.
15
+ define_attribute :created_at, DateTime
16
+
17
+ # @!attribute description
18
+ # @return [String] Invoice template description.
19
+ define_attribute :description, String
20
+
21
+ # @!attribute id
22
+ # @return [String]
23
+ define_attribute :id, String
24
+
25
+ # @!attribute name
26
+ # @return [String] Invoice template name.
27
+ define_attribute :name, String
28
+
29
+ # @!attribute updated_at
30
+ # @return [DateTime] When the invoice template was updated in Recurly.
31
+ define_attribute :updated_at, DateTime
32
+ end
33
+ end
34
+ end
@@ -67,7 +67,7 @@ module Recurly
67
67
  define_attribute :end_date, DateTime
68
68
 
69
69
  # @!attribute external_sku
70
- # @return [String] Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices and Subscription Billing Terms features are enabled.
70
+ # @return [String] Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices feature is enabled.
71
71
  define_attribute :external_sku, String
72
72
 
73
73
  # @!attribute id
@@ -83,11 +83,11 @@ module Recurly
83
83
  define_attribute :invoice_number, String
84
84
 
85
85
  # @!attribute item_code
86
- # @return [String] Unique code to identify an item. Available when the Credit Invoices and Subscription Billing Terms features are enabled.
86
+ # @return [String] Unique code to identify an item. Available when the Credit Invoices feature is enabled.
87
87
  define_attribute :item_code, String
88
88
 
89
89
  # @!attribute item_id
90
- # @return [String] System-generated unique identifier for an item. Available when the Credit Invoices and Subscription Billing Terms features are enabled.
90
+ # @return [String] System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled.
91
91
  define_attribute :item_id, String
92
92
 
93
93
  # @!attribute legacy_category
@@ -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 PercentageTier < Resource
8
+
9
+ # @!attribute ending_amount
10
+ # @return [Float] Ending amount for the tier. Allows up to 2 decimal places. The last tier ending_amount is null.
11
+ define_attribute :ending_amount, Float
12
+
13
+ # @!attribute usage_percentage
14
+ # @return [String] Decimal usage percentage.
15
+ define_attribute :usage_percentage, String
16
+ end
17
+ end
18
+ 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 PercentageTiersByCurrency < Resource
8
+
9
+ # @!attribute currency
10
+ # @return [String] 3-letter ISO 4217 currency code.
11
+ define_attribute :currency, String
12
+
13
+ # @!attribute tiers
14
+ # @return [Array[PercentageTier]] Tiers
15
+ define_attribute :tiers, Array, { :item_type => :PercentageTier }
16
+ end
17
+ end
18
+ end
@@ -47,7 +47,7 @@ module Recurly
47
47
  define_attribute :description, String
48
48
 
49
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.
50
+ # @return [String] Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
51
51
  define_attribute :dunning_campaign_id, String
52
52
 
53
53
  # @!attribute hosted_pages
@@ -30,6 +30,10 @@ module Recurly
30
30
  # @return [String] Object type
31
31
  define_attribute :object, String
32
32
 
33
+ # @!attribute percentage_tiers
34
+ # @return [Array[SubscriptionAddOnPercentageTier]] If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be removed and replaced by the percentage tiers in the request.
35
+ define_attribute :percentage_tiers, Array, { :item_type => :SubscriptionAddOnPercentageTier }
36
+
33
37
  # @!attribute quantity
34
38
  # @return [Integer] Add-on quantity
35
39
  define_attribute :quantity, Integer
@@ -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 SubscriptionAddOnPercentageTier < Resource
8
+
9
+ # @!attribute ending_amount
10
+ # @return [Float] Ending amount
11
+ define_attribute :ending_amount, Float
12
+
13
+ # @!attribute usage_percentage
14
+ # @return [String] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string. A value between 0.0 and 100.0.
15
+ define_attribute :usage_percentage, String
16
+ end
17
+ end
18
+ end
@@ -19,7 +19,7 @@ module Recurly
19
19
  define_attribute :unit_amount_decimal, String
20
20
 
21
21
  # @!attribute usage_percentage
22
- # @return [String] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string. A value between 0.0 and 100.0. Optionally, override tiers' default usage percentage. Required if add-on's `add_on_type` is `usage` and `usage_type` is `percentage`. Must be omitted otherwise.
22
+ # @return [String] This field is deprecated. Do not used it anymore for percentage tiers subscription add ons. Use the percentage_tiers object instead.
23
23
  define_attribute :usage_percentage, String
24
24
  end
25
25
  end
@@ -15,7 +15,7 @@ module Recurly
15
15
  define_attribute :ending_quantity, Integer
16
16
 
17
17
  # @!attribute usage_percentage
18
- # @return [String] Decimal usage percentage.
18
+ # @return [String] This field is deprecated. Do not used it anymore for percentage tiers add ons. Use the percentage_tiers object instead.
19
19
  define_attribute :usage_percentage, String
20
20
  end
21
21
  end
@@ -1,3 +1,3 @@
1
1
  module Recurly
2
- VERSION = "4.11.0"
2
+ VERSION = "4.14.0"
3
3
  end