recurly 3.28.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/.bumpversion.cfg +1 -1
  3. data/.github/workflows/docs.yml +1 -1
  4. data/.github_changelog_generator +8 -0
  5. data/.travis.yml +13 -0
  6. data/CHANGELOG.md +202 -369
  7. data/CONTRIBUTING.md +0 -4
  8. data/GETTING_STARTED.md +20 -17
  9. data/README.md +0 -3
  10. data/lib/recurly/client/operations.rb +778 -659
  11. data/lib/recurly/client.rb +44 -28
  12. data/lib/recurly/errors/api_errors.rb +3 -2
  13. data/lib/recurly/errors.rb +5 -23
  14. data/lib/recurly/pager.rb +5 -15
  15. data/lib/recurly/requests/{account_acquisition_updatable.rb → account_acquisition_update.rb} +1 -1
  16. data/lib/recurly/requests/account_create.rb +2 -10
  17. data/lib/recurly/requests/account_purchase.rb +2 -10
  18. data/lib/recurly/requests/account_update.rb +0 -8
  19. data/lib/recurly/requests/add_on_create.rb +4 -4
  20. data/lib/recurly/requests/add_on_pricing.rb +5 -5
  21. data/lib/recurly/requests/add_on_update.rb +2 -2
  22. data/lib/recurly/requests/address.rb +1 -9
  23. data/lib/recurly/requests/billing_info_create.rb +3 -39
  24. data/lib/recurly/requests/coupon_create.rb +1 -1
  25. data/lib/recurly/requests/external_transaction.rb +1 -1
  26. data/lib/recurly/requests/invoice_address.rb +1 -1
  27. data/lib/recurly/requests/invoice_collect.rb +1 -1
  28. data/lib/recurly/requests/{invoice_updatable.rb → invoice_update.rb} +1 -1
  29. data/lib/recurly/requests/line_item_create.rb +2 -10
  30. data/lib/recurly/requests/line_item_refund.rb +0 -4
  31. data/lib/recurly/requests/plan_create.rb +0 -16
  32. data/lib/recurly/requests/plan_pricing.rb +1 -5
  33. data/lib/recurly/requests/plan_update.rb +0 -12
  34. data/lib/recurly/requests/pricing.rb +0 -4
  35. data/lib/recurly/requests/purchase_create.rb +1 -1
  36. data/lib/recurly/requests/shipping_address_create.rb +1 -1
  37. data/lib/recurly/requests/shipping_address_update.rb +1 -1
  38. data/lib/recurly/requests/subscription_add_on_create.rb +8 -4
  39. data/lib/recurly/requests/subscription_add_on_tier.rb +5 -1
  40. data/lib/recurly/requests/subscription_add_on_update.rb +6 -2
  41. data/lib/recurly/requests/subscription_change_create.rb +1 -13
  42. data/lib/recurly/requests/subscription_create.rb +5 -13
  43. data/lib/recurly/requests/subscription_pause.rb +1 -1
  44. data/lib/recurly/requests/subscription_purchase.rb +2 -10
  45. data/lib/recurly/requests/subscription_update.rb +1 -5
  46. data/lib/recurly/requests/tier.rb +2 -2
  47. data/lib/recurly/requests/{plan_ramp_pricing.rb → tier_pricing.rb} +6 -2
  48. data/lib/recurly/requests/usage_create.rb +1 -1
  49. data/lib/recurly/resources/account.rb +0 -8
  50. data/lib/recurly/resources/account_balance_amount.rb +0 -8
  51. data/lib/recurly/resources/account_mini.rb +0 -4
  52. data/lib/recurly/resources/add_on.rb +1 -1
  53. data/lib/recurly/resources/add_on_pricing.rb +5 -5
  54. data/lib/recurly/resources/address.rb +1 -9
  55. data/lib/recurly/resources/address_with_name.rb +46 -0
  56. data/lib/recurly/resources/billing_info.rb +1 -5
  57. data/lib/recurly/resources/billing_info_updated_by.rb +1 -1
  58. data/lib/recurly/resources/coupon.rb +5 -17
  59. data/lib/recurly/resources/custom_field_definition.rb +1 -1
  60. data/lib/recurly/resources/invoice.rb +8 -12
  61. data/lib/recurly/resources/invoice_address.rb +1 -1
  62. data/lib/recurly/resources/line_item.rb +7 -23
  63. data/lib/recurly/resources/payment_method.rb +0 -8
  64. data/lib/recurly/resources/plan.rb +1 -17
  65. data/lib/recurly/resources/plan_pricing.rb +1 -5
  66. data/lib/recurly/resources/pricing.rb +0 -4
  67. data/lib/recurly/resources/shipping_address.rb +1 -1
  68. data/lib/recurly/resources/subscription.rb +0 -12
  69. data/lib/recurly/resources/subscription_add_on.rb +6 -2
  70. data/lib/recurly/resources/subscription_add_on_tier.rb +5 -1
  71. data/lib/recurly/resources/subscription_change.rb +0 -16
  72. data/lib/recurly/resources/tax_info.rb +3 -7
  73. data/lib/recurly/resources/tier.rb +2 -2
  74. data/lib/recurly/resources/{plan_ramp_pricing.rb → tier_pricing.rb} +6 -2
  75. data/lib/recurly/resources/transaction.rb +3 -7
  76. data/lib/recurly/resources/unique_coupon_code_params.rb +26 -0
  77. data/lib/recurly/resources/usage.rb +6 -2
  78. data/lib/recurly/version.rb +1 -1
  79. data/openapi/api.yaml +2030 -3058
  80. data/scripts/build +2 -2
  81. data/scripts/bump +11 -0
  82. data/scripts/changelog +14 -0
  83. data/scripts/format +2 -2
  84. data/scripts/prepare-release +29 -43
  85. data/scripts/release +20 -5
  86. metadata +16 -31
  87. data/.changelog_config.yaml +0 -11
  88. data/.github/workflows/ci.yml +0 -29
  89. data/CODE_OF_CONDUCT.md +0 -130
  90. data/lib/recurly/errors/network_errors.rb +0 -10
  91. data/lib/recurly/requests/billing_info_verify.rb +0 -14
  92. data/lib/recurly/requests/dunning_campaigns_bulk_update.rb +0 -18
  93. data/lib/recurly/requests/gateway_attributes.rb +0 -14
  94. data/lib/recurly/requests/plan_ramp_interval.rb +0 -18
  95. data/lib/recurly/requests/subscription_change_billing_info_create.rb +0 -14
  96. data/lib/recurly/requests/subscription_ramp_interval.rb +0 -18
  97. data/lib/recurly/resources/dunning_campaign.rb +0 -50
  98. data/lib/recurly/resources/dunning_campaigns_bulk_update_response.rb +0 -18
  99. data/lib/recurly/resources/dunning_cycle.rb +0 -58
  100. data/lib/recurly/resources/dunning_interval.rb +0 -18
  101. data/lib/recurly/resources/gateway_attributes.rb +0 -14
  102. data/lib/recurly/resources/line_item_list.rb +0 -26
  103. data/lib/recurly/resources/plan_ramp_interval.rb +0 -18
  104. data/lib/recurly/resources/subscription_change_billing_info.rb +0 -14
  105. data/lib/recurly/resources/subscription_change_preview.rb +0 -90
  106. data/lib/recurly/resources/subscription_ramp_interval_response.rb +0 -22
  107. data/lib/recurly/resources/tax_detail.rb +0 -38
@@ -7,7 +7,7 @@ module Recurly
7
7
  class BillingInfoUpdatedBy < Resource
8
8
 
9
9
  # @!attribute country
10
- # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code matching the origin IP address, if known by Recurly.
10
+ # @return [String] Country of IP address, if known by Recurly.
11
11
  define_attribute :country, String
12
12
 
13
13
  # @!attribute ip
@@ -11,21 +11,13 @@ module Recurly
11
11
  define_attribute :applies_to_all_items, :Boolean
12
12
 
13
13
  # @!attribute applies_to_all_plans
14
- # @return [Boolean] The coupon is valid for all plans if true. If false then `plans` and `plans_names` will list the applicable plans.
14
+ # @return [Boolean] The coupon is valid for all plans if true. If false then `plans` will list the applicable plans.
15
15
  define_attribute :applies_to_all_plans, :Boolean
16
16
 
17
17
  # @!attribute applies_to_non_plan_charges
18
18
  # @return [Boolean] The coupon is valid for one-time, non-plan charges if true.
19
19
  define_attribute :applies_to_non_plan_charges, :Boolean
20
20
 
21
- # @!attribute bulk_coupon_code
22
- # @return [String] The Coupon code of the parent Bulk Coupon
23
- define_attribute :bulk_coupon_code, String
24
-
25
- # @!attribute bulk_coupon_id
26
- # @return [String] The Coupon ID of the parent Bulk Coupon
27
- define_attribute :bulk_coupon_id, String
28
-
29
21
  # @!attribute code
30
22
  # @return [String] The code the customer enters to redeem the coupon.
31
23
  define_attribute :code, String
@@ -94,18 +86,10 @@ module Recurly
94
86
  # @return [Array[PlanMini]] A list of plans for which this coupon applies. This will be `null` if `applies_to_all_plans=true`.
95
87
  define_attribute :plans, Array, { :item_type => :PlanMini }
96
88
 
97
- # @!attribute plans_names
98
- # @return [Array[String]] A list of plan names for which this coupon applies.
99
- define_attribute :plans_names, Array, { :item_type => String }
100
-
101
89
  # @!attribute redeem_by
102
90
  # @return [DateTime] The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time.
103
91
  define_attribute :redeem_by, DateTime
104
92
 
105
- # @!attribute redeemed_at
106
- # @return [DateTime] The date and time the unique coupon code was redeemed. This is only present for bulk coupons.
107
- define_attribute :redeemed_at, DateTime
108
-
109
93
  # @!attribute redemption_resource
110
94
  # @return [String] Whether the discount is for all eligible charges on the account, or only a specific subscription.
111
95
  define_attribute :redemption_resource, String
@@ -126,6 +110,10 @@ module Recurly
126
110
  # @return [String] On a bulk coupon, the template from which unique coupon codes are generated.
127
111
  define_attribute :unique_code_template, String
128
112
 
113
+ # @!attribute unique_coupon_code
114
+ # @return [Hash] Will be populated when the Coupon being returned is a `UniqueCouponCode`.
115
+ define_attribute :unique_coupon_code, Hash
116
+
129
117
  # @!attribute unique_coupon_codes_count
130
118
  # @return [Integer] When this number reaches `max_redemptions` the coupon will no longer be redeemable.
131
119
  define_attribute :unique_coupon_codes_count, Integer
@@ -43,7 +43,7 @@ module Recurly
43
43
  define_attribute :updated_at, DateTime
44
44
 
45
45
  # @!attribute user_access
46
- # @return [String] The access control applied inside Recurly's admin UI: - `api_only` - No one will be able to view or edit this field's data via the admin UI. - `read_only` - Users with the Customers role will be able to view this field's data via the admin UI, but editing will only be available via the API. - `write` - Users with the Customers role will be able to view and edit this field's data via the admin UI. - `set_only` - Users with the Customers role will be able to set this field's data via the admin console.
46
+ # @return [String] The access control applied inside Recurly's admin UI: - `api_only` - No one will be able to view or edit this field's data via the admin UI. - `read_only` - Users with the Customers role will be able to view this field's data via the admin UI, but editing will only be available via the API. - `write` - Users with the Customers role will be able to view and edit this field's data via the admin UI.
47
47
  define_attribute :user_access, String
48
48
  end
49
49
  end
@@ -19,7 +19,7 @@ module Recurly
19
19
  define_attribute :balance, Float
20
20
 
21
21
  # @!attribute billing_info_id
22
- # @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature.
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.
23
23
  define_attribute :billing_info_id, String
24
24
 
25
25
  # @!attribute closed_at
@@ -54,17 +54,17 @@ module Recurly
54
54
  # @return [DateTime] Date invoice is due. This is the date the net terms are reached.
55
55
  define_attribute :due_at, DateTime
56
56
 
57
- # @!attribute dunning_campaign_id
58
- # @return [String] Unique ID to identify the dunning campaign used when dunning the invoice. For sites without multiple dunning campaigns enabled, this will always be the default dunning campaign.
59
- define_attribute :dunning_campaign_id, String
57
+ # @!attribute has_more_line_items
58
+ # @return [Boolean] Identifies if the invoice has more line items than are returned in `line_items`. If `has_more_line_items` is `true`, then a request needs to be made to the `list_invoice_line_items` endpoint.
59
+ define_attribute :has_more_line_items, :Boolean
60
60
 
61
61
  # @!attribute id
62
62
  # @return [String] Invoice ID
63
63
  define_attribute :id, String
64
64
 
65
65
  # @!attribute line_items
66
- # @return [LineItemList]
67
- define_attribute :line_items, :LineItemList
66
+ # @return [Array[LineItem]] Line Items
67
+ define_attribute :line_items, Array, { :item_type => :LineItem }
68
68
 
69
69
  # @!attribute net_terms
70
70
  # @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.
@@ -91,7 +91,7 @@ module Recurly
91
91
  define_attribute :po_number, String
92
92
 
93
93
  # @!attribute previous_invoice_id
94
- # @return [String] On refund invoices, this value will exist and show the invoice ID of the purchase invoice the refund was created from. This field is only populated for sites without the [Only Bill What Changed](https://docs.recurly.com/docs/only-bill-what-changed) feature enabled. Sites with Only Bill What Changed enabled should use the [related_invoices endpoint](https://recurly.com/developers/api/v2019-10-10/index.html#operation/list_related_invoices) to see purchase invoices refunded by this invoice.
94
+ # @return [String] On refund invoices, this value will exist and show the invoice ID of the purchase invoice the refund was created from.
95
95
  define_attribute :previous_invoice_id, String
96
96
 
97
97
  # @!attribute refundable_amount
@@ -111,7 +111,7 @@ module Recurly
111
111
  define_attribute :subscription_ids, Array, { :item_type => String }
112
112
 
113
113
  # @!attribute subtotal
114
- # @return [Float] The summation of charges and credits, before discounts and taxes.
114
+ # @return [Float] The summation of charges, discounts, and credits, before tax.
115
115
  define_attribute :subtotal, Float
116
116
 
117
117
  # @!attribute tax
@@ -142,10 +142,6 @@ module Recurly
142
142
  # @return [DateTime] Last updated at
143
143
  define_attribute :updated_at, DateTime
144
144
 
145
- # @!attribute used_tax_service
146
- # @return [Boolean] Will be `true` when the invoice had a successful response from the tax service and `false` when the invoice was not sent to tax service due to a lack of address or enabled jurisdiction or was processed without tax due to a non-blocking error returned from the tax service.
147
- define_attribute :used_tax_service, :Boolean
148
-
149
145
  # @!attribute vat_number
150
146
  # @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
147
  define_attribute :vat_number, String
@@ -15,7 +15,7 @@ module Recurly
15
15
  define_attribute :company, String
16
16
 
17
17
  # @!attribute country
18
- # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
18
+ # @return [String] Country, 2-letter ISO code.
19
19
  define_attribute :country, String
20
20
 
21
21
  # @!attribute first_name
@@ -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
@@ -186,10 +170,6 @@ module Recurly
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
@@ -18,10 +18,6 @@ module Recurly
18
18
  # @return [String] Visa, MasterCard, American Express, Discover, JCB, etc.
19
19
  define_attribute :card_type, String
20
20
 
21
- # @!attribute cc_bin_country
22
- # @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.
23
- define_attribute :cc_bin_country, String
24
-
25
21
  # @!attribute exp_month
26
22
  # @return [Integer] Expiration month.
27
23
  define_attribute :exp_month, Integer
@@ -34,10 +30,6 @@ module Recurly
34
30
  # @return [String] Credit card number's first six digits.
35
31
  define_attribute :first_six, String
36
32
 
37
- # @!attribute gateway_attributes
38
- # @return [GatewayAttributes] Gateway specific attributes associated with this PaymentMethod
39
- define_attribute :gateway_attributes, :GatewayAttributes
40
-
41
33
  # @!attribute gateway_code
42
34
  # @return [String] An identifier for a specific payment gateway.
43
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
@@ -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
@@ -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 }
@@ -122,10 +118,6 @@ module Recurly
122
118
  # @return [Integer] Subscription quantity
123
119
  define_attribute :quantity, Integer
124
120
 
125
- # @!attribute ramp_intervals
126
- # @return [Array[SubscriptionRampIntervalResponse]] The ramp intervals representing the pricing schedule for the subscription.
127
- define_attribute :ramp_intervals, Array, { :item_type => :SubscriptionRampIntervalResponse }
128
-
129
121
  # @!attribute remaining_billing_cycles
130
122
  # @return [Integer] The remaining billing cycles in the current term.
131
123
  define_attribute :remaining_billing_cycles, Integer
@@ -154,10 +146,6 @@ module Recurly
154
146
  # @return [Float] Estimated total, before tax.
155
147
  define_attribute :subtotal, Float
156
148
 
157
- # @!attribute tax_inclusive
158
- # @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.
159
- define_attribute :tax_inclusive, :Boolean
160
-
161
149
  # @!attribute terms_and_conditions
162
150
  # @return [String] Terms and conditions
163
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 is enabled or Canadian Sales Tax when there is tax applied at both the country and province levels. This 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.28.0"
2
+ VERSION = "4.0.0"
3
3
  end