recurly 3.20.0 → 3.22.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed73ee37fbf904928bbca6c33b9c25a5c90480a6f273a60f16dec881c32adf7c
4
- data.tar.gz: a8ec25c89f448f7ebe60d0634c1798a59225e3b3399400222e1293a8a369b81e
3
+ metadata.gz: 66774f5d5a08c4cd26758c2dd4c073c8b9515129caf340a76756f3f5ed55e712
4
+ data.tar.gz: 529eec421b40a5c80bd143338786871325deeb19a9818aaca8bd1e673075461f
5
5
  SHA512:
6
- metadata.gz: c1abc2de53c27aa6e123b064e5ab3b32fe774561fa72a827881ceaca60fb6fd09a5e39fae8431be831e263460166e9b745495e9cd1be28dcae38327581363905
7
- data.tar.gz: 60890a7b28b38005b5139af7febb27c76320ebac313286f8b75fc0f10e5b2aa995b76d999ca741aa3244da6ed27d1ffb1aea6d92c7290aea32aa6011c65fcc6e
6
+ metadata.gz: d90a2cb844beef990fb9537c1e6e294a0868bab10854ebaf45151b552ed6025a79423b687ad24844ff10af555a181b46b0d6496e7ecedaa227aac6b8570fd4c7
7
+ data.tar.gz: 9a2e29e819378925cf72c9d4959fa02b9120e02af32c7f45f054cce93b827b5796e13784288ead5694514047b479eb39cb3ce5444ac7511de117cb3de18bd5d1
data/.bumpversion.cfg CHANGED
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 3.20.0
2
+ current_version = 3.22.0
3
3
  parse = (?P<major>\d+)
4
4
  \.(?P<minor>\d+)
5
5
  \.(?P<patch>\d+)
data/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.22.0](https://github.com/recurly/recurly-client-ruby/tree/3.22.0) (2022-10-21)
4
+
5
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.21.0...3.22.0)
6
+
7
+
8
+ **Merged Pull Requests**
9
+
10
+ - Generated Latest Changes for v2019-10-10(Decimal Usage and Quantities) [#800](https://github.com/recurly/recurly-client-ruby/pull/800) ([recurly-integrations](https://github.com/recurly-integrations))
11
+
12
+
13
+
14
+ ## [3.21.0](https://github.com/recurly/recurly-client-ruby/tree/3.21.0) (2022-08-03)
15
+
16
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.20.0...3.21.0)
17
+
18
+
19
+ **Merged Pull Requests**
20
+
21
+ - Generated Latest Changes for v2019-10-10 [#782](https://github.com/recurly/recurly-client-ruby/pull/782) ([recurly-integrations](https://github.com/recurly-integrations))
22
+ - Generated Latest Changes for v2019-10-10 [#779](https://github.com/recurly/recurly-client-ruby/pull/779) ([recurly-integrations](https://github.com/recurly-integrations))
23
+
24
+
25
+
3
26
  ## [3.20.0](https://github.com/recurly/recurly-client-ruby/tree/3.20.0) (2022-06-16)
4
27
 
5
28
  [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/3.19.0...3.20.0)
data/GETTING_STARTED.md CHANGED
@@ -5,7 +5,7 @@ This repository houses the official ruby client for Recurly's V3 API.
5
5
  In your Gemfile, add `recurly` as a dependency.
6
6
 
7
7
  ```ruby
8
- gem 'recurly', '~> 3.20'
8
+ gem 'recurly', '~> 3.22'
9
9
  ```
10
10
 
11
11
  > *Note*: We try to follow [semantic versioning](https://semver.org/) and will only apply breaking changes to major versions.
@@ -3841,12 +3841,13 @@ module Recurly
3841
3841
  #
3842
3842
  # {https://developers.recurly.com/api/v2019-10-10#operation/put_dunning_campaign_bulk_update put_dunning_campaign_bulk_update api documentation}
3843
3843
  #
3844
+ # @param dunning_campaign_id [String] Dunning Campaign ID, e.g. +e28zov4fw0v2+.
3844
3845
  # @param body [Requests::DunningCampaignsBulkUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::DunningCampaignsBulkUpdate}
3845
3846
  #
3846
3847
  # @return [Resources::DunningCampaignsBulkUpdateResponse] A list of updated plans.
3847
3848
  #
3848
- def put_dunning_campaign_bulk_update(body:)
3849
- path = "/dunning_campaigns/{dunning_campaign_id}/bulk_update"
3849
+ def put_dunning_campaign_bulk_update(dunning_campaign_id:, body:)
3850
+ path = interpolate_path("/dunning_campaigns/{dunning_campaign_id}/bulk_update", dunning_campaign_id: dunning_campaign_id)
3850
3851
  put(path, body, Requests::DunningCampaignsBulkUpdate)
3851
3852
  end
3852
3853
  end
@@ -17,6 +17,10 @@ module Recurly
17
17
  # @!attribute quantity
18
18
  # @return [Integer] Line item quantity to be refunded.
19
19
  define_attribute :quantity, Integer
20
+
21
+ # @!attribute quantity_decimal
22
+ # @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.
23
+ define_attribute :quantity_decimal, String
20
24
  end
21
25
  end
22
26
  end
@@ -62,6 +62,14 @@ module Recurly
62
62
  # @return [String] This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice.
63
63
  define_attribute :name, String
64
64
 
65
+ # @!attribute pricing_model
66
+ # @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.
67
+ define_attribute :pricing_model, String
68
+
69
+ # @!attribute ramp_intervals
70
+ # @return [Array[PlanRampInterval]] Ramp Intervals
71
+ define_attribute :ramp_intervals, Array, { :item_type => :PlanRampInterval }
72
+
65
73
  # @!attribute revenue_schedule_type
66
74
  # @return [String] Revenue schedule type
67
75
  define_attribute :revenue_schedule_type, String
@@ -19,7 +19,7 @@ module Recurly
19
19
  define_attribute :tax_inclusive, :Boolean
20
20
 
21
21
  # @!attribute unit_amount
22
- # @return [Float] Unit price
22
+ # @return [Float] This field should not be sent when the pricing model is 'ramp'.
23
23
  define_attribute :unit_amount, Float
24
24
  end
25
25
  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 Requests
7
+ class PlanRampInterval < Request
8
+
9
+ # @!attribute currencies
10
+ # @return [Array[PlanRampPricing]] Represents the price for the ramp interval.
11
+ define_attribute :currencies, Array, { :item_type => :PlanRampPricing }
12
+
13
+ # @!attribute starting_billing_cycle
14
+ # @return [Integer] Represents the billing cycle where a ramp interval starts.
15
+ define_attribute :starting_billing_cycle, Integer
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 Requests
7
+ class PlanRampPricing < Request
8
+
9
+ # @!attribute currency
10
+ # @return [String] 3-letter ISO 4217 currency code.
11
+ define_attribute :currency, String
12
+
13
+ # @!attribute unit_amount
14
+ # @return [Float] Represents the price for the Ramp Interval.
15
+ define_attribute :unit_amount, Float
16
+ end
17
+ end
18
+ end
@@ -54,6 +54,10 @@ module Recurly
54
54
  # @return [String] This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice.
55
55
  define_attribute :name, String
56
56
 
57
+ # @!attribute ramp_intervals
58
+ # @return [Array[PlanRampInterval]] Ramp Intervals
59
+ define_attribute :ramp_intervals, Array, { :item_type => :PlanRampInterval }
60
+
57
61
  # @!attribute revenue_schedule_type
58
62
  # @return [String] Revenue schedule type
59
63
  define_attribute :revenue_schedule_type, String
@@ -46,6 +46,10 @@ module Recurly
46
46
  # @return [Integer] Optionally override the default quantity of 1.
47
47
  define_attribute :quantity, Integer
48
48
 
49
+ # @!attribute ramp_intervals
50
+ # @return [Array[SubscriptionRampInterval]] The new set of ramp intervals for the subscription.
51
+ define_attribute :ramp_intervals, Array, { :item_type => :SubscriptionRampInterval }
52
+
49
53
  # @!attribute revenue_schedule_type
50
54
  # @return [String] Revenue schedule type
51
55
  define_attribute :revenue_schedule_type, String
@@ -70,6 +70,10 @@ module Recurly
70
70
  # @return [Integer] Optionally override the default quantity of 1.
71
71
  define_attribute :quantity, Integer
72
72
 
73
+ # @!attribute ramp_intervals
74
+ # @return [Array[SubscriptionRampInterval]] The new set of ramp intervals for the subscription.
75
+ define_attribute :ramp_intervals, Array, { :item_type => :SubscriptionRampInterval }
76
+
73
77
  # @!attribute renewal_billing_cycles
74
78
  # @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`.
75
79
  define_attribute :renewal_billing_cycles, Integer
@@ -34,6 +34,10 @@ module Recurly
34
34
  # @return [Integer] Optionally override the default quantity of 1.
35
35
  define_attribute :quantity, Integer
36
36
 
37
+ # @!attribute ramp_intervals
38
+ # @return [Array[SubscriptionRampInterval]] The new set of ramp intervals for the subscription.
39
+ define_attribute :ramp_intervals, Array, { :item_type => :SubscriptionRampInterval }
40
+
37
41
  # @!attribute renewal_billing_cycles
38
42
  # @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`.
39
43
  define_attribute :renewal_billing_cycles, 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 Requests
7
+ class SubscriptionRampInterval < Request
8
+
9
+ # @!attribute starting_billing_cycle
10
+ # @return [Integer] Represents the billing cycle where a ramp interval starts.
11
+ define_attribute :starting_billing_cycle, Integer
12
+
13
+ # @!attribute unit_amount
14
+ # @return [Integer] Represents the price for the ramp interval.
15
+ define_attribute :unit_amount, Integer
16
+ end
17
+ end
18
+ end
@@ -7,7 +7,7 @@ module Recurly
7
7
  class UsageCreate < Request
8
8
 
9
9
  # @!attribute amount
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").
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").
11
11
  define_attribute :amount, Float
12
12
 
13
13
  # @!attribute merchant_tag
@@ -130,6 +130,10 @@ module Recurly
130
130
  # @return [Integer] This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes.
131
131
  define_attribute :quantity, Integer
132
132
 
133
+ # @!attribute quantity_decimal
134
+ # @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.
135
+ define_attribute :quantity_decimal, String
136
+
133
137
  # @!attribute refund
134
138
  # @return [Boolean] Refund?
135
139
  define_attribute :refund, :Boolean
@@ -138,6 +142,10 @@ module Recurly
138
142
  # @return [Integer] For refund charges, the quantity being refunded. For non-refund charges, the total quantity refunded (possibly over multiple refunds).
139
143
  define_attribute :refunded_quantity, Integer
140
144
 
145
+ # @!attribute refunded_quantity_decimal
146
+ # @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.
147
+ define_attribute :refunded_quantity_decimal, String
148
+
141
149
  # @!attribute revenue_schedule_type
142
150
  # @return [String] Revenue schedule type
143
151
  define_attribute :revenue_schedule_type, String
@@ -174,6 +182,10 @@ module Recurly
174
182
  # @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.
175
183
  define_attribute :tax_exempt, :Boolean
176
184
 
185
+ # @!attribute tax_inclusive
186
+ # @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.
187
+ define_attribute :tax_inclusive, :Boolean
188
+
177
189
  # @!attribute tax_info
178
190
  # @return [TaxInfo] Tax info
179
191
  define_attribute :tax_info, :TaxInfo
@@ -74,6 +74,14 @@ module Recurly
74
74
  # @return [String] Object type
75
75
  define_attribute :object, String
76
76
 
77
+ # @!attribute pricing_model
78
+ # @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.
79
+ define_attribute :pricing_model, String
80
+
81
+ # @!attribute ramp_intervals
82
+ # @return [Array[PlanRampInterval]] Ramp Intervals
83
+ define_attribute :ramp_intervals, Array, { :item_type => :PlanRampInterval }
84
+
77
85
  # @!attribute revenue_schedule_type
78
86
  # @return [String] Revenue schedule type
79
87
  define_attribute :revenue_schedule_type, String
@@ -19,7 +19,7 @@ module Recurly
19
19
  define_attribute :tax_inclusive, :Boolean
20
20
 
21
21
  # @!attribute unit_amount
22
- # @return [Float] Unit price
22
+ # @return [Float] This field should not be sent when the pricing model is 'ramp'.
23
23
  define_attribute :unit_amount, Float
24
24
  end
25
25
  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 PlanRampInterval < Resource
8
+
9
+ # @!attribute currencies
10
+ # @return [Array[PlanRampPricing]] Represents the price for the ramp interval.
11
+ define_attribute :currencies, Array, { :item_type => :PlanRampPricing }
12
+
13
+ # @!attribute starting_billing_cycle
14
+ # @return [Integer] Represents the billing cycle where a ramp interval starts.
15
+ define_attribute :starting_billing_cycle, Integer
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 PlanRampPricing < Resource
8
+
9
+ # @!attribute currency
10
+ # @return [String] 3-letter ISO 4217 currency code.
11
+ define_attribute :currency, String
12
+
13
+ # @!attribute unit_amount
14
+ # @return [Float] Represents the price for the Ramp Interval.
15
+ define_attribute :unit_amount, Float
16
+ end
17
+ end
18
+ end
@@ -122,6 +122,10 @@ module Recurly
122
122
  # @return [Integer] Subscription quantity
123
123
  define_attribute :quantity, Integer
124
124
 
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
+
125
129
  # @!attribute remaining_billing_cycles
126
130
  # @return [Integer] The remaining billing cycles in the current term.
127
131
  define_attribute :remaining_billing_cycles, Integer
@@ -150,6 +154,10 @@ module Recurly
150
154
  # @return [Float] Estimated total, before tax.
151
155
  define_attribute :subtotal, Float
152
156
 
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
+
153
161
  # @!attribute terms_and_conditions
154
162
  # @return [String] Terms and conditions
155
163
  define_attribute :terms_and_conditions, String
@@ -54,6 +54,10 @@ module Recurly
54
54
  # @return [Integer] Subscription quantity
55
55
  define_attribute :quantity, Integer
56
56
 
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
+
57
61
  # @!attribute revenue_schedule_type
58
62
  # @return [String] Revenue schedule type
59
63
  define_attribute :revenue_schedule_type, String
@@ -54,6 +54,10 @@ module Recurly
54
54
  # @return [Integer] Subscription quantity
55
55
  define_attribute :quantity, Integer
56
56
 
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
+
57
61
  # @!attribute revenue_schedule_type
58
62
  # @return [String] Revenue schedule type
59
63
  define_attribute :revenue_schedule_type, String
@@ -0,0 +1,22 @@
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 SubscriptionRampIntervalResponse < Resource
8
+
9
+ # @!attribute remaining_billing_cycles
10
+ # @return [Integer] Represents how many billing cycles are left in a ramp interval.
11
+ define_attribute :remaining_billing_cycles, Integer
12
+
13
+ # @!attribute starting_billing_cycle
14
+ # @return [Integer] Represents the billing cycle where a ramp interval starts.
15
+ define_attribute :starting_billing_cycle, Integer
16
+
17
+ # @!attribute unit_amount
18
+ # @return [Integer] Represents the price for the ramp interval.
19
+ define_attribute :unit_amount, Integer
20
+ end
21
+ end
22
+ 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. 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").
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").
11
11
  define_attribute :amount, Float
12
12
 
13
13
  # @!attribute billed_at
@@ -1,3 +1,3 @@
1
1
  module Recurly
2
- VERSION = "3.20.0"
2
+ VERSION = "3.22.0"
3
3
  end
data/openapi/api.yaml CHANGED
@@ -14463,6 +14463,8 @@ paths:
14463
14463
  "$ref": "#/components/schemas/Error"
14464
14464
  x-code-samples: []
14465
14465
  "/dunning_campaigns/{dunning_campaign_id}/bulk_update":
14466
+ parameters:
14467
+ - "$ref": "#/components/parameters/dunning_campaign_id"
14466
14468
  put:
14467
14469
  tags:
14468
14470
  - dunning_campaigns
@@ -17259,7 +17261,7 @@ components:
17259
17261
  title: Field value
17260
17262
  description: Any values that resemble a credit card number or security code
17261
17263
  (CVV/CVC) will be rejected.
17262
- maxLength: 100
17264
+ maxLength: 255
17263
17265
  required:
17264
17266
  - name
17265
17267
  - value
@@ -18423,11 +18425,25 @@ components:
18423
18425
  description: This number will be multiplied by the unit amount to compute
18424
18426
  the subtotal before any discounts or taxes.
18425
18427
  default: 1
18428
+ quantity_decimal:
18429
+ type: string
18430
+ title: Quantity Decimal
18431
+ description: A floating-point alternative to Quantity. If this value is
18432
+ present, it will be used in place of Quantity for calculations, and Quantity
18433
+ will be the rounded integer value of this number. This field supports
18434
+ up to 9 decimal places. The Decimal Quantity feature must be enabled to
18435
+ utilize this field.
18426
18436
  unit_amount:
18427
18437
  type: number
18428
18438
  format: float
18429
18439
  title: Unit amount
18430
18440
  description: Positive amount for a charge, negative amount for a credit.
18441
+ tax_inclusive:
18442
+ type: boolean
18443
+ title: Tax Inclusive?
18444
+ description: Determines whether or not tax is included in the unit amount.
18445
+ The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing
18446
+ feature) must be enabled to utilize this flag.
18431
18447
  subtotal:
18432
18448
  type: number
18433
18449
  format: float
@@ -18497,6 +18513,13 @@ components:
18497
18513
  title: Refunded Quantity
18498
18514
  description: For refund charges, the quantity being refunded. For non-refund
18499
18515
  charges, the total quantity refunded (possibly over multiple refunds).
18516
+ refunded_quantity_decimal:
18517
+ type: string
18518
+ title: Refunded Quantity Decimal
18519
+ description: A floating-point alternative to Refunded Quantity. For refund
18520
+ charges, the quantity being refunded. For non-refund charges, the total
18521
+ quantity refunded (possibly over multiple refunds). The Decimal Quantity
18522
+ feature must be enabled to utilize this field.
18500
18523
  credit_applied:
18501
18524
  type: number
18502
18525
  format: float
@@ -18538,6 +18561,14 @@ components:
18538
18561
  type: integer
18539
18562
  title: Quantity
18540
18563
  description: Line item quantity to be refunded.
18564
+ quantity_decimal:
18565
+ type: string
18566
+ title: Quantity Decimal
18567
+ description: A floating-point alternative to Quantity. If this value is
18568
+ present, it will be used in place of Quantity for calculations, and Quantity
18569
+ will be the rounded integer value of this number. This field supports
18570
+ up to 9 decimal places. The Decimal Quantity feature must be enabled to
18571
+ utilize this field.
18541
18572
  prorate:
18542
18573
  type: boolean
18543
18574
  title: Prorate
@@ -18822,6 +18853,22 @@ components:
18822
18853
  renew its term at renewal. If `auto_renew` is `false`, then a subscription
18823
18854
  will expire at the end of its term. `auto_renew` can be overridden on
18824
18855
  the subscription record itself.
18856
+ pricing_model:
18857
+ title: Pricing Model
18858
+ type: string
18859
+ enum:
18860
+ - fixed
18861
+ - ramp
18862
+ default: fixed
18863
+ description: |
18864
+ A fixed pricing model has the same price for each billing period.
18865
+ A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on
18866
+ a specified cadence of billing periods. The price change could be an increase or decrease.
18867
+ ramp_intervals:
18868
+ type: array
18869
+ title: Ramp Intervals
18870
+ items:
18871
+ "$ref": "#/components/schemas/PlanRampInterval"
18825
18872
  accounting_code:
18826
18873
  type: string
18827
18874
  title: Plan accounting code
@@ -19000,6 +19047,22 @@ components:
19000
19047
  renew its term at renewal. If `auto_renew` is `false`, then a subscription
19001
19048
  will expire at the end of its term. `auto_renew` can be overridden on
19002
19049
  the subscription record itself.
19050
+ pricing_model:
19051
+ title: Pricing Model
19052
+ type: string
19053
+ enum:
19054
+ - fixed
19055
+ - ramp
19056
+ default: fixed
19057
+ description: |
19058
+ A fixed pricing model has the same price for each billing period.
19059
+ A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on
19060
+ a specified cadence of billing periods. The price change could be an increase or decrease.
19061
+ ramp_intervals:
19062
+ type: array
19063
+ title: Ramp Intervals
19064
+ items:
19065
+ "$ref": "#/components/schemas/PlanRampInterval"
19003
19066
  revenue_schedule_type:
19004
19067
  type: string
19005
19068
  title: Revenue schedule type
@@ -19131,6 +19194,7 @@ components:
19131
19194
  type: number
19132
19195
  format: float
19133
19196
  title: Unit price
19197
+ description: This field should not be sent when the pricing model is 'ramp'.
19134
19198
  minimum: 0
19135
19199
  maximum: 1000000
19136
19200
  tax_inclusive:
@@ -19208,6 +19272,11 @@ components:
19208
19272
  renew its term at renewal. If `auto_renew` is `false`, then a subscription
19209
19273
  will expire at the end of its term. `auto_renew` can be overridden on
19210
19274
  the subscription record itself.
19275
+ ramp_intervals:
19276
+ type: array
19277
+ title: Ramp Intervals
19278
+ items:
19279
+ "$ref": "#/components/schemas/PlanRampInterval"
19211
19280
  revenue_schedule_type:
19212
19281
  type: string
19213
19282
  title: Revenue schedule type
@@ -19285,6 +19354,19 @@ components:
19285
19354
  a non-default dunning campaign should be assigned to this plan. For sites
19286
19355
  without multiple dunning campaigns enabled, the default dunning campaign
19287
19356
  will always be used.
19357
+ PlanRampInterval:
19358
+ type: object
19359
+ title: Plan Ramp Interval
19360
+ properties:
19361
+ starting_billing_cycle:
19362
+ type: integer
19363
+ description: Represents the billing cycle where a ramp interval starts.
19364
+ default: 1
19365
+ currencies:
19366
+ type: array
19367
+ description: Represents the price for the ramp interval.
19368
+ items:
19369
+ "$ref": "#/components/schemas/PlanRampPricing"
19288
19370
  AddOnPricing:
19289
19371
  type: object
19290
19372
  properties:
@@ -19308,6 +19390,24 @@ components:
19308
19390
  required:
19309
19391
  - currency
19310
19392
  - unit_amount
19393
+ PlanRampPricing:
19394
+ type: object
19395
+ properties:
19396
+ currency:
19397
+ type: string
19398
+ title: Currency
19399
+ description: 3-letter ISO 4217 currency code.
19400
+ maxLength: 3
19401
+ unit_amount:
19402
+ type: number
19403
+ format: float
19404
+ title: Unit price
19405
+ description: Represents the price for the Ramp Interval.
19406
+ minimum: 0
19407
+ maximum: 1000000
19408
+ required:
19409
+ - currency
19410
+ - unit_amount
19311
19411
  Pricing:
19312
19412
  type: object
19313
19413
  properties:
@@ -19893,6 +19993,13 @@ components:
19893
19993
  default: true
19894
19994
  title: Auto renew
19895
19995
  description: Whether the subscription renews at the end of its term.
19996
+ ramp_intervals:
19997
+ type: array
19998
+ title: Ramp Intervals
19999
+ description: The ramp intervals representing the pricing schedule for the
20000
+ subscription.
20001
+ items:
20002
+ "$ref": "#/components/schemas/SubscriptionRampIntervalResponse"
19896
20003
  paused_at:
19897
20004
  type: string
19898
20005
  format: date-time
@@ -19921,6 +20028,12 @@ components:
19921
20028
  type: number
19922
20029
  format: float
19923
20030
  title: Subscription unit price
20031
+ tax_inclusive:
20032
+ type: boolean
20033
+ title: Tax Inclusive?
20034
+ description: Determines whether or not tax is included in the unit amount.
20035
+ The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing
20036
+ feature) must be enabled to utilize this flag.
19924
20037
  quantity:
19925
20038
  type: integer
19926
20039
  title: Subscription quantity
@@ -20350,6 +20463,13 @@ components:
20350
20463
  readOnly: true
20351
20464
  billing_info:
20352
20465
  "$ref": "#/components/schemas/SubscriptionChangeBillingInfo"
20466
+ ramp_intervals:
20467
+ type: array
20468
+ title: Ramp Intervals
20469
+ description: The ramp intervals representing the pricing schedule for the
20470
+ subscription.
20471
+ items:
20472
+ "$ref": "#/components/schemas/SubscriptionRampIntervalResponse"
20353
20473
  SubscriptionChangeBillingInfo:
20354
20474
  type: object
20355
20475
  description: Accept nested attributes for three_d_secure_action_result_token_id
@@ -20489,6 +20609,12 @@ components:
20489
20609
  - moto
20490
20610
  billing_info:
20491
20611
  "$ref": "#/components/schemas/SubscriptionChangeBillingInfoCreate"
20612
+ ramp_intervals:
20613
+ type: array
20614
+ title: Ramp Intervals
20615
+ description: The new set of ramp intervals for the subscription.
20616
+ items:
20617
+ "$ref": "#/components/schemas/SubscriptionRampInterval"
20492
20618
  SubscriptionChangePreview:
20493
20619
  type: object
20494
20620
  allOf:
@@ -20640,6 +20766,12 @@ components:
20640
20766
  default: true
20641
20767
  title: Auto renew
20642
20768
  description: Whether the subscription renews at the end of its term.
20769
+ ramp_intervals:
20770
+ type: array
20771
+ title: Ramp Intervals
20772
+ description: The new set of ramp intervals for the subscription.
20773
+ items:
20774
+ "$ref": "#/components/schemas/SubscriptionRampInterval"
20643
20775
  revenue_schedule_type:
20644
20776
  type: string
20645
20777
  title: Revenue schedule type
@@ -20791,6 +20923,12 @@ components:
20791
20923
  - evenly
20792
20924
  - at_range_end
20793
20925
  - at_range_start
20926
+ ramp_intervals:
20927
+ type: array
20928
+ title: Ramp Intervals
20929
+ description: The new set of ramp intervals for the subscription.
20930
+ items:
20931
+ "$ref": "#/components/schemas/SubscriptionRampInterval"
20794
20932
  required:
20795
20933
  - plan_code
20796
20934
  SubscriptionUpdate:
@@ -20974,6 +21112,30 @@ components:
20974
21112
  format: float
20975
21113
  title: Assigns the subscription's shipping cost. If this is greater than
20976
21114
  zero then a `method_id` or `method_code` is required.
21115
+ SubscriptionRampInterval:
21116
+ type: object
21117
+ title: Subscription Ramp Interval
21118
+ properties:
21119
+ starting_billing_cycle:
21120
+ type: integer
21121
+ description: Represents the billing cycle where a ramp interval starts.
21122
+ default: 1
21123
+ unit_amount:
21124
+ type: integer
21125
+ description: Represents the price for the ramp interval.
21126
+ SubscriptionRampIntervalResponse:
21127
+ type: object
21128
+ title: Subscription Ramp Interval
21129
+ properties:
21130
+ starting_billing_cycle:
21131
+ type: integer
21132
+ description: Represents the billing cycle where a ramp interval starts.
21133
+ remaining_billing_cycles:
21134
+ type: integer
21135
+ description: Represents how many billing cycles are left in a ramp interval.
21136
+ unit_amount:
21137
+ type: integer
21138
+ description: Represents the price for the ramp interval.
20977
21139
  TaxInfo:
20978
21140
  type: object
20979
21141
  title: Tax info
@@ -21396,10 +21558,11 @@ components:
21396
21558
  amount:
21397
21559
  type: number
21398
21560
  format: float
21399
- description: The amount of usage. Can be positive, negative, or 0. No decimals
21400
- allowed, we will strip them. If the usage-based add-on is billed with
21401
- a percentage, your usage will be a monetary amount you will want to format
21402
- in cents. (e.g., $5.00 is "500").
21561
+ description: The amount of usage. Can be positive, negative, or 0. If the
21562
+ Decimal Quantity feature is enabled, this value will be rounded to nine
21563
+ decimal places. Otherwise, all digits after the decimal will be stripped.
21564
+ If the usage-based add-on is billed with a percentage, your usage should
21565
+ be a monetary amount formatted in cents (e.g., $5.00 is "500").
21403
21566
  usage_type:
21404
21567
  type: string
21405
21568
  enum:
@@ -21472,10 +21635,11 @@ components:
21472
21635
  amount:
21473
21636
  type: number
21474
21637
  format: float
21475
- description: The amount of usage. Can be positive, negative, or 0. No decimals
21476
- allowed, we will strip them. If the usage-based add-on is billed with
21477
- a percentage, your usage will be a monetary amount you will want to format
21478
- in cents. (e.g., $5.00 is "500").
21638
+ description: The amount of usage. Can be positive, negative, or 0. If the
21639
+ Decimal Quantity feature is enabled, this value will be rounded to nine
21640
+ decimal places. Otherwise, all digits after the decimal will be stripped.
21641
+ If the usage-based add-on is billed with a percentage, your usage should
21642
+ be a monetary amount formatted in cents (e.g., $5.00 is "500").
21479
21643
  recording_timestamp:
21480
21644
  type: string
21481
21645
  format: date-time
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recurly
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.20.0
4
+ version: 3.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-16 00:00:00.000000000 Z
11
+ date: 2022-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -179,6 +179,8 @@ files:
179
179
  - lib/recurly/requests/plan_create.rb
180
180
  - lib/recurly/requests/plan_hosted_pages.rb
181
181
  - lib/recurly/requests/plan_pricing.rb
182
+ - lib/recurly/requests/plan_ramp_interval.rb
183
+ - lib/recurly/requests/plan_ramp_pricing.rb
182
184
  - lib/recurly/requests/plan_update.rb
183
185
  - lib/recurly/requests/pricing.rb
184
186
  - lib/recurly/requests/purchase_create.rb
@@ -198,6 +200,7 @@ files:
198
200
  - lib/recurly/requests/subscription_create.rb
199
201
  - lib/recurly/requests/subscription_pause.rb
200
202
  - lib/recurly/requests/subscription_purchase.rb
203
+ - lib/recurly/requests/subscription_ramp_interval.rb
201
204
  - lib/recurly/requests/subscription_shipping_create.rb
202
205
  - lib/recurly/requests/subscription_shipping_purchase.rb
203
206
  - lib/recurly/requests/subscription_shipping_update.rb
@@ -254,6 +257,8 @@ files:
254
257
  - lib/recurly/resources/plan_hosted_pages.rb
255
258
  - lib/recurly/resources/plan_mini.rb
256
259
  - lib/recurly/resources/plan_pricing.rb
260
+ - lib/recurly/resources/plan_ramp_interval.rb
261
+ - lib/recurly/resources/plan_ramp_pricing.rb
257
262
  - lib/recurly/resources/pricing.rb
258
263
  - lib/recurly/resources/settings.rb
259
264
  - lib/recurly/resources/shipping_address.rb
@@ -266,6 +271,7 @@ files:
266
271
  - lib/recurly/resources/subscription_change.rb
267
272
  - lib/recurly/resources/subscription_change_billing_info.rb
268
273
  - lib/recurly/resources/subscription_change_preview.rb
274
+ - lib/recurly/resources/subscription_ramp_interval_response.rb
269
275
  - lib/recurly/resources/subscription_shipping.rb
270
276
  - lib/recurly/resources/tax_detail.rb
271
277
  - lib/recurly/resources/tax_info.rb
@@ -300,7 +306,7 @@ metadata:
300
306
  changelog_uri: https://github.com/recurly/recurly-client-ruby/blob/master/CHANGELOG.md
301
307
  documentation_uri: https://recurly.github.io/recurly-client-ruby/
302
308
  homepage_uri: https://github.com/recurly/recurly-client-ruby
303
- source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/3.20.0
309
+ source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/3.22.0
304
310
  post_install_message:
305
311
  rdoc_options: []
306
312
  require_paths: