recurly 3.29.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/.bumpversion.cfg +1 -1
  3. data/.github/workflows/docs.yml +2 -2
  4. data/.github_changelog_generator +8 -0
  5. data/.travis.yml +13 -0
  6. data/CHANGELOG.md +202 -391
  7. data/CONTRIBUTING.md +0 -4
  8. data/GETTING_STARTED.md +20 -17
  9. data/README.md +0 -3
  10. data/lib/data/ca-certificates.crt +40 -0
  11. data/lib/recurly/client/operations.rb +815 -748
  12. data/lib/recurly/client.rb +44 -28
  13. data/lib/recurly/errors/api_errors.rb +33 -1
  14. data/lib/recurly/errors.rb +5 -23
  15. data/lib/recurly/pager.rb +5 -15
  16. data/lib/recurly/requests/{account_acquisition_updatable.rb → account_acquisition_update.rb} +1 -1
  17. data/lib/recurly/requests/account_create.rb +2 -14
  18. data/lib/recurly/requests/account_purchase.rb +2 -14
  19. data/lib/recurly/requests/account_update.rb +0 -12
  20. data/lib/recurly/requests/add_on_create.rb +5 -5
  21. data/lib/recurly/requests/add_on_pricing.rb +5 -5
  22. data/lib/recurly/requests/add_on_update.rb +3 -3
  23. data/lib/recurly/requests/address.rb +1 -13
  24. data/lib/recurly/requests/billing_info_create.rb +4 -52
  25. data/lib/recurly/requests/coupon_create.rb +1 -1
  26. data/lib/recurly/requests/custom_field.rb +0 -8
  27. data/lib/recurly/requests/external_transaction.rb +1 -1
  28. data/lib/recurly/requests/invoice_address.rb +1 -5
  29. data/lib/recurly/requests/invoice_collect.rb +1 -1
  30. data/lib/recurly/requests/invoice_create.rb +1 -9
  31. data/lib/recurly/requests/{invoice_updatable.rb → invoice_update.rb} +1 -1
  32. data/lib/recurly/requests/item_create.rb +1 -1
  33. data/lib/recurly/requests/item_update.rb +1 -1
  34. data/lib/recurly/requests/line_item_create.rb +3 -15
  35. data/lib/recurly/requests/line_item_refund.rb +0 -4
  36. data/lib/recurly/requests/plan_create.rb +1 -17
  37. data/lib/recurly/requests/plan_pricing.rb +1 -5
  38. data/lib/recurly/requests/plan_update.rb +1 -13
  39. data/lib/recurly/requests/pricing.rb +0 -4
  40. data/lib/recurly/requests/purchase_create.rb +1 -9
  41. data/lib/recurly/requests/shipping_address_create.rb +1 -5
  42. data/lib/recurly/requests/shipping_address_update.rb +1 -5
  43. data/lib/recurly/requests/subscription_add_on_create.rb +8 -4
  44. data/lib/recurly/requests/subscription_add_on_tier.rb +5 -1
  45. data/lib/recurly/requests/subscription_add_on_update.rb +6 -2
  46. data/lib/recurly/requests/subscription_change_create.rb +1 -13
  47. data/lib/recurly/requests/subscription_create.rb +6 -26
  48. data/lib/recurly/requests/subscription_pause.rb +1 -1
  49. data/lib/recurly/requests/subscription_purchase.rb +3 -31
  50. data/lib/recurly/requests/subscription_update.rb +1 -13
  51. data/lib/recurly/requests/tier.rb +2 -2
  52. data/lib/recurly/requests/{plan_ramp_pricing.rb → tier_pricing.rb} +6 -2
  53. data/lib/recurly/requests/usage_create.rb +1 -1
  54. data/lib/recurly/resources/account.rb +0 -12
  55. data/lib/recurly/resources/account_balance_amount.rb +0 -8
  56. data/lib/recurly/resources/account_mini.rb +0 -4
  57. data/lib/recurly/resources/add_on.rb +2 -2
  58. data/lib/recurly/resources/add_on_pricing.rb +5 -5
  59. data/lib/recurly/resources/address.rb +1 -13
  60. data/lib/recurly/resources/address_with_name.rb +46 -0
  61. data/lib/recurly/resources/billing_info.rb +1 -5
  62. data/lib/recurly/resources/billing_info_updated_by.rb +1 -1
  63. data/lib/recurly/resources/coupon.rb +5 -17
  64. data/lib/recurly/resources/custom_field.rb +0 -8
  65. data/lib/recurly/resources/custom_field_definition.rb +1 -1
  66. data/lib/recurly/resources/invoice.rb +8 -20
  67. data/lib/recurly/resources/invoice_address.rb +1 -5
  68. data/lib/recurly/resources/item.rb +1 -1
  69. data/lib/recurly/resources/line_item.rb +9 -29
  70. data/lib/recurly/resources/payment_method.rb +0 -12
  71. data/lib/recurly/resources/plan.rb +2 -18
  72. data/lib/recurly/resources/plan_pricing.rb +1 -5
  73. data/lib/recurly/resources/pricing.rb +0 -4
  74. data/lib/recurly/resources/shipping_address.rb +1 -5
  75. data/lib/recurly/resources/subscription.rb +0 -20
  76. data/lib/recurly/resources/subscription_add_on.rb +6 -2
  77. data/lib/recurly/resources/subscription_add_on_tier.rb +5 -1
  78. data/lib/recurly/resources/subscription_change.rb +0 -16
  79. data/lib/recurly/resources/tax_info.rb +3 -7
  80. data/lib/recurly/resources/tier.rb +2 -2
  81. data/lib/recurly/resources/{plan_ramp_pricing.rb → tier_pricing.rb} +6 -2
  82. data/lib/recurly/resources/transaction.rb +3 -7
  83. data/lib/recurly/resources/unique_coupon_code_params.rb +26 -0
  84. data/lib/recurly/resources/usage.rb +6 -2
  85. data/lib/recurly/version.rb +1 -1
  86. data/openapi/api.yaml +2308 -13819
  87. data/scripts/build +2 -2
  88. data/scripts/bump +11 -0
  89. data/scripts/changelog +14 -0
  90. data/scripts/format +2 -2
  91. data/scripts/prepare-release +29 -43
  92. data/scripts/release +20 -5
  93. metadata +14 -33
  94. data/.changelog_config.yaml +0 -11
  95. data/.github/workflows/ci.yml +0 -29
  96. data/.github/workflows/pr-review.yml +0 -27
  97. data/CODE_OF_CONDUCT.md +0 -130
  98. data/lib/recurly/errors/network_errors.rb +0 -10
  99. data/lib/recurly/requests/billing_info_verify.rb +0 -18
  100. data/lib/recurly/requests/billing_info_verify_cvv.rb +0 -26
  101. data/lib/recurly/requests/credit_application_policy.rb +0 -18
  102. data/lib/recurly/requests/dunning_campaigns_bulk_update.rb +0 -18
  103. data/lib/recurly/requests/gateway_attributes.rb +0 -14
  104. data/lib/recurly/requests/plan_ramp_interval.rb +0 -18
  105. data/lib/recurly/requests/subscription_change_billing_info_create.rb +0 -14
  106. data/lib/recurly/requests/subscription_ramp_interval.rb +0 -18
  107. data/lib/recurly/resources/credit_application_policy.rb +0 -18
  108. data/lib/recurly/resources/dunning_campaign.rb +0 -50
  109. data/lib/recurly/resources/dunning_campaigns_bulk_update_response.rb +0 -18
  110. data/lib/recurly/resources/dunning_cycle.rb +0 -58
  111. data/lib/recurly/resources/dunning_interval.rb +0 -18
  112. data/lib/recurly/resources/gateway_attributes.rb +0 -14
  113. data/lib/recurly/resources/line_item_list.rb +0 -26
  114. data/lib/recurly/resources/plan_ramp_interval.rb +0 -18
  115. data/lib/recurly/resources/subscription_change_billing_info.rb +0 -14
  116. data/lib/recurly/resources/subscription_change_preview.rb +0 -90
  117. data/lib/recurly/resources/subscription_ramp_interval_response.rb +0 -30
  118. data/lib/recurly/resources/tax_detail.rb +0 -38
@@ -23,7 +23,7 @@ module Recurly
23
23
  define_attribute :add_on_id, String
24
24
 
25
25
  # @!attribute amount
26
- # @return [Float] `(quantity * unit_amount) - discount + tax`
26
+ # @return [Float] `(quantity * unit_amount) - (discount + tax)`
27
27
  define_attribute :amount, Float
28
28
 
29
29
  # @!attribute avalara_service_type
@@ -34,10 +34,6 @@ module Recurly
34
34
  # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
35
35
  define_attribute :avalara_transaction_type, Integer
36
36
 
37
- # @!attribute bill_for_account_id
38
- # @return [String] The UUID of the account responsible for originating the line item.
39
- define_attribute :bill_for_account_id, String
40
-
41
37
  # @!attribute created_at
42
38
  # @return [DateTime] When the line item was created.
43
39
  define_attribute :created_at, DateTime
@@ -54,10 +50,6 @@ module Recurly
54
50
  # @return [String] 3-letter ISO 4217 currency code.
55
51
  define_attribute :currency, String
56
52
 
57
- # @!attribute custom_fields
58
- # @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.
59
- define_attribute :custom_fields, Array, { :item_type => :CustomField }
60
-
61
53
  # @!attribute description
62
54
  # @return [String] Description that appears on the invoice. For subscription related items this will be filled in automatically.
63
55
  define_attribute :description, String
@@ -71,7 +63,7 @@ module Recurly
71
63
  define_attribute :end_date, DateTime
72
64
 
73
65
  # @!attribute external_sku
74
- # @return [String] Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices feature is enabled.
66
+ # @return [String] Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices and Subscription Billing Terms features are enabled.
75
67
  define_attribute :external_sku, String
76
68
 
77
69
  # @!attribute id
@@ -87,11 +79,11 @@ module Recurly
87
79
  define_attribute :invoice_number, String
88
80
 
89
81
  # @!attribute item_code
90
- # @return [String] Unique code to identify an item. Available when the Credit Invoices feature is enabled.
82
+ # @return [String] Unique code to identify an item. Available when the Credit Invoices and Subscription Billing Terms features are enabled.
91
83
  define_attribute :item_code, String
92
84
 
93
85
  # @!attribute item_id
94
- # @return [String] System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled.
86
+ # @return [String] System-generated unique identifier for an item. Available when the Credit Invoices and Subscription Billing Terms features are enabled.
95
87
  define_attribute :item_id, String
96
88
 
97
89
  # @!attribute legacy_category
@@ -134,10 +126,6 @@ module Recurly
134
126
  # @return [Integer] This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes.
135
127
  define_attribute :quantity, Integer
136
128
 
137
- # @!attribute quantity_decimal
138
- # @return [String] A floating-point alternative to Quantity. If this value is present, it will be used in place of Quantity for calculations, and Quantity will be the rounded integer value of this number. This field supports up to 9 decimal places. The Decimal Quantity feature must be enabled to utilize this field.
139
- define_attribute :quantity_decimal, String
140
-
141
129
  # @!attribute refund
142
130
  # @return [Boolean] Refund?
143
131
  define_attribute :refund, :Boolean
@@ -146,10 +134,6 @@ module Recurly
146
134
  # @return [Integer] For refund charges, the quantity being refunded. For non-refund charges, the total quantity refunded (possibly over multiple refunds).
147
135
  define_attribute :refunded_quantity, Integer
148
136
 
149
- # @!attribute refunded_quantity_decimal
150
- # @return [String] A floating-point alternative to Refunded Quantity. For refund charges, the quantity being refunded. For non-refund charges, the total quantity refunded (possibly over multiple refunds). The Decimal Quantity feature must be enabled to utilize this field.
151
- define_attribute :refunded_quantity_decimal, String
152
-
153
137
  # @!attribute revenue_schedule_type
154
138
  # @return [String] Revenue schedule type
155
139
  define_attribute :revenue_schedule_type, String
@@ -179,17 +163,13 @@ module Recurly
179
163
  define_attribute :tax, Float
180
164
 
181
165
  # @!attribute tax_code
182
- # @return [String] Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.
166
+ # @return [String] Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.
183
167
  define_attribute :tax_code, String
184
168
 
185
169
  # @!attribute tax_exempt
186
170
  # @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.
187
171
  define_attribute :tax_exempt, :Boolean
188
172
 
189
- # @!attribute tax_inclusive
190
- # @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 utilize this flag.
191
- define_attribute :tax_inclusive, :Boolean
192
-
193
173
  # @!attribute tax_info
194
174
  # @return [TaxInfo] Tax info
195
175
  define_attribute :tax_info, :TaxInfo
@@ -206,6 +186,10 @@ module Recurly
206
186
  # @return [Float] Positive amount for a charge, negative amount for a credit.
207
187
  define_attribute :unit_amount, Float
208
188
 
189
+ # @!attribute unit_amount_decimal
190
+ # @return [String] Positive amount for a charge, negative amount for a credit.
191
+ define_attribute :unit_amount_decimal, String
192
+
209
193
  # @!attribute updated_at
210
194
  # @return [DateTime] When the line item was last changed.
211
195
  define_attribute :updated_at, DateTime
@@ -213,10 +197,6 @@ module Recurly
213
197
  # @!attribute uuid
214
198
  # @return [String] The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.
215
199
  define_attribute :uuid, String
216
-
217
- # @!attribute vertex_transaction_type
218
- # @return [String] Used by Vertex for tax calculations. Possible values are sale, rental, lease.
219
- define_attribute :vertex_transaction_type, String
220
200
  end
221
201
  end
222
202
  end
@@ -14,18 +14,10 @@ module Recurly
14
14
  # @return [String] Billing Agreement identifier. Only present for Amazon or Paypal payment methods.
15
15
  define_attribute :billing_agreement_id, String
16
16
 
17
- # @!attribute card_network_preference
18
- # @return [String] Represents the card network preference associated with the billing info for dual badged cards. Must be a supported card network.
19
- define_attribute :card_network_preference, String
20
-
21
17
  # @!attribute card_type
22
18
  # @return [String] Visa, MasterCard, American Express, Discover, JCB, etc.
23
19
  define_attribute :card_type, String
24
20
 
25
- # @!attribute cc_bin_country
26
- # @return [String] The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled.
27
- define_attribute :cc_bin_country, String
28
-
29
21
  # @!attribute exp_month
30
22
  # @return [Integer] Expiration month.
31
23
  define_attribute :exp_month, Integer
@@ -38,10 +30,6 @@ module Recurly
38
30
  # @return [String] Credit card number's first six digits.
39
31
  define_attribute :first_six, String
40
32
 
41
- # @!attribute gateway_attributes
42
- # @return [GatewayAttributes] Gateway specific attributes associated with this PaymentMethod
43
- define_attribute :gateway_attributes, :GatewayAttributes
44
-
45
33
  # @!attribute gateway_code
46
34
  # @return [String] An identifier for a specific payment gateway.
47
35
  define_attribute :gateway_code, String
@@ -38,10 +38,6 @@ module Recurly
38
38
  # @return [Array[PlanPricing]] Pricing
39
39
  define_attribute :currencies, Array, { :item_type => :PlanPricing }
40
40
 
41
- # @!attribute custom_fields
42
- # @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.
43
- define_attribute :custom_fields, Array, { :item_type => :CustomField }
44
-
45
41
  # @!attribute deleted_at
46
42
  # @return [DateTime] Deleted at
47
43
  define_attribute :deleted_at, DateTime
@@ -50,10 +46,6 @@ module Recurly
50
46
  # @return [String] Optional description, not displayed.
51
47
  define_attribute :description, String
52
48
 
53
- # @!attribute dunning_campaign_id
54
- # @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.
55
- define_attribute :dunning_campaign_id, String
56
-
57
49
  # @!attribute hosted_pages
58
50
  # @return [PlanHostedPages] Hosted pages settings
59
51
  define_attribute :hosted_pages, :PlanHostedPages
@@ -78,14 +70,6 @@ module Recurly
78
70
  # @return [String] Object type
79
71
  define_attribute :object, String
80
72
 
81
- # @!attribute pricing_model
82
- # @return [String] A fixed pricing model has the same price for each billing period. A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing periods. The price change could be an increase or decrease.
83
- define_attribute :pricing_model, String
84
-
85
- # @!attribute ramp_intervals
86
- # @return [Array[PlanRampInterval]] Ramp Intervals
87
- define_attribute :ramp_intervals, Array, { :item_type => :PlanRampInterval }
88
-
89
73
  # @!attribute revenue_schedule_type
90
74
  # @return [String] Revenue schedule type
91
75
  define_attribute :revenue_schedule_type, String
@@ -103,7 +87,7 @@ module Recurly
103
87
  define_attribute :state, String
104
88
 
105
89
  # @!attribute tax_code
106
- # @return [String] Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.
90
+ # @return [String] Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.
107
91
  define_attribute :tax_code, String
108
92
 
109
93
  # @!attribute tax_exempt
@@ -119,7 +103,7 @@ module Recurly
119
103
  define_attribute :trial_length, Integer
120
104
 
121
105
  # @!attribute trial_requires_billing_info
122
- # @return [Boolean] Allow free trial subscriptions to be created without billing info.
106
+ # @return [Boolean] Allow free trial subscriptions to be created without billing info. Should not be used if billing info is needed for initial invoice due to existing uninvoiced charges or setup fee.
123
107
  define_attribute :trial_requires_billing_info, :Boolean
124
108
 
125
109
  # @!attribute trial_unit
@@ -14,12 +14,8 @@ 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] This field is deprecated. Please do not use it.
19
- define_attribute :tax_inclusive, :Boolean
20
-
21
17
  # @!attribute unit_amount
22
- # @return [Float] This field should not be sent when the pricing model is 'ramp'.
18
+ # @return [Float] Unit price
23
19
  define_attribute :unit_amount, Float
24
20
  end
25
21
  end
@@ -10,10 +10,6 @@ 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] This field is deprecated. Please do not use it.
15
- define_attribute :tax_inclusive, :Boolean
16
-
17
13
  # @!attribute unit_amount
18
14
  # @return [Float] Unit price
19
15
  define_attribute :unit_amount, Float
@@ -19,7 +19,7 @@ module Recurly
19
19
  define_attribute :company, String
20
20
 
21
21
  # @!attribute country
22
- # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
22
+ # @return [String] Country, 2-letter ISO code.
23
23
  define_attribute :country, String
24
24
 
25
25
  # @!attribute created_at
@@ -34,10 +34,6 @@ module Recurly
34
34
  # @return [String]
35
35
  define_attribute :first_name, String
36
36
 
37
- # @!attribute geo_code
38
- # @return [String] Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.
39
- define_attribute :geo_code, String
40
-
41
37
  # @!attribute id
42
38
  # @return [String] Shipping Address ID
43
39
  define_attribute :id, String
@@ -14,10 +14,6 @@ module Recurly
14
14
  # @return [DateTime] Activated at
15
15
  define_attribute :activated_at, DateTime
16
16
 
17
- # @!attribute active_invoice_id
18
- # @return [String] The invoice ID of the latest invoice created for an active subscription.
19
- define_attribute :active_invoice_id, String
20
-
21
17
  # @!attribute add_ons
22
18
  # @return [Array[SubscriptionAddOn]] Add-ons
23
19
  define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOn }
@@ -54,10 +50,6 @@ module Recurly
54
50
  # @return [DateTime] Created at
55
51
  define_attribute :created_at, DateTime
56
52
 
57
- # @!attribute credit_application_policy
58
- # @return [CreditApplicationPolicy] Controls whether credit invoices are automatically applied to new invoices. The `mode` field determines the application behavior. When mode is `all`, the optional `allowed_origins` array can restrict which credit invoice origins are applied. - `all`: All available credit invoices are applied (default) - `none`: No credit invoices are applied automatically
59
- define_attribute :credit_application_policy, :CreditApplicationPolicy
60
-
61
53
  # @!attribute currency
62
54
  # @return [String] 3-letter ISO 4217 currency code.
63
55
  define_attribute :currency, String
@@ -126,10 +118,6 @@ module Recurly
126
118
  # @return [Integer] Subscription quantity
127
119
  define_attribute :quantity, Integer
128
120
 
129
- # @!attribute ramp_intervals
130
- # @return [Array[SubscriptionRampIntervalResponse]] The ramp intervals representing the pricing schedule for the subscription.
131
- define_attribute :ramp_intervals, Array, { :item_type => :SubscriptionRampIntervalResponse }
132
-
133
121
  # @!attribute remaining_billing_cycles
134
122
  # @return [Integer] The remaining billing cycles in the current term.
135
123
  define_attribute :remaining_billing_cycles, Integer
@@ -142,10 +130,6 @@ module Recurly
142
130
  # @return [Integer] If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`.
143
131
  define_attribute :renewal_billing_cycles, Integer
144
132
 
145
- # @!attribute resume_at
146
- # @return [DateTime] The date the subscription billing resumes following a pause. Null unless the subscription is paused or scheduled to be paused.
147
- define_attribute :resume_at, DateTime
148
-
149
133
  # @!attribute revenue_schedule_type
150
134
  # @return [String] Revenue schedule type
151
135
  define_attribute :revenue_schedule_type, String
@@ -162,10 +146,6 @@ module Recurly
162
146
  # @return [Float] Estimated total, before tax.
163
147
  define_attribute :subtotal, Float
164
148
 
165
- # @!attribute tax_inclusive
166
- # @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 utilize this flag.
167
- define_attribute :tax_inclusive, :Boolean
168
-
169
149
  # @!attribute terms_and_conditions
170
150
  # @return [String] Terms and conditions
171
151
  define_attribute :terms_and_conditions, String
@@ -43,7 +43,7 @@ module Recurly
43
43
  define_attribute :subscription_id, String
44
44
 
45
45
  # @!attribute tier_type
46
- # @return [String] The type of tiering used by the Add-on.
46
+ # @return [String] The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://developers.recurly.com/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.
47
47
  define_attribute :tier_type, String
48
48
 
49
49
  # @!attribute tiers
@@ -51,9 +51,13 @@ module Recurly
51
51
  define_attribute :tiers, Array, { :item_type => :SubscriptionAddOnTier }
52
52
 
53
53
  # @!attribute unit_amount
54
- # @return [Float] This is priced in the subscription's currency.
54
+ # @return [Float] Supports up to 2 decimal places.
55
55
  define_attribute :unit_amount, Float
56
56
 
57
+ # @!attribute unit_amount_decimal
58
+ # @return [String] Supports up to 9 decimal places.
59
+ define_attribute :unit_amount_decimal, String
60
+
57
61
  # @!attribute updated_at
58
62
  # @return [DateTime] Updated at
59
63
  define_attribute :updated_at, DateTime
@@ -11,8 +11,12 @@ module Recurly
11
11
  define_attribute :ending_quantity, Integer
12
12
 
13
13
  # @!attribute unit_amount
14
- # @return [Float] Unit amount
14
+ # @return [Float] Allows up to 2 decimal places. Optionally, override the tiers' default unit amount.
15
15
  define_attribute :unit_amount, Float
16
+
17
+ # @!attribute unit_amount_decimal
18
+ # @return [String] Allows up to 9 decimal places. Optionally, override tiers' default unit amount. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
19
+ define_attribute :unit_amount_decimal, String
16
20
  end
17
21
  end
18
22
  end
@@ -18,10 +18,6 @@ module Recurly
18
18
  # @return [Array[SubscriptionAddOn]] These add-ons will be used when the subscription renews.
19
19
  define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOn }
20
20
 
21
- # @!attribute billing_info
22
- # @return [SubscriptionChangeBillingInfo] Accept nested attributes for three_d_secure_action_result_token_id
23
- define_attribute :billing_info, :SubscriptionChangeBillingInfo
24
-
25
21
  # @!attribute created_at
26
22
  # @return [DateTime] Created at
27
23
  define_attribute :created_at, DateTime
@@ -54,18 +50,10 @@ module Recurly
54
50
  # @return [Integer] Subscription quantity
55
51
  define_attribute :quantity, Integer
56
52
 
57
- # @!attribute ramp_intervals
58
- # @return [Array[SubscriptionRampIntervalResponse]] The ramp intervals representing the pricing schedule for the subscription.
59
- define_attribute :ramp_intervals, Array, { :item_type => :SubscriptionRampIntervalResponse }
60
-
61
53
  # @!attribute revenue_schedule_type
62
54
  # @return [String] Revenue schedule type
63
55
  define_attribute :revenue_schedule_type, String
64
56
 
65
- # @!attribute setup_fee_revenue_schedule_type
66
- # @return [String] Setup fee revenue schedule type
67
- define_attribute :setup_fee_revenue_schedule_type, String
68
-
69
57
  # @!attribute shipping
70
58
  # @return [SubscriptionShipping] Subscription shipping details
71
59
  define_attribute :shipping, :SubscriptionShipping
@@ -74,10 +62,6 @@ module Recurly
74
62
  # @return [String] The ID of the subscription that is going to be changed.
75
63
  define_attribute :subscription_id, String
76
64
 
77
- # @!attribute tax_inclusive
78
- # @return [Boolean] This field is deprecated. Please do not use it.
79
- define_attribute :tax_inclusive, :Boolean
80
-
81
65
  # @!attribute unit_amount
82
66
  # @return [Float] Unit amount
83
67
  define_attribute :unit_amount, Float
@@ -7,19 +7,15 @@ module Recurly
7
7
  class TaxInfo < Resource
8
8
 
9
9
  # @!attribute rate
10
- # @return [Float] The combined tax rate. Not present when Avalara for Communications is enabled.
10
+ # @return [Float] Rate
11
11
  define_attribute :rate, Float
12
12
 
13
13
  # @!attribute region
14
- # @return [String] Provides the tax region applied on an invoice. For U.S. Sales Tax, this will be the 2 letter state code. For EU VAT this will be the 2 letter country code. For all country level tax types, this will display the regional tax, like VAT, GST, or PST. Not present when Avalara for Communications is enabled.
14
+ # @return [String] Provides the tax region applied on an invoice. For U.S. Sales Tax, this will be the 2 letter state code. For EU VAT this will be the 2 letter country code. For all country level tax types, this will display the regional tax, like VAT, GST, or PST.
15
15
  define_attribute :region, String
16
16
 
17
- # @!attribute tax_details
18
- # @return [Array[TaxDetail]] Provides additional tax details for Communications taxes when Avalara for Communications or Vertex Tax Breakdown is enabled or Canadian Sales Tax. Tax details will only be populated for the Invoice response when fetching a single invoice and not for the InvoiceList or LineItemList. Only populated for a single LineItem fetch when Avalara for Communications is enabled.
19
- define_attribute :tax_details, Array, { :item_type => :TaxDetail }
20
-
21
17
  # @!attribute type
22
- # @return [String] Provides the tax type as "vat" for EU VAT, "usst" for U.S. Sales Tax, or the 2 letter country code for country level tax types like Canada, Australia, New Zealand, Israel, and all non-EU European countries. Not present when Avalara for Communications is enabled.
18
+ # @return [String] Provides the tax type as "vat" for EU VAT, "usst" for U.S. Sales Tax, or the 2 letter country code for country level tax types like Canada, Australia, New Zealand, Israel, and all non-EU European countries.
23
19
  define_attribute :type, String
24
20
  end
25
21
  end
@@ -7,8 +7,8 @@ module Recurly
7
7
  class Tier < Resource
8
8
 
9
9
  # @!attribute currencies
10
- # @return [Array[Pricing]] Tier pricing
11
- define_attribute :currencies, Array, { :item_type => :Pricing }
10
+ # @return [Array[TierPricing]] Tier pricing
11
+ define_attribute :currencies, Array, { :item_type => :TierPricing }
12
12
 
13
13
  # @!attribute ending_quantity
14
14
  # @return [Integer] Ending quantity
@@ -4,15 +4,19 @@
4
4
  # need and we will usher them to the appropriate places.
5
5
  module Recurly
6
6
  module Resources
7
- class PlanRampPricing < Resource
7
+ class TierPricing < Resource
8
8
 
9
9
  # @!attribute currency
10
10
  # @return [String] 3-letter ISO 4217 currency code.
11
11
  define_attribute :currency, String
12
12
 
13
13
  # @!attribute unit_amount
14
- # @return [Float] Represents the price for the Ramp Interval.
14
+ # @return [Float] Allows up to 2 decimal places. Required unless `unit_amount_decimal` is provided.
15
15
  define_attribute :unit_amount, Float
16
+
17
+ # @!attribute unit_amount_decimal
18
+ # @return [String] Allows up to 9 decimal places. Only supported when `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
19
+ define_attribute :unit_amount_decimal, String
16
20
  end
17
21
  end
18
22
  end
@@ -18,13 +18,9 @@ module Recurly
18
18
  # @return [String] When processed, result from checking the overall AVS on the transaction.
19
19
  define_attribute :avs_check, String
20
20
 
21
- # @!attribute backup_payment_method_used
22
- # @return [Boolean] Indicates if the transaction was completed using a backup payment
23
- define_attribute :backup_payment_method_used, :Boolean
24
-
25
21
  # @!attribute billing_address
26
- # @return [Address]
27
- define_attribute :billing_address, :Address
22
+ # @return [AddressWithName]
23
+ define_attribute :billing_address, :AddressWithName
28
24
 
29
25
  # @!attribute collected_at
30
26
  # @return [DateTime] Collected at, or if not collected yet, the time the transaction was created.
@@ -87,7 +83,7 @@ module Recurly
87
83
  define_attribute :invoice, :InvoiceMini
88
84
 
89
85
  # @!attribute ip_address_country
90
- # @return [String] Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known by Recurly.
86
+ # @return [String] IP address's country
91
87
  define_attribute :ip_address_country, String
92
88
 
93
89
  # @!attribute ip_address_v4
@@ -0,0 +1,26 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Resources
7
+ class UniqueCouponCodeParams < Resource
8
+
9
+ # @!attribute begin_time
10
+ # @return [DateTime] The date-time to be included when listing UniqueCouponCodes
11
+ define_attribute :begin_time, DateTime
12
+
13
+ # @!attribute limit
14
+ # @return [Integer] The number of UniqueCouponCodes that will be generated
15
+ define_attribute :limit, Integer
16
+
17
+ # @!attribute order
18
+ # @return [String] Sort order to list newly generated UniqueCouponCodes (should always be `asc`)
19
+ define_attribute :order, String
20
+
21
+ # @!attribute sort
22
+ # @return [String] Sort field to list newly generated UniqueCouponCodes (should always be `created_at`)
23
+ define_attribute :sort, String
24
+ end
25
+ end
26
+ end
@@ -7,7 +7,7 @@ module Recurly
7
7
  class Usage < Resource
8
8
 
9
9
  # @!attribute amount
10
- # @return [Float] The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places. Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is "500").
10
+ # @return [Float] The amount of usage. Can be positive, negative, or 0. No decimals allowed, we will strip them. If the usage-based add-on is billed with a percentage, your usage will be a monetary amount you will want to format in cents. (e.g., $5.00 is "500").
11
11
  define_attribute :amount, Float
12
12
 
13
13
  # @!attribute billed_at
@@ -39,7 +39,7 @@ module Recurly
39
39
  define_attribute :recording_timestamp, DateTime
40
40
 
41
41
  # @!attribute tier_type
42
- # @return [String] The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based).
42
+ # @return [String] The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://developers.recurly.com/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.
43
43
  define_attribute :tier_type, String
44
44
 
45
45
  # @!attribute tiers
@@ -50,6 +50,10 @@ module Recurly
50
50
  # @return [Float] Unit price
51
51
  define_attribute :unit_amount, Float
52
52
 
53
+ # @!attribute unit_amount_decimal
54
+ # @return [String] Unit price that can optionally support a sub-cent value.
55
+ define_attribute :unit_amount_decimal, String
56
+
53
57
  # @!attribute updated_at
54
58
  # @return [DateTime] When the usage record was billed on an invoice.
55
59
  define_attribute :updated_at, DateTime
@@ -1,3 +1,3 @@
1
1
  module Recurly
2
- VERSION = "3.29.1"
2
+ VERSION = "4.0.0"
3
3
  end