recurly 4.15.0 → 4.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.bumpversion.cfg +1 -1
  3. data/.github/workflows/ci.yml +29 -0
  4. data/CHANGELOG.md +44 -0
  5. data/GETTING_STARTED.md +1 -1
  6. data/lib/recurly/client/operations.rb +11 -0
  7. data/lib/recurly/requests/account_create.rb +1 -1
  8. data/lib/recurly/requests/account_purchase.rb +1 -1
  9. data/lib/recurly/requests/account_update.rb +1 -1
  10. data/lib/recurly/requests/add_on_create.rb +6 -2
  11. data/lib/recurly/requests/add_on_pricing.rb +1 -1
  12. data/lib/recurly/requests/add_on_update.rb +2 -2
  13. data/lib/recurly/requests/billing_info_create.rb +6 -2
  14. data/lib/recurly/requests/percentage_tier.rb +2 -2
  15. data/lib/recurly/requests/plan_pricing.rb +1 -1
  16. data/lib/recurly/requests/pricing.rb +1 -1
  17. data/lib/recurly/requests/subscription_add_on_create.rb +2 -2
  18. data/lib/recurly/requests/subscription_add_on_percentage_tier.rb +2 -2
  19. data/lib/recurly/requests/subscription_add_on_tier.rb +1 -1
  20. data/lib/recurly/requests/subscription_add_on_update.rb +5 -1
  21. data/lib/recurly/requests/subscription_change_create.rb +1 -1
  22. data/lib/recurly/requests/subscription_update.rb +1 -1
  23. data/lib/recurly/requests/tier.rb +1 -1
  24. data/lib/recurly/resources/account.rb +1 -1
  25. data/lib/recurly/resources/account_balance_amount.rb +4 -0
  26. data/lib/recurly/resources/add_on.rb +4 -0
  27. data/lib/recurly/resources/add_on_pricing.rb +1 -1
  28. data/lib/recurly/resources/line_item.rb +4 -0
  29. data/lib/recurly/resources/percentage_tier.rb +2 -2
  30. data/lib/recurly/resources/plan_pricing.rb +1 -1
  31. data/lib/recurly/resources/pricing.rb +1 -1
  32. data/lib/recurly/resources/subscription.rb +8 -0
  33. data/lib/recurly/resources/subscription_add_on.rb +6 -2
  34. data/lib/recurly/resources/subscription_add_on_percentage_tier.rb +2 -2
  35. data/lib/recurly/resources/subscription_add_on_tier.rb +1 -1
  36. data/lib/recurly/resources/subscription_change.rb +1 -1
  37. data/lib/recurly/resources/tier.rb +1 -1
  38. data/lib/recurly/version.rb +1 -1
  39. data/openapi/api.yaml +214 -48
  40. metadata +4 -4
  41. data/.travis.yml +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e4b2e17dfb70a87cbb8e2578af8d64269d107a4759f1b44bfd1f248ea7d5903
4
- data.tar.gz: c537f30a85ac92be2e5809dc1fc8eb4a8198324fa5b354ec8a7e1750b1f5cbfc
3
+ metadata.gz: c861b2e79ebc5e861d6af500bd9feabc26acf6eefb255a1f135a8fd0e662f76f
4
+ data.tar.gz: 9e64e7ebd57db00dfb3ecc87df92e997cb4e0f260b39321494d33c68840eb8b5
5
5
  SHA512:
6
- metadata.gz: 5ef1c8fc07f6ab7338fe324ba22df7f909e4bdb9a96b3fa7035fc79a3bc0b80bb1b4cc609b201c6efcd486e6c074670029ba71c0d76bc431b8ca70af3f59c8b6
7
- data.tar.gz: afdb01bf7ea1b5648f55396b5408f7b02ed139bd704a44fe55721bf240edae9631aaded8b803f0bcdf7b061132ca92a53fa6b376ba80d12b624c773f0f278dff
6
+ metadata.gz: 1fb332313015a7601d6d39a4a170b67472d1058ba6723c2e0fb0f6ca45af7bd9daa4663e55eb1b6c62e304534ea59f69079f6579d56f7e0651b95a2d0a42043d
7
+ data.tar.gz: d062c28eaef0f6cb6f27001b0573db8939d777fb29db554d857c9469d2784ff9857e2bd0bb9eaab8c24a5c4c6ed18d65fa9d8ec54d55c82179f98043f724cf9a
data/.bumpversion.cfg CHANGED
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 4.15.0
2
+ current_version = 4.19.0
3
3
  parse = (?P<major>\d+)
4
4
  \.(?P<minor>\d+)
5
5
  \.(?P<patch>\d+)
@@ -0,0 +1,29 @@
1
+ name: CI
2
+ on: [push]
3
+ concurrency:
4
+ group: ${{ github.ref }}
5
+ cancel-in-progress: true
6
+ jobs:
7
+ build:
8
+ runs-on: ubuntu-latest
9
+ name: Ruby ${{ matrix.ruby }} tests
10
+ strategy:
11
+ matrix:
12
+ ruby: [2.4, 2.5, 2.6, 2.7, 3.0]
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ - name: Setup ruby
16
+ uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: ${{ matrix.ruby }}
19
+ - run: ./scripts/build
20
+ - run: ./scripts/test
21
+ buildall:
22
+ if: ${{ always() }}
23
+ runs-on: ubuntu-latest
24
+ name: Build (matrix)
25
+ needs: build
26
+ steps:
27
+ - name: Check build matrix status
28
+ if: ${{ needs.build.result != 'success' }}
29
+ run: exit 1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.19.0](https://github.com/recurly/recurly-client-ruby/tree/4.19.0) (2022-07-11)
4
+
5
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.18.0...4.19.0)
6
+
7
+
8
+ **Merged Pull Requests**
9
+
10
+ - Generated Latest Changes for v2021-02-25 [#778](https://github.com/recurly/recurly-client-ruby/pull/778) ([recurly-integrations](https://github.com/recurly-integrations))
11
+
12
+
13
+
14
+ ## [4.18.0](https://github.com/recurly/recurly-client-ruby/tree/4.18.0) (2022-06-16)
15
+
16
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.17.0...4.18.0)
17
+
18
+
19
+ **Merged Pull Requests**
20
+
21
+ - Generated Latest Changes for v2021-02-25 [#776](https://github.com/recurly/recurly-client-ruby/pull/776) ([recurly-integrations](https://github.com/recurly-integrations))
22
+
23
+
24
+
25
+ ## [4.17.0](https://github.com/recurly/recurly-client-ruby/tree/4.17.0) (2022-04-15)
26
+
27
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.16.0...4.17.0)
28
+
29
+
30
+ **Merged Pull Requests**
31
+
32
+ - Generated Latest Changes for v2021-02-25 [#766](https://github.com/recurly/recurly-client-ruby/pull/766) ([recurly-integrations](https://github.com/recurly-integrations))
33
+
34
+
35
+
36
+ ## [4.16.0](https://github.com/recurly/recurly-client-ruby/tree/4.16.0) (2022-03-24)
37
+
38
+ [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.15.0...4.16.0)
39
+
40
+
41
+ **Merged Pull Requests**
42
+
43
+ - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#762](https://github.com/recurly/recurly-client-ruby/pull/762) ([recurly-integrations](https://github.com/recurly-integrations))
44
+
45
+
46
+
3
47
  ## [4.15.0](https://github.com/recurly/recurly-client-ruby/tree/4.15.0) (2022-03-14)
4
48
 
5
49
  [Full Changelog](https://github.com/recurly/recurly-client-ruby/compare/4.14.0...4.15.0)
data/GETTING_STARTED.md CHANGED
@@ -5,7 +5,7 @@ This repository houses the official ruby client for Recurly's V3 API.
5
5
  In your Gemfile, add `recurly` as a dependency.
6
6
 
7
7
  ```ruby
8
- gem 'recurly', '~> 4.15'
8
+ gem 'recurly', '~> 4.19'
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.
@@ -3351,6 +3351,17 @@ module Recurly
3351
3351
  # @param params [Hash] Optional query string parameters:
3352
3352
  #
3353
3353
  # @return [Resources::InvoiceCollection] A preview of the subscription's renewal invoice(s).
3354
+ # @example
3355
+ # begin
3356
+ # invoice_collection = @client.get_preview_renewal(
3357
+ # subscription_id: subscription_id
3358
+ # )
3359
+ # puts "Fetched Renewal Preview with total: #{invoice_collection.charge_invoice.total}"
3360
+ # rescue Recurly::Errors::NotFoundError
3361
+ # # If the resource was not found, you may want to alert the user or
3362
+ # # just return nil
3363
+ # puts "Resource Not Found"
3364
+ # end
3354
3365
  #
3355
3366
  def get_preview_renewal(subscription_id:, **options)
3356
3367
  path = interpolate_path("/subscriptions/{subscription_id}/preview_renewal", subscription_id: subscription_id)
@@ -55,7 +55,7 @@ module Recurly
55
55
  define_attribute :first_name, String
56
56
 
57
57
  # @!attribute invoice_template_id
58
- # @return [String] Unique ID to identify an invoice template. Available when the Invoice Customization feature is enabled. Used to specify which invoice template, if any, should be used to generate invoices for the account.
58
+ # @return [String] Unique ID to identify an invoice template. Available when the site is on a Pro or Enterprise plan. Used to specify which invoice template, if any, should be used to generate invoices for the account.
59
59
  define_attribute :invoice_template_id, String
60
60
 
61
61
  # @!attribute last_name
@@ -59,7 +59,7 @@ module Recurly
59
59
  define_attribute :id, String
60
60
 
61
61
  # @!attribute invoice_template_id
62
- # @return [String] Unique ID to identify an invoice template. Available when the Invoice Customization feature is enabled. Used to specify which invoice template, if any, should be used to generate invoices for the account.
62
+ # @return [String] Unique ID to identify an invoice template. Available when the site is on a Pro or Enterprise plan. Used to specify which invoice template, if any, should be used to generate invoices for the account.
63
63
  define_attribute :invoice_template_id, String
64
64
 
65
65
  # @!attribute last_name
@@ -47,7 +47,7 @@ module Recurly
47
47
  define_attribute :first_name, String
48
48
 
49
49
  # @!attribute invoice_template_id
50
- # @return [String] Unique ID to identify an invoice template. Available when the Invoice Customization feature is enabled. Used to specify which invoice template, if any, should be used to generate invoices for the account.
50
+ # @return [String] Unique ID to identify an invoice template. Available when the site is on a Pro or Enterprise plan. Used to specify which invoice template, if any, should be used to generate invoices for the account.
51
51
  define_attribute :invoice_template_id, String
52
52
 
53
53
  # @!attribute last_name
@@ -63,7 +63,7 @@ module Recurly
63
63
  define_attribute :optional, :Boolean
64
64
 
65
65
  # @!attribute percentage_tiers
66
- # @return [Array[PercentageTiersByCurrency]] Array of objects which must have at least one set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent. There must be one tier without ending_amount value.
66
+ # @return [Array[PercentageTiersByCurrency]] Array of objects which must have at least one set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent. There must be one tier without an `ending_amount` value which represents the final tier.
67
67
  define_attribute :percentage_tiers, Array, { :item_type => :PercentageTiersByCurrency }
68
68
 
69
69
  # @!attribute plan_id
@@ -83,13 +83,17 @@ module Recurly
83
83
  define_attribute :tier_type, String
84
84
 
85
85
  # @!attribute tiers
86
- # @return [Array[Tier]] If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`. There must be one tier with an `ending_quantity` of 999999999 which is the default if not provided.
86
+ # @return [Array[Tier]] If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`. There must be one tier without an `ending_quantity` value which represents the final tier.
87
87
  define_attribute :tiers, Array, { :item_type => :Tier }
88
88
 
89
89
  # @!attribute usage_percentage
90
90
  # @return [Float] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage, `tier_type` is `flat` and `usage_type` is percentage. Must be omitted otherwise.
91
91
  define_attribute :usage_percentage, Float
92
92
 
93
+ # @!attribute usage_timeframe
94
+ # @return [String] The time at which usage totals are reset for billing purposes. Allows for `tiered` add-ons to accumulate usage over the course of multiple billing periods.
95
+ define_attribute :usage_timeframe, String
96
+
93
97
  # @!attribute usage_type
94
98
  # @return [String] Type of usage, required if `add_on_type` is `usage`. See our [Guide](https://developers.recurly.com/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons.
95
99
  define_attribute :usage_type, String
@@ -11,7 +11,7 @@ module Recurly
11
11
  define_attribute :currency, String
12
12
 
13
13
  # @!attribute tax_inclusive
14
- # @return [Boolean] Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.
14
+ # @return [Boolean] This field is deprecated. Please do not use it.
15
15
  define_attribute :tax_inclusive, :Boolean
16
16
 
17
17
  # @!attribute unit_amount
@@ -55,7 +55,7 @@ module Recurly
55
55
  define_attribute :optional, :Boolean
56
56
 
57
57
  # @!attribute percentage_tiers
58
- # @return [Array[PercentageTiersByCurrency]] `percentage_tiers` is an array of objects, which must have the set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent.
58
+ # @return [Array[PercentageTiersByCurrency]] `percentage_tiers` is an array of objects, which must have the set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent. There must be one tier without an `ending_amount` value which represents the final tier.
59
59
  define_attribute :percentage_tiers, Array, { :item_type => :PercentageTiersByCurrency }
60
60
 
61
61
  # @!attribute revenue_schedule_type
@@ -67,7 +67,7 @@ module Recurly
67
67
  define_attribute :tax_code, String
68
68
 
69
69
  # @!attribute tiers
70
- # @return [Array[Tier]] If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`. There must be one tier without an `ending_quantity` value that represents the final tier.
70
+ # @return [Array[Tier]] If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`. There must be one tier without an `ending_quantity` value which represents the final tier.
71
71
  define_attribute :tiers, Array, { :item_type => :Tier }
72
72
 
73
73
  # @!attribute usage_percentage
@@ -26,6 +26,10 @@ module Recurly
26
26
  # @return [Boolean] The `backup_payment_method` field is used to designate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined. All payment methods, including the billing info marked `primary_payment_method` can be set as a backup. An account can have a maximum of 1 backup, if a user sets a different payment method as a backup, the existing backup will no longer be marked as such.
27
27
  define_attribute :backup_payment_method, :Boolean
28
28
 
29
+ # @!attribute card_type
30
+ # @return [String]
31
+ define_attribute :card_type, String
32
+
29
33
  # @!attribute company
30
34
  # @return [String] Company name
31
35
  define_attribute :company, String
@@ -99,11 +103,11 @@ module Recurly
99
103
  define_attribute :sort_code, String
100
104
 
101
105
  # @!attribute tax_identifier
102
- # @return [String] Tax identifier is required if adding a billing info that is a consumer card in Brazil or in Argentina. This would be the customer's CPF (Brazil) and CUIT (Argentina). CPF and CUIT are tax identifiers for all residents who pay taxes in Brazil and Argentina respectively.
106
+ # @return [String] Tax identifier is required if adding a billing info that is a consumer card in Brazil or in Argentina. This would be the customer's CPF/CNPJ (Brazil) and CUIT (Argentina). CPF, CNPJ and CUIT are tax identifiers for all residents who pay taxes in Brazil and Argentina respectively.
103
107
  define_attribute :tax_identifier, String
104
108
 
105
109
  # @!attribute tax_identifier_type
106
- # @return [String] This field and a value of `cpf` or `cuit` are required if adding a billing info that is an elo or hipercard type in Brazil or in Argentina.
110
+ # @return [String] This field and a value of `cpf`, `cnpj` or `cuit` are required if adding a billing info that is an elo or hipercard type in Brazil or in Argentina.
107
111
  define_attribute :tax_identifier_type, String
108
112
 
109
113
  # @!attribute three_d_secure_action_result_token_id
@@ -7,11 +7,11 @@ module Recurly
7
7
  class PercentageTier < Request
8
8
 
9
9
  # @!attribute ending_amount
10
- # @return [Float] Ending amount for the tier. Allows up to 2 decimal places. The last tier ending_amount is null.
10
+ # @return [Float] Ending amount for the tier. Allows up to 2 decimal places. Must be left empty if it is the final tier.
11
11
  define_attribute :ending_amount, Float
12
12
 
13
13
  # @!attribute usage_percentage
14
- # @return [String] Decimal usage percentage.
14
+ # @return [String] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string.
15
15
  define_attribute :usage_percentage, String
16
16
  end
17
17
  end
@@ -15,7 +15,7 @@ module Recurly
15
15
  define_attribute :setup_fee, Float
16
16
 
17
17
  # @!attribute tax_inclusive
18
- # @return [Boolean] Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.
18
+ # @return [Boolean] This field is deprecated. Please do not use it.
19
19
  define_attribute :tax_inclusive, :Boolean
20
20
 
21
21
  # @!attribute unit_amount
@@ -11,7 +11,7 @@ module Recurly
11
11
  define_attribute :currency, String
12
12
 
13
13
  # @!attribute tax_inclusive
14
- # @return [Boolean] Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.
14
+ # @return [Boolean] This field is deprecated. Please do not use it.
15
15
  define_attribute :tax_inclusive, :Boolean
16
16
 
17
17
  # @!attribute unit_amount
@@ -15,7 +15,7 @@ module Recurly
15
15
  define_attribute :code, String
16
16
 
17
17
  # @!attribute percentage_tiers
18
- # @return [Array[SubscriptionAddOnPercentageTier]] If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be removed and replaced by the percentage tiers in the request. There must be one tier without ending_amount value. Use only if add_on.tier_type is tiered or volume and add_on.usage_type is percentage.
18
+ # @return [Array[SubscriptionAddOnPercentageTier]] If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be removed and replaced by the percentage tiers in the request. There must be one tier without ending_amount value which represents the final tier. Use only if add_on.tier_type is tiered or volume and add_on.usage_type is percentage.
19
19
  define_attribute :percentage_tiers, Array, { :item_type => :SubscriptionAddOnPercentageTier }
20
20
 
21
21
  # @!attribute quantity
@@ -27,7 +27,7 @@ module Recurly
27
27
  define_attribute :revenue_schedule_type, String
28
28
 
29
29
  # @!attribute tiers
30
- # @return [Array[SubscriptionAddOnTier]] If the plan add-on's `tier_type` is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount`. There must be one tier without ending_quantity value. See our [Guide](https://developers.recurly.com/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.
30
+ # @return [Array[SubscriptionAddOnTier]] If the plan add-on's `tier_type` is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount`. There must be one tier without an `ending_quantity` value which represents the final tier. See our [Guide](https://developers.recurly.com/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.
31
31
  define_attribute :tiers, Array, { :item_type => :SubscriptionAddOnTier }
32
32
 
33
33
  # @!attribute unit_amount
@@ -7,11 +7,11 @@ module Recurly
7
7
  class SubscriptionAddOnPercentageTier < Request
8
8
 
9
9
  # @!attribute ending_amount
10
- # @return [Float] Ending amount
10
+ # @return [Float] Ending amount for the tier. Allows up to 2 decimal places. Must be left empty if it is the final tier.
11
11
  define_attribute :ending_amount, Float
12
12
 
13
13
  # @!attribute usage_percentage
14
- # @return [String] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string. A value between 0.0 and 100.0.
14
+ # @return [String] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string.
15
15
  define_attribute :usage_percentage, String
16
16
  end
17
17
  end
@@ -7,7 +7,7 @@ module Recurly
7
7
  class SubscriptionAddOnTier < Request
8
8
 
9
9
  # @!attribute ending_quantity
10
- # @return [Integer] Ending quantity
10
+ # @return [Integer] Ending quantity for the tier. This represents a unit amount for unit-priced add ons. Must be left empty if it is the final tier.
11
11
  define_attribute :ending_quantity, Integer
12
12
 
13
13
  # @!attribute unit_amount
@@ -18,6 +18,10 @@ module Recurly
18
18
  # @return [String] When an id is provided, the existing subscription add-on attributes will persist unless overridden in the request.
19
19
  define_attribute :id, String
20
20
 
21
+ # @!attribute percentage_tiers
22
+ # @return [Array[SubscriptionAddOnPercentageTier]] If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be removed and replaced by the percentage tiers in the request. Use only if add_on.tier_type is tiered or volume and add_on.usage_type is percentage. There must be one tier without an `ending_amount` value which represents the final tier.
23
+ define_attribute :percentage_tiers, Array, { :item_type => :SubscriptionAddOnPercentageTier }
24
+
21
25
  # @!attribute quantity
22
26
  # @return [Integer] Quantity
23
27
  define_attribute :quantity, Integer
@@ -27,7 +31,7 @@ module Recurly
27
31
  define_attribute :revenue_schedule_type, String
28
32
 
29
33
  # @!attribute tiers
30
- # @return [Array[SubscriptionAddOnTier]] If the plan add-on's `tier_type` is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount`. There must be one tier with an `ending_quantity` of 999999999 which is the default if not provided.
34
+ # @return [Array[SubscriptionAddOnTier]] If the plan add-on's `tier_type` is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount`. There must be one tier without an `ending_quantity` value which represents the final tier.
31
35
  define_attribute :tiers, Array, { :item_type => :SubscriptionAddOnTier }
32
36
 
33
37
  # @!attribute unit_amount
@@ -55,7 +55,7 @@ module Recurly
55
55
  define_attribute :shipping, :SubscriptionChangeShippingCreate
56
56
 
57
57
  # @!attribute tax_inclusive
58
- # @return [Boolean] Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.
58
+ # @return [Boolean] This field is deprecated. Please do not use it.
59
59
  define_attribute :tax_inclusive, :Boolean
60
60
 
61
61
  # @!attribute timeframe
@@ -59,7 +59,7 @@ module Recurly
59
59
  define_attribute :shipping, :SubscriptionShippingUpdate
60
60
 
61
61
  # @!attribute tax_inclusive
62
- # @return [Boolean] This field is deprecated. Do not use it anymore to update a subscription's tax inclusivity. Use the POST subscription change route instead.
62
+ # @return [Boolean] This field is deprecated. Please do not use it.
63
63
  define_attribute :tax_inclusive, :Boolean
64
64
 
65
65
  # @!attribute terms_and_conditions
@@ -11,7 +11,7 @@ module Recurly
11
11
  define_attribute :currencies, Array, { :item_type => :TierPricing }
12
12
 
13
13
  # @!attribute ending_quantity
14
- # @return [Integer] Ending quantity for the tier. This represents a unit amount for unit-priced add ons.
14
+ # @return [Integer] Ending quantity for the tier. This represents a unit amount for unit-priced add ons. Must be left empty if it is the final tier.
15
15
  define_attribute :ending_quantity, Integer
16
16
 
17
17
  # @!attribute usage_percentage
@@ -91,7 +91,7 @@ module Recurly
91
91
  define_attribute :id, String
92
92
 
93
93
  # @!attribute invoice_template_id
94
- # @return [String] Unique ID to identify an invoice template. Available when the Invoice Customization feature is enabled. Used to specify if a non-default invoice template will be used to generate invoices for the account. For sites without multiple invoice templates enabled, the default template will always be used.
94
+ # @return [String] Unique ID to identify an invoice template. Available when the site is on a Pro or Enterprise plan. Used to specify if a non-default invoice template will be used to generate invoices for the account. For sites without multiple invoice templates enabled, the default template will always be used.
95
95
  define_attribute :invoice_template_id, String
96
96
 
97
97
  # @!attribute last_name
@@ -13,6 +13,10 @@ module Recurly
13
13
  # @!attribute currency
14
14
  # @return [String] 3-letter ISO 4217 currency code.
15
15
  define_attribute :currency, String
16
+
17
+ # @!attribute processing_prepayment_amount
18
+ # @return [Float] Total amount for the prepayment credit invoices in a `processing` state on the account.
19
+ define_attribute :processing_prepayment_amount, Float
16
20
  end
17
21
  end
18
22
  end
@@ -110,6 +110,10 @@ module Recurly
110
110
  # @return [Float] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0.
111
111
  define_attribute :usage_percentage, Float
112
112
 
113
+ # @!attribute usage_timeframe
114
+ # @return [String] The time at which usage totals are reset for billing purposes.
115
+ define_attribute :usage_timeframe, String
116
+
113
117
  # @!attribute usage_type
114
118
  # @return [String] Type of usage, returns usage type if `add_on_type` is `usage`.
115
119
  define_attribute :usage_type, String
@@ -11,7 +11,7 @@ module Recurly
11
11
  define_attribute :currency, String
12
12
 
13
13
  # @!attribute tax_inclusive
14
- # @return [Boolean] Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.
14
+ # @return [Boolean] This field is deprecated. Please do not use it.
15
15
  define_attribute :tax_inclusive, :Boolean
16
16
 
17
17
  # @!attribute unit_amount
@@ -174,6 +174,10 @@ module Recurly
174
174
  # @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
175
  define_attribute :tax_exempt, :Boolean
176
176
 
177
+ # @!attribute tax_inclusive
178
+ # @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.
179
+ define_attribute :tax_inclusive, :Boolean
180
+
177
181
  # @!attribute tax_info
178
182
  # @return [TaxInfo] Tax info
179
183
  define_attribute :tax_info, :TaxInfo
@@ -7,11 +7,11 @@ module Recurly
7
7
  class PercentageTier < Resource
8
8
 
9
9
  # @!attribute ending_amount
10
- # @return [Float] Ending amount for the tier. Allows up to 2 decimal places. The last tier ending_amount is null.
10
+ # @return [Float] Ending amount for the tier. Allows up to 2 decimal places. Must be left empty if it is the final tier.
11
11
  define_attribute :ending_amount, Float
12
12
 
13
13
  # @!attribute usage_percentage
14
- # @return [String] Decimal usage percentage.
14
+ # @return [String] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string.
15
15
  define_attribute :usage_percentage, String
16
16
  end
17
17
  end
@@ -15,7 +15,7 @@ module Recurly
15
15
  define_attribute :setup_fee, Float
16
16
 
17
17
  # @!attribute tax_inclusive
18
- # @return [Boolean] Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.
18
+ # @return [Boolean] This field is deprecated. Please do not use it.
19
19
  define_attribute :tax_inclusive, :Boolean
20
20
 
21
21
  # @!attribute unit_amount
@@ -11,7 +11,7 @@ module Recurly
11
11
  define_attribute :currency, String
12
12
 
13
13
  # @!attribute tax_inclusive
14
- # @return [Boolean] Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.
14
+ # @return [Boolean] This field is deprecated. Please do not use it.
15
15
  define_attribute :tax_inclusive, :Boolean
16
16
 
17
17
  # @!attribute unit_amount
@@ -14,6 +14,10 @@ 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
+
17
21
  # @!attribute add_ons
18
22
  # @return [Array[SubscriptionAddOn]] Add-ons
19
23
  define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOn }
@@ -154,6 +158,10 @@ module Recurly
154
158
  # @return [Float] Estimated tax
155
159
  define_attribute :tax, Float
156
160
 
161
+ # @!attribute tax_inclusive
162
+ # @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.
163
+ define_attribute :tax_inclusive, :Boolean
164
+
157
165
  # @!attribute tax_info
158
166
  # @return [TaxInfo] Tax info
159
167
  define_attribute :tax_info, :TaxInfo
@@ -31,7 +31,7 @@ module Recurly
31
31
  define_attribute :object, String
32
32
 
33
33
  # @!attribute percentage_tiers
34
- # @return [Array[SubscriptionAddOnPercentageTier]] If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be removed and replaced by the percentage tiers in the request. Use only if add_on.tier_type is tiered or volume and add_on.usage_type is percentage
34
+ # @return [Array[SubscriptionAddOnPercentageTier]] If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be removed and replaced by the percentage tiers in the request. Use only if add_on.tier_type is tiered or volume and add_on.usage_type is percentage. There must be one tier without an `ending_amount` value which represents the final tier.
35
35
  define_attribute :percentage_tiers, Array, { :item_type => :SubscriptionAddOnPercentageTier }
36
36
 
37
37
  # @!attribute quantity
@@ -51,7 +51,7 @@ module Recurly
51
51
  define_attribute :tier_type, String
52
52
 
53
53
  # @!attribute tiers
54
- # @return [Array[SubscriptionAddOnTier]] If tiers are provided in the request, all existing tiers on the Subscription Add-on will be removed and replaced by the tiers in the request. If add_on.tier_type is tiered or volume and add_on.usage_type is percentage use percentage_tiers instead.
54
+ # @return [Array[SubscriptionAddOnTier]] If tiers are provided in the request, all existing tiers on the Subscription Add-on will be removed and replaced by the tiers in the request. If add_on.tier_type is tiered or volume and add_on.usage_type is percentage use percentage_tiers instead. There must be one tier without an `ending_quantity` value which represents the final tier.
55
55
  define_attribute :tiers, Array, { :item_type => :SubscriptionAddOnTier }
56
56
 
57
57
  # @!attribute unit_amount
@@ -69,6 +69,10 @@ module Recurly
69
69
  # @!attribute usage_percentage
70
70
  # @return [Float] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if add_on_type is usage and usage_type is percentage.
71
71
  define_attribute :usage_percentage, Float
72
+
73
+ # @!attribute usage_timeframe
74
+ # @return [String] The time at which usage totals are reset for billing purposes.
75
+ define_attribute :usage_timeframe, String
72
76
  end
73
77
  end
74
78
  end
@@ -7,11 +7,11 @@ module Recurly
7
7
  class SubscriptionAddOnPercentageTier < Resource
8
8
 
9
9
  # @!attribute ending_amount
10
- # @return [Float] Ending amount
10
+ # @return [Float] Ending amount for the tier. Allows up to 2 decimal places. Must be left empty if it is the final tier.
11
11
  define_attribute :ending_amount, Float
12
12
 
13
13
  # @!attribute usage_percentage
14
- # @return [String] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string. A value between 0.0 and 100.0.
14
+ # @return [String] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string.
15
15
  define_attribute :usage_percentage, String
16
16
  end
17
17
  end
@@ -7,7 +7,7 @@ module Recurly
7
7
  class SubscriptionAddOnTier < Resource
8
8
 
9
9
  # @!attribute ending_quantity
10
- # @return [Integer] Ending quantity
10
+ # @return [Integer] Ending quantity for the tier. This represents a unit amount for unit-priced add ons. Must be left empty if it is the final tier.
11
11
  define_attribute :ending_quantity, Integer
12
12
 
13
13
  # @!attribute unit_amount
@@ -67,7 +67,7 @@ module Recurly
67
67
  define_attribute :subscription_id, String
68
68
 
69
69
  # @!attribute tax_inclusive
70
- # @return [Boolean] Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.
70
+ # @return [Boolean] This field is deprecated. Please do not use it.
71
71
  define_attribute :tax_inclusive, :Boolean
72
72
 
73
73
  # @!attribute unit_amount
@@ -11,7 +11,7 @@ module Recurly
11
11
  define_attribute :currencies, Array, { :item_type => :TierPricing }
12
12
 
13
13
  # @!attribute ending_quantity
14
- # @return [Integer] Ending quantity for the tier. This represents a unit amount for unit-priced add ons.
14
+ # @return [Integer] Ending quantity for the tier. This represents a unit amount for unit-priced add ons. Must be left empty if it is the final tier.
15
15
  define_attribute :ending_quantity, Integer
16
16
 
17
17
  # @!attribute usage_percentage
@@ -1,3 +1,3 @@
1
1
  module Recurly
2
- VERSION = "4.15.0"
2
+ VERSION = "4.19.0"
3
3
  end
data/openapi/api.yaml CHANGED
@@ -12519,7 +12519,97 @@ paths:
12519
12519
  application/json:
12520
12520
  schema:
12521
12521
  "$ref": "#/components/schemas/Error"
12522
- x-code-samples: []
12522
+ x-code-samples:
12523
+ - lang: Node.js
12524
+ source: |
12525
+ try {
12526
+ const invoiceCollection = await client.getPreviewRenewal(subscriptionId)
12527
+ console.log('Fetched Renewal Preview with total: ', invoiceCollection.chargeInvoice.total)
12528
+ } catch (err) {
12529
+ if (err instanceof recurly.errors.NotFoundError) {
12530
+ // If the request was not found, you may want to alert the user or
12531
+ // just return null
12532
+ console.log('Resource Not Found')
12533
+ } else {
12534
+ // If we don't know what to do with the err, we should
12535
+ // probably re-raise and let our web framework and logger handle it
12536
+ console.log('Unknown Error: ', err)
12537
+ }
12538
+ }
12539
+ - lang: Python
12540
+ source: |
12541
+ try:
12542
+ invoice_collection = client.get_preview_renewal(subscription_id)
12543
+ print("Fetched Renewal Preview with total: %s" % invoice_collection.charge_invoice.total)
12544
+ except recurly.errors.NotFoundError:
12545
+ # If the resource was not found, you may want to alert the user or
12546
+ # just return nil
12547
+ print("Resource Not Found")
12548
+ - lang: ".NET"
12549
+ source: |
12550
+ try
12551
+ {
12552
+ InvoiceCollection invoiceCollection = client.GetPreviewRenewal(subscriptionId);
12553
+ Console.WriteLine($"Fetched Renewal Preview with total {invoiceCollection.ChargeInvoice.Total}");
12554
+ }
12555
+ catch (Recurly.Errors.NotFound ex)
12556
+ {
12557
+ // If the resource was not found
12558
+ // we may want to alert the user or just return null
12559
+ Console.WriteLine($"Resource Not Found: {ex.Error.Message}");
12560
+ }
12561
+ catch (Recurly.Errors.ApiError ex)
12562
+ {
12563
+ // Use ApiError to catch a generic error from the API
12564
+ Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}");
12565
+ }
12566
+ - lang: Ruby
12567
+ source: |
12568
+ begin
12569
+ invoice_collection = @client.get_preview_renewal(
12570
+ subscription_id: subscription_id
12571
+ )
12572
+ puts "Fetched Renewal Preview with total: #{invoice_collection.charge_invoice.total}"
12573
+ rescue Recurly::Errors::NotFoundError
12574
+ # If the resource was not found, you may want to alert the user or
12575
+ # just return nil
12576
+ puts "Resource Not Found"
12577
+ end
12578
+ - lang: Java
12579
+ source: |
12580
+ try {
12581
+ final InvoiceCollection invoiceCollection = client.getPreviewRenewal(subscriptionId);
12582
+ System.out.println("Fetched Renewal Preview with total: " + invoiceCollection.getChargeInvoice().getTotal());
12583
+ } catch (ValidationException e) {
12584
+ // If the request was not valid, you may want to tell your user
12585
+ // why. You can find the invalid params and reasons in e.getError().getParams()
12586
+ System.out.println("Failed validation: " + e.getError().getMessage());
12587
+ } catch (ApiException e) {
12588
+ // Use ApiException to catch a generic error from the API
12589
+ System.out.println("Unexpected Recurly Error: " + e.getError().getMessage());
12590
+ }
12591
+ - lang: PHP
12592
+ source: |
12593
+ try {
12594
+ $invoiceCollection = $client->getPreviewRenewal($subscription_id);
12595
+
12596
+ echo 'Fetched Renewal Preview with total: ' . $invoiceCollection->getChargeInvoice()->getTotal() . PHP_EOL;
12597
+ var_dump($invoiceCollection);
12598
+ } catch (\Recurly\Errors\NotFound $e) {
12599
+ // Could not find the resource, you may want to inform the user
12600
+ // or just return a NULL
12601
+ echo 'Could not find resource.' . PHP_EOL;
12602
+ var_dump($e);
12603
+ } catch (\Recurly\RecurlyError $e) {
12604
+ // Something bad happened... tell the user so that they can fix it?
12605
+ echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL;
12606
+ }
12607
+ - lang: Go
12608
+ source: "invoiceCollection, err := client.GetPreviewRenewal(subID)\nif e,
12609
+ ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeNotFound
12610
+ {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected
12611
+ Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Fetched Renewal
12612
+ Preview with total: %f\", invoiceCollection.ChargeInvoice.Total)"
12523
12613
  "/subscriptions/{subscription_id}/change":
12524
12614
  get:
12525
12615
  tags:
@@ -15852,7 +15942,7 @@ components:
15852
15942
  type: string
15853
15943
  title: Invoice Template ID
15854
15944
  description: Unique ID to identify an invoice template. Available when
15855
- the Invoice Customization feature is enabled. Used to specify which invoice
15945
+ the site is on a Pro or Enterprise plan. Used to specify which invoice
15856
15946
  template, if any, should be used to generate invoices for the account.
15857
15947
  address:
15858
15948
  "$ref": "#/components/schemas/Address"
@@ -15935,7 +16025,7 @@ components:
15935
16025
  type: string
15936
16026
  title: Invoice Template ID
15937
16027
  description: Unique ID to identify an invoice template. Available when the
15938
- Invoice Customization feature is enabled. Used to specify if a non-default
16028
+ site is on a Pro or Enterprise plan. Used to specify if a non-default
15939
16029
  invoice template will be used to generate invoices for the account. For
15940
16030
  sites without multiple invoice templates enabled, the default template
15941
16031
  will always be used.
@@ -16040,6 +16130,12 @@ components:
16040
16130
  format: float
16041
16131
  title: Amount
16042
16132
  description: Total amount the account is past due.
16133
+ processing_prepayment_amount:
16134
+ type: number
16135
+ format: float
16136
+ title: Amount
16137
+ description: Total amount for the prepayment credit invoices in a `processing`
16138
+ state on the account.
16043
16139
  InvoiceAddress:
16044
16140
  allOf:
16045
16141
  - "$ref": "#/components/schemas/Address"
@@ -16265,6 +16361,8 @@ components:
16265
16361
  readOnly: true
16266
16362
  tier_type:
16267
16363
  "$ref": "#/components/schemas/TierTypeEnum"
16364
+ usage_timeframe:
16365
+ "$ref": "#/components/schemas/UsageTimeframeEnum"
16268
16366
  tiers:
16269
16367
  type: array
16270
16368
  title: Tiers
@@ -16443,6 +16541,8 @@ components:
16443
16541
  * Must be absent if `add_on_type` is `usage` and `usage_type` is `percentage`.
16444
16542
  tier_type:
16445
16543
  "$ref": "#/components/schemas/TierTypeEnum"
16544
+ usage_timeframe:
16545
+ "$ref": "#/components/schemas/UsageTimeframeCreateEnum"
16446
16546
  tiers:
16447
16547
  type: array
16448
16548
  title: Tiers
@@ -16451,8 +16551,8 @@ components:
16451
16551
  description: |
16452
16552
  If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object
16453
16553
  must include one to many tiers with `ending_quantity` and `unit_amount` for
16454
- the desired `currencies`. There must be one tier with an `ending_quantity`
16455
- of 999999999 which is the default if not provided.
16554
+ the desired `currencies`. There must be one tier without an `ending_quantity` value
16555
+ which represents the final tier.
16456
16556
  percentage_tiers:
16457
16557
  type: array
16458
16558
  title: Percentage Tiers By Currency
@@ -16461,7 +16561,8 @@ components:
16461
16561
  description: |
16462
16562
  Array of objects which must have at least one set of tiers
16463
16563
  per currency and the currency code. The tier_type must be `volume` or `tiered`,
16464
- if not, it must be absent. There must be one tier without ending_amount value.
16564
+ if not, it must be absent. There must be one tier without an `ending_amount` value
16565
+ which represents the final tier.
16465
16566
  required:
16466
16567
  - code
16467
16568
  - name
@@ -16590,7 +16691,7 @@ components:
16590
16691
  If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object
16591
16692
  must include one to many tiers with `ending_quantity` and `unit_amount` for
16592
16693
  the desired `currencies`. There must be one tier without an `ending_quantity` value
16593
- that represents the final tier.
16694
+ which represents the final tier.
16594
16695
  percentage_tiers:
16595
16696
  type: array
16596
16697
  title: Percentage Tiers By Currency
@@ -16599,7 +16700,8 @@ components:
16599
16700
  description: |
16600
16701
  `percentage_tiers` is an array of objects, which must have the set of tiers
16601
16702
  per currency and the currency code. The tier_type must be `volume` or `tiered`,
16602
- if not, it must be absent.
16703
+ if not, it must be absent. There must be one tier without an `ending_amount` value
16704
+ which represents the final tier.
16603
16705
  BillingInfo:
16604
16706
  type: object
16605
16707
  properties:
@@ -16799,11 +16901,12 @@ components:
16799
16901
  type: string
16800
16902
  description: Tax identifier is required if adding a billing info that is
16801
16903
  a consumer card in Brazil or in Argentina. This would be the customer's
16802
- CPF (Brazil) and CUIT (Argentina). CPF and CUIT are tax identifiers for
16803
- all residents who pay taxes in Brazil and Argentina respectively.
16904
+ CPF/CNPJ (Brazil) and CUIT (Argentina). CPF, CNPJ and CUIT are tax identifiers
16905
+ for all residents who pay taxes in Brazil and Argentina respectively.
16804
16906
  tax_identifier_type:
16805
- description: This field and a value of `cpf` or `cuit` are required if adding
16806
- a billing info that is an elo or hipercard type in Brazil or in Argentina.
16907
+ description: This field and a value of `cpf`, `cnpj` or `cuit` are required
16908
+ if adding a billing info that is an elo or hipercard type in Brazil or
16909
+ in Argentina.
16807
16910
  "$ref": "#/components/schemas/TaxIdentifierTypeEnum"
16808
16911
  primary_payment_method:
16809
16912
  type: boolean
@@ -16828,6 +16931,8 @@ components:
16828
16931
  "$ref": "#/components/schemas/ExternalHppTypeEnum"
16829
16932
  online_banking_payment_type:
16830
16933
  "$ref": "#/components/schemas/OnlineBankingPaymentTypeEnum"
16934
+ card_type:
16935
+ "$ref": "#/components/schemas/CardTypeEnum"
16831
16936
  BillingInfoVerify:
16832
16937
  type: object
16833
16938
  properties:
@@ -18477,6 +18582,12 @@ components:
18477
18582
  type: string
18478
18583
  title: Unit amount decimal
18479
18584
  description: Positive amount for a charge, negative amount for a credit.
18585
+ tax_inclusive:
18586
+ type: boolean
18587
+ title: Tax Inclusive?
18588
+ description: Determines whether or not tax is included in the unit amount.
18589
+ The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing
18590
+ feature) must be enabled to utilize this flag.
18480
18591
  subtotal:
18481
18592
  type: number
18482
18593
  format: float
@@ -19137,9 +19248,8 @@ components:
19137
19248
  type: boolean
19138
19249
  title: Tax Inclusive?
19139
19250
  default: false
19140
- description: Determines whether or not tax is included in the unit amount.
19141
- The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing
19142
- feature) must be enabled to use this flag.
19251
+ description: This field is deprecated. Please do not use it.
19252
+ deprecated: true
19143
19253
  PlanUpdate:
19144
19254
  type: object
19145
19255
  properties:
@@ -19301,9 +19411,8 @@ components:
19301
19411
  type: boolean
19302
19412
  title: Tax Inclusive?
19303
19413
  default: false
19304
- description: Determines whether or not tax is included in the unit amount.
19305
- The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing
19306
- feature) must be enabled to use this flag.
19414
+ description: This field is deprecated. Please do not use it.
19415
+ deprecated: true
19307
19416
  required:
19308
19417
  - currency
19309
19418
  TierPricing:
@@ -19350,9 +19459,8 @@ components:
19350
19459
  type: boolean
19351
19460
  title: Tax Inclusive?
19352
19461
  default: false
19353
- description: Determines whether or not tax is included in the unit amount.
19354
- The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing
19355
- feature) must be enabled to use this flag.
19462
+ description: This field is deprecated. Please do not use it.
19463
+ deprecated: true
19356
19464
  required:
19357
19465
  - currency
19358
19466
  - unit_amount
@@ -19362,11 +19470,11 @@ components:
19362
19470
  ending_quantity:
19363
19471
  type: integer
19364
19472
  title: Ending quantity
19365
- description: Ending quantity for the tier. This represents a unit amount
19366
- for unit-priced add ons.
19367
19473
  minimum: 1
19368
19474
  maximum: 999999999
19369
- default: 999999999
19475
+ default:
19476
+ description: Ending quantity for the tier. This represents a unit amount
19477
+ for unit-priced add ons. Must be left empty if it is the final tier.
19370
19478
  usage_percentage:
19371
19479
  type: string
19372
19480
  title: Usage Percentage
@@ -19399,14 +19507,19 @@ components:
19399
19507
  type: number
19400
19508
  format: float
19401
19509
  title: Ending amount
19402
- minimum: 0.1
19403
- maximum: 9999999999999
19510
+ minimum: 0.01
19511
+ maximum: 9999999999999.99
19512
+ default:
19404
19513
  description: Ending amount for the tier. Allows up to 2 decimal places.
19405
- The last tier ending_amount is null.
19514
+ Must be left empty if it is the final tier.
19406
19515
  usage_percentage:
19407
19516
  type: string
19408
19517
  title: Usage Percentage
19409
- description: Decimal usage percentage.
19518
+ minimum: 0
19519
+ maximum: 100
19520
+ description: |
19521
+ The percentage taken of the monetary amount of usage tracked.
19522
+ This can be up to 4 decimal places represented as a string.
19410
19523
  Settings:
19411
19524
  type: object
19412
19525
  properties:
@@ -19954,6 +20067,12 @@ components:
19954
20067
  type: number
19955
20068
  format: float
19956
20069
  title: Subscription unit price
20070
+ tax_inclusive:
20071
+ type: boolean
20072
+ title: Tax Inclusive?
20073
+ description: Determines whether or not tax is included in the unit amount.
20074
+ The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing
20075
+ feature) must be enabled to utilize this flag.
19957
20076
  quantity:
19958
20077
  type: integer
19959
20078
  title: Subscription quantity
@@ -20052,6 +20171,13 @@ components:
20052
20171
  type: string
20053
20172
  title: Billing Info ID
20054
20173
  description: Billing Info ID.
20174
+ active_invoice_id:
20175
+ type: string
20176
+ title: Active invoice ID
20177
+ description: The invoice ID of the latest invoice created for an active
20178
+ subscription.
20179
+ maxLength: 13
20180
+ readOnly: true
20055
20181
  SubscriptionAddOn:
20056
20182
  type: object
20057
20183
  title: Subscription Add-on
@@ -20091,16 +20217,19 @@ components:
20091
20217
  "$ref": "#/components/schemas/RevenueScheduleTypeEnum"
20092
20218
  tier_type:
20093
20219
  "$ref": "#/components/schemas/TierTypeEnum"
20220
+ usage_timeframe:
20221
+ "$ref": "#/components/schemas/UsageTimeframeEnum"
20094
20222
  tiers:
20095
20223
  type: array
20096
20224
  title: Tiers
20097
20225
  items:
20098
20226
  "$ref": "#/components/schemas/SubscriptionAddOnTier"
20099
20227
  minItems: 1
20100
- description: |
20101
- If tiers are provided in the request, all existing tiers on the Subscription Add-on will be
20102
- removed and replaced by the tiers in the request. If add_on.tier_type is tiered or volume and
20103
- add_on.usage_type is percentage use percentage_tiers instead.
20228
+ description: "If tiers are provided in the request, all existing tiers on
20229
+ the Subscription Add-on will be\nremoved and replaced by the tiers in
20230
+ the request. If add_on.tier_type is tiered or volume and\nadd_on.usage_type
20231
+ is percentage use percentage_tiers instead. \nThere must be one tier without
20232
+ an `ending_quantity` value which represents the final tier.\n"
20104
20233
  percentage_tiers:
20105
20234
  type: array
20106
20235
  title: Percentage Tiers
@@ -20110,7 +20239,8 @@ components:
20110
20239
  description: |
20111
20240
  If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be
20112
20241
  removed and replaced by the percentage tiers in the request. Use only if add_on.tier_type is tiered or volume and
20113
- add_on.usage_type is percentage
20242
+ add_on.usage_type is percentage.
20243
+ There must be one tier without an `ending_amount` value which represents the final tier.
20114
20244
  usage_percentage:
20115
20245
  type: number
20116
20246
  format: float
@@ -20176,7 +20306,7 @@ components:
20176
20306
  description: |
20177
20307
  If the plan add-on's `tier_type` is `flat`, then `tiers` must be absent. The `tiers` object
20178
20308
  must include one to many tiers with `ending_quantity` and `unit_amount`.
20179
- There must be one tier without ending_quantity value.
20309
+ There must be one tier without an `ending_quantity` value which represents the final tier.
20180
20310
  See our [Guide](https://developers.recurly.com/guides/item-addon-guide.html)
20181
20311
  for an overview of how to configure quantity-based pricing models.
20182
20312
  percentage_tiers:
@@ -20187,12 +20317,14 @@ components:
20187
20317
  minItems: 1
20188
20318
  description: |
20189
20319
  If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be
20190
- removed and replaced by the percentage tiers in the request. There must be one tier without ending_amount value.
20320
+ removed and replaced by the percentage tiers in the request. There must be one tier without ending_amount value which represents the final tier.
20191
20321
  Use only if add_on.tier_type is tiered or volume and add_on.usage_type is percentage.
20192
20322
  usage_percentage:
20193
20323
  type: number
20194
20324
  format: float
20195
20325
  title: Usage Percentage
20326
+ minimum: 0
20327
+ maximum: 100
20196
20328
  description: The percentage taken of the monetary amount of usage tracked.
20197
20329
  This can be up to 4 decimal places. A value between 0.0 and 100.0. Required
20198
20330
  if `add_on_type` is usage and `usage_type` is percentage. Must be omitted
@@ -20255,8 +20387,18 @@ components:
20255
20387
  description: |
20256
20388
  If the plan add-on's `tier_type` is `flat`, then `tiers` must be absent. The `tiers` object
20257
20389
  must include one to many tiers with `ending_quantity` and `unit_amount`.
20258
- There must be one tier with an `ending_quantity` of 999999999 which is the
20259
- default if not provided.
20390
+ There must be one tier without an `ending_quantity` value which represents the final tier.
20391
+ percentage_tiers:
20392
+ type: array
20393
+ title: Percentage Tiers
20394
+ items:
20395
+ "$ref": "#/components/schemas/SubscriptionAddOnPercentageTier"
20396
+ minItems: 1
20397
+ description: |
20398
+ If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be
20399
+ removed and replaced by the percentage tiers in the request. Use only if add_on.tier_type is tiered or volume and
20400
+ add_on.usage_type is percentage.
20401
+ There must be one tier without an `ending_amount` value which represents the final tier.
20260
20402
  usage_percentage:
20261
20403
  type: number
20262
20404
  format: float
@@ -20276,6 +20418,8 @@ components:
20276
20418
  minimum: 1
20277
20419
  maximum: 999999999
20278
20420
  default:
20421
+ description: Ending quantity for the tier. This represents a unit amount
20422
+ for unit-priced add ons. Must be left empty if it is the final tier.
20279
20423
  unit_amount:
20280
20424
  type: number
20281
20425
  format: float
@@ -20307,13 +20451,16 @@ components:
20307
20451
  minimum: 1
20308
20452
  maximum: 9999999999999.99
20309
20453
  default:
20454
+ description: Ending amount for the tier. Allows up to 2 decimal places.
20455
+ Must be left empty if it is the final tier.
20310
20456
  usage_percentage:
20311
20457
  type: string
20312
20458
  title: Usage Percentage
20459
+ minimum: 0
20460
+ maximum: 100
20313
20461
  description: |
20314
20462
  The percentage taken of the monetary amount of usage tracked.
20315
- This can be up to 4 decimal places represented as a string. A value between
20316
- 0.0 and 100.0.
20463
+ This can be up to 4 decimal places represented as a string.
20317
20464
  SubscriptionCancel:
20318
20465
  type: object
20319
20466
  properties:
@@ -20358,9 +20505,8 @@ components:
20358
20505
  type: boolean
20359
20506
  title: Tax Inclusive?
20360
20507
  default: false
20361
- description: Determines whether or not tax is included in the unit amount.
20362
- The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing
20363
- feature) must be enabled to use this flag.
20508
+ description: This field is deprecated. Please do not use it.
20509
+ deprecated: true
20364
20510
  quantity:
20365
20511
  type: integer
20366
20512
  title: Subscription quantity
@@ -20452,9 +20598,8 @@ components:
20452
20598
  type: boolean
20453
20599
  title: Tax Inclusive?
20454
20600
  default: false
20455
- description: Determines whether or not tax is included in the unit amount.
20456
- The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing
20457
- feature) must be enabled to use this flag.
20601
+ description: This field is deprecated. Please do not use it.
20602
+ deprecated: true
20458
20603
  quantity:
20459
20604
  type: integer
20460
20605
  title: Quantity
@@ -20893,9 +21038,7 @@ components:
20893
21038
  type: boolean
20894
21039
  title: Tax Inclusive?
20895
21040
  default: false
20896
- description: This field is deprecated. Do not use it anymore to update a
20897
- subscription's tax inclusivity. Use the POST subscription change route
20898
- instead.
21041
+ description: This field is deprecated. Please do not use it.
20899
21042
  deprecated: true
20900
21043
  shipping:
20901
21044
  "$ref": "#/components/schemas/SubscriptionShippingUpdate"
@@ -22035,11 +22178,13 @@ components:
22035
22178
  - ko-KR
22036
22179
  - nl-BE
22037
22180
  - nl-NL
22181
+ - pl-PL
22038
22182
  - pt-BR
22039
22183
  - pt-PT
22040
22184
  - ro-RO
22041
22185
  - ru-RU
22042
22186
  - sk-SK
22187
+ - sv-SE
22043
22188
  - tr-TR
22044
22189
  - zh-CN
22045
22190
  BillToEnum:
@@ -22150,6 +22295,25 @@ components:
22150
22295
  - tiered
22151
22296
  - stairstep
22152
22297
  - volume
22298
+ UsageTimeframeEnum:
22299
+ type: string
22300
+ title: Usage Timeframe
22301
+ description: The time at which usage totals are reset for billing purposes.
22302
+ enum:
22303
+ - billing_period
22304
+ - subscription_term
22305
+ default: billing_period
22306
+ UsageTimeframeCreateEnum:
22307
+ type: string
22308
+ title: Usage Timeframe
22309
+ description: |
22310
+ The time at which usage totals are reset for billing purposes.
22311
+ Allows for `tiered` add-ons to accumulate usage over the course of multiple
22312
+ billing periods.
22313
+ enum:
22314
+ - billing_period
22315
+ - subscription_term
22316
+ default: billing_period
22153
22317
  CreditPaymentActionEnum:
22154
22318
  type: string
22155
22319
  enum:
@@ -22632,6 +22796,7 @@ components:
22632
22796
  - three_d_secure_connection_error
22633
22797
  - three_d_secure_credential_error
22634
22798
  - three_d_secure_not_supported
22799
+ - too_busy
22635
22800
  - too_many_attempts
22636
22801
  - total_credit_exceeds_capture
22637
22802
  - transaction_already_refunded
@@ -22693,6 +22858,7 @@ components:
22693
22858
  type: string
22694
22859
  enum:
22695
22860
  - cpf
22861
+ - cnpj
22696
22862
  - cuit
22697
22863
  DunningCycleTypeEnum:
22698
22864
  type: string
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: 4.15.0
4
+ version: 4.19.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-03-14 00:00:00.000000000 Z
11
+ date: 2022-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -119,10 +119,10 @@ files:
119
119
  - ".changelog_config.yaml"
120
120
  - ".github/ISSUE_TEMPLATE/bug-report.md"
121
121
  - ".github/ISSUE_TEMPLATE/question-or-other.md"
122
+ - ".github/workflows/ci.yml"
122
123
  - ".github/workflows/docs.yml"
123
124
  - ".gitignore"
124
125
  - ".rspec"
125
- - ".travis.yml"
126
126
  - ".yardopts"
127
127
  - CHANGELOG.md
128
128
  - CODE_OF_CONDUCT.md
@@ -309,7 +309,7 @@ metadata:
309
309
  changelog_uri: https://github.com/recurly/recurly-client-ruby/blob/master/CHANGELOG.md
310
310
  documentation_uri: https://recurly.github.io/recurly-client-ruby/
311
311
  homepage_uri: https://github.com/recurly/recurly-client-ruby
312
- source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.15.0
312
+ source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.19.0
313
313
  post_install_message:
314
314
  rdoc_options: []
315
315
  require_paths:
data/.travis.yml DELETED
@@ -1,16 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.4
5
- - 2.5
6
- - 2.6
7
- - 2.7
8
- - 3.0
9
- bundler_args: --binstubs
10
- before_install:
11
- - sudo apt-get update && sudo apt-get install apt-transport-https ca-certificates -y && sudo update-ca-certificates
12
- - gem update --system
13
- - gem install bundler
14
- dist: focal
15
- script:
16
- - ./scripts/test