recurly 4.13.0 → 4.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.bumpversion.cfg +1 -1
  3. data/CHANGELOG.md +44 -0
  4. data/GETTING_STARTED.md +1 -1
  5. data/lib/recurly/client/operations.rb +209 -136
  6. data/lib/recurly/requests/account_create.rb +1 -1
  7. data/lib/recurly/requests/account_purchase.rb +1 -1
  8. data/lib/recurly/requests/account_update.rb +1 -1
  9. data/lib/recurly/requests/add_on_create.rb +9 -1
  10. data/lib/recurly/requests/add_on_update.rb +5 -1
  11. data/lib/recurly/requests/billing_info_create.rb +8 -0
  12. data/lib/recurly/requests/percentage_tier.rb +18 -0
  13. data/lib/recurly/requests/percentage_tiers_by_currency.rb +18 -0
  14. data/lib/recurly/requests/plan_create.rb +1 -1
  15. data/lib/recurly/requests/plan_update.rb +1 -1
  16. data/lib/recurly/requests/subscription_add_on_create.rb +5 -1
  17. data/lib/recurly/requests/subscription_add_on_percentage_tier.rb +18 -0
  18. data/lib/recurly/requests/subscription_add_on_tier.rb +2 -2
  19. data/lib/recurly/requests/subscription_add_on_update.rb +5 -1
  20. data/lib/recurly/requests/subscription_update.rb +1 -1
  21. data/lib/recurly/requests/tier.rb +2 -2
  22. data/lib/recurly/resources/account.rb +4 -4
  23. data/lib/recurly/resources/account_mini.rb +1 -1
  24. data/lib/recurly/resources/add_on.rb +8 -0
  25. data/lib/recurly/resources/invoice.rb +5 -1
  26. data/lib/recurly/resources/invoice_template.rb +34 -0
  27. data/lib/recurly/resources/percentage_tier.rb +18 -0
  28. data/lib/recurly/resources/{account_invoice_template.rb → percentage_tiers_by_currency.rb} +7 -7
  29. data/lib/recurly/resources/plan.rb +1 -1
  30. data/lib/recurly/resources/subscription.rb +4 -0
  31. data/lib/recurly/resources/subscription_add_on.rb +9 -1
  32. data/lib/recurly/resources/subscription_add_on_percentage_tier.rb +18 -0
  33. data/lib/recurly/resources/subscription_add_on_tier.rb +2 -2
  34. data/lib/recurly/resources/tier.rb +2 -2
  35. data/lib/recurly/resources/usage.rb +5 -1
  36. data/lib/recurly/version.rb +1 -1
  37. data/openapi/api.yaml +617 -78
  38. metadata +10 -4
@@ -39,7 +39,7 @@ module Recurly
39
39
  define_attribute :custom_fields, Array, { :item_type => :CustomField }
40
40
 
41
41
  # @!attribute dunning_campaign_id
42
- # @return [String] Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is enabled. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
42
+ # @return [String] Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
43
43
  define_attribute :dunning_campaign_id, String
44
44
 
45
45
  # @!attribute email
@@ -39,7 +39,7 @@ module Recurly
39
39
  define_attribute :custom_fields, Array, { :item_type => :CustomField }
40
40
 
41
41
  # @!attribute dunning_campaign_id
42
- # @return [String] Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is enabled. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
42
+ # @return [String] Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
43
43
  define_attribute :dunning_campaign_id, String
44
44
 
45
45
  # @!attribute email
@@ -31,7 +31,7 @@ module Recurly
31
31
  define_attribute :custom_fields, Array, { :item_type => :CustomField }
32
32
 
33
33
  # @!attribute dunning_campaign_id
34
- # @return [String] Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is enabled. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
34
+ # @return [String] Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
35
35
  define_attribute :dunning_campaign_id, String
36
36
 
37
37
  # @!attribute email
@@ -62,6 +62,10 @@ module Recurly
62
62
  # @return [Boolean] Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API.
63
63
  define_attribute :optional, :Boolean
64
64
 
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 an `ending_amount` value which represents the final tier.
67
+ define_attribute :percentage_tiers, Array, { :item_type => :PercentageTiersByCurrency }
68
+
65
69
  # @!attribute plan_id
66
70
  # @return [String] Plan ID
67
71
  define_attribute :plan_id, String
@@ -79,13 +83,17 @@ module Recurly
79
83
  define_attribute :tier_type, String
80
84
 
81
85
  # @!attribute tiers
82
- # @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`, or alternatively, `usage_percentage` for usage percentage type usage add ons. 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.
83
87
  define_attribute :tiers, Array, { :item_type => :Tier }
84
88
 
85
89
  # @!attribute usage_percentage
86
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.
87
91
  define_attribute :usage_percentage, Float
88
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
+
89
97
  # @!attribute usage_type
90
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.
91
99
  define_attribute :usage_type, String
@@ -54,6 +54,10 @@ module Recurly
54
54
  # @return [Boolean] Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API.
55
55
  define_attribute :optional, :Boolean
56
56
 
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. There must be one tier without an `ending_amount` value which represents the final tier.
59
+ define_attribute :percentage_tiers, Array, { :item_type => :PercentageTiersByCurrency }
60
+
57
61
  # @!attribute revenue_schedule_type
58
62
  # @return [String] When this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item.
59
63
  define_attribute :revenue_schedule_type, String
@@ -63,7 +67,7 @@ module Recurly
63
67
  define_attribute :tax_code, String
64
68
 
65
69
  # @!attribute tiers
66
- # @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`, or alternatively, `usage_percentage` for usage percentage type usage add ons. There must be one tier with an `ending_quantity` of 999999999 which is the default if not provided.
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.
67
71
  define_attribute :tiers, Array, { :item_type => :Tier }
68
72
 
69
73
  # @!attribute usage_percentage
@@ -34,6 +34,10 @@ module Recurly
34
34
  # @return [String] *STRONGLY RECOMMENDED*
35
35
  define_attribute :cvv, String
36
36
 
37
+ # @!attribute external_hpp_type
38
+ # @return [String] Use for Adyen HPP billing info.
39
+ define_attribute :external_hpp_type, String
40
+
37
41
  # @!attribute first_name
38
42
  # @return [String] First name
39
43
  define_attribute :first_name, String
@@ -74,6 +78,10 @@ module Recurly
74
78
  # @return [String] Credit card number, spaces and dashes are accepted.
75
79
  define_attribute :number, String
76
80
 
81
+ # @!attribute online_banking_payment_type
82
+ # @return [String] Use for Online Banking billing info.
83
+ define_attribute :online_banking_payment_type, String
84
+
77
85
  # @!attribute paypal_billing_agreement_id
78
86
  # @return [String] PayPal billing agreement ID
79
87
  define_attribute :paypal_billing_agreement_id, String
@@ -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 PercentageTier < Request
8
+
9
+ # @!attribute 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
+ define_attribute :ending_amount, Float
12
+
13
+ # @!attribute usage_percentage
14
+ # @return [String] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string.
15
+ define_attribute :usage_percentage, String
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Requests
7
+ class PercentageTiersByCurrency < Request
8
+
9
+ # @!attribute currency
10
+ # @return [String] 3-letter ISO 4217 currency code.
11
+ define_attribute :currency, String
12
+
13
+ # @!attribute tiers
14
+ # @return [Array[PercentageTier]] Tiers
15
+ define_attribute :tiers, Array, { :item_type => :PercentageTier }
16
+ end
17
+ end
18
+ end
@@ -43,7 +43,7 @@ module Recurly
43
43
  define_attribute :description, String
44
44
 
45
45
  # @!attribute dunning_campaign_id
46
- # @return [String] Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is enabled. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
46
+ # @return [String] Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
47
47
  define_attribute :dunning_campaign_id, String
48
48
 
49
49
  # @!attribute hosted_pages
@@ -39,7 +39,7 @@ module Recurly
39
39
  define_attribute :description, String
40
40
 
41
41
  # @!attribute dunning_campaign_id
42
- # @return [String] Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is enabled. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
42
+ # @return [String] Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
43
43
  define_attribute :dunning_campaign_id, String
44
44
 
45
45
  # @!attribute hosted_pages
@@ -14,6 +14,10 @@ module Recurly
14
14
  # @return [String] If `add_on_source` is set to `plan_add_on` or left blank, then plan's add-on `code` should be used. If `add_on_source` is set to `item`, then the `code` from the associated item should be used.
15
15
  define_attribute :code, String
16
16
 
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 which represents the final tier. Use only if add_on.tier_type is tiered or volume and add_on.usage_type is percentage.
19
+ define_attribute :percentage_tiers, Array, { :item_type => :SubscriptionAddOnPercentageTier }
20
+
17
21
  # @!attribute quantity
18
22
  # @return [Integer] Quantity
19
23
  define_attribute :quantity, Integer
@@ -23,7 +27,7 @@ module Recurly
23
27
  define_attribute :revenue_schedule_type, String
24
28
 
25
29
  # @!attribute tiers
26
- # @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. 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.
27
31
  define_attribute :tiers, Array, { :item_type => :SubscriptionAddOnTier }
28
32
 
29
33
  # @!attribute unit_amount
@@ -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 SubscriptionAddOnPercentageTier < Request
8
+
9
+ # @!attribute 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
+ define_attribute :ending_amount, Float
12
+
13
+ # @!attribute usage_percentage
14
+ # @return [String] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string.
15
+ define_attribute :usage_percentage, String
16
+ end
17
+ end
18
+ 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
@@ -19,7 +19,7 @@ module Recurly
19
19
  define_attribute :unit_amount_decimal, String
20
20
 
21
21
  # @!attribute usage_percentage
22
- # @return [String] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string. A value between 0.0 and 100.0. Optionally, override tiers' default usage percentage. Required if add-on's `add_on_type` is `usage` and `usage_type` is `percentage`. Must be omitted otherwise.
22
+ # @return [String] (deprecated) -- Use the percentage_tiers object instead.
23
23
  define_attribute :usage_percentage, String
24
24
  end
25
25
  end
@@ -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
@@ -59,7 +59,7 @@ module Recurly
59
59
  define_attribute :shipping, :SubscriptionShippingUpdate
60
60
 
61
61
  # @!attribute tax_inclusive
62
- # @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.
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.
63
63
  define_attribute :tax_inclusive, :Boolean
64
64
 
65
65
  # @!attribute terms_and_conditions
@@ -11,11 +11,11 @@ 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, but for percentage type usage add ons, represents the site default currency in its minimum divisible unit.
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
18
- # @return [String] Decimal usage percentage.
18
+ # @return [String] (deprecated) -- Use the percentage_tiers object instead.
19
19
  define_attribute :usage_percentage, String
20
20
  end
21
21
  end
@@ -43,7 +43,7 @@ module Recurly
43
43
  define_attribute :deleted_at, DateTime
44
44
 
45
45
  # @!attribute dunning_campaign_id
46
- # @return [String] Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is enabled. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
46
+ # @return [String] Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
47
47
  define_attribute :dunning_campaign_id, String
48
48
 
49
49
  # @!attribute email
@@ -90,9 +90,9 @@ module Recurly
90
90
  # @return [String]
91
91
  define_attribute :id, String
92
92
 
93
- # @!attribute invoice_template
94
- # @return [AccountInvoiceTemplate] Invoice template associated to the account. Available when invoice customization flag is enabled.
95
- define_attribute :invoice_template, :AccountInvoiceTemplate
93
+ # @!attribute invoice_template_id
94
+ # @return [String] Unique ID to identify an invoice template. Available when the Invoice Customization feature is enabled. Used to specify if a non-default invoice template will be used to generate invoices for the account. For sites without multiple invoice templates enabled, the default template will always be used.
95
+ define_attribute :invoice_template_id, String
96
96
 
97
97
  # @!attribute last_name
98
98
  # @return [String]
@@ -19,7 +19,7 @@ module Recurly
19
19
  define_attribute :company, String
20
20
 
21
21
  # @!attribute dunning_campaign_id
22
- # @return [String] Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is enabled. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
22
+ # @return [String] Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
23
23
  define_attribute :dunning_campaign_id, String
24
24
 
25
25
  # @!attribute email
@@ -74,6 +74,10 @@ module Recurly
74
74
  # @return [Boolean] Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API.
75
75
  define_attribute :optional, :Boolean
76
76
 
77
+ # @!attribute percentage_tiers
78
+ # @return [Array[PercentageTiersByCurrency]] Percentage Tiers
79
+ define_attribute :percentage_tiers, Array, { :item_type => :PercentageTiersByCurrency }
80
+
77
81
  # @!attribute plan_id
78
82
  # @return [String] Plan ID
79
83
  define_attribute :plan_id, String
@@ -106,6 +110,10 @@ module Recurly
106
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.
107
111
  define_attribute :usage_percentage, Float
108
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
+
109
117
  # @!attribute usage_type
110
118
  # @return [String] Type of usage, returns usage type if `add_on_type` is `usage`.
111
119
  define_attribute :usage_type, String
@@ -55,7 +55,7 @@ module Recurly
55
55
  define_attribute :due_at, DateTime
56
56
 
57
57
  # @!attribute dunning_campaign_id
58
- # @return [String] Unique ID to identify the dunning campaign used when dunning the invoice. Available when the Dunning Campaigns feature is enabled. For sites without multiple dunning campaigns enabled, this will always be the default dunning campaign.
58
+ # @return [String] Unique ID to identify the dunning campaign used when dunning the invoice. For sites without multiple dunning campaigns enabled, this will always be the default dunning campaign.
59
59
  define_attribute :dunning_campaign_id, String
60
60
 
61
61
  # @!attribute has_more_line_items
@@ -146,6 +146,10 @@ module Recurly
146
146
  # @return [DateTime] Last updated at
147
147
  define_attribute :updated_at, DateTime
148
148
 
149
+ # @!attribute uuid
150
+ # @return [String] Invoice UUID
151
+ define_attribute :uuid, String
152
+
149
153
  # @!attribute vat_number
150
154
  # @return [String] VAT registration number for the customer on this invoice. This will come from the VAT Number field in the Billing Info or the Account Info depending on your tax settings and the invoice collection method.
151
155
  define_attribute :vat_number, String
@@ -0,0 +1,34 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Resources
7
+ class InvoiceTemplate < Resource
8
+
9
+ # @!attribute code
10
+ # @return [String] Invoice template code.
11
+ define_attribute :code, String
12
+
13
+ # @!attribute created_at
14
+ # @return [DateTime] When the invoice template was created in Recurly.
15
+ define_attribute :created_at, DateTime
16
+
17
+ # @!attribute description
18
+ # @return [String] Invoice template description.
19
+ define_attribute :description, String
20
+
21
+ # @!attribute id
22
+ # @return [String]
23
+ define_attribute :id, String
24
+
25
+ # @!attribute name
26
+ # @return [String] Invoice template name.
27
+ define_attribute :name, String
28
+
29
+ # @!attribute updated_at
30
+ # @return [DateTime] When the invoice template was updated in Recurly.
31
+ define_attribute :updated_at, DateTime
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,18 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Resources
7
+ class PercentageTier < Resource
8
+
9
+ # @!attribute ending_amount
10
+ # @return [Float] Ending amount for the tier. Allows up to 2 decimal places. Must be left empty if it is the final tier.
11
+ define_attribute :ending_amount, Float
12
+
13
+ # @!attribute usage_percentage
14
+ # @return [String] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string.
15
+ define_attribute :usage_percentage, String
16
+ end
17
+ end
18
+ end
@@ -4,15 +4,15 @@
4
4
  # need and we will usher them to the appropriate places.
5
5
  module Recurly
6
6
  module Resources
7
- class AccountInvoiceTemplate < Resource
7
+ class PercentageTiersByCurrency < Resource
8
8
 
9
- # @!attribute id
10
- # @return [String] Unique ID to identify the invoice template.
11
- define_attribute :id, String
9
+ # @!attribute currency
10
+ # @return [String] 3-letter ISO 4217 currency code.
11
+ define_attribute :currency, String
12
12
 
13
- # @!attribute name
14
- # @return [String] Template name
15
- define_attribute :name, String
13
+ # @!attribute tiers
14
+ # @return [Array[PercentageTier]] Tiers
15
+ define_attribute :tiers, Array, { :item_type => :PercentageTier }
16
16
  end
17
17
  end
18
18
  end
@@ -47,7 +47,7 @@ module Recurly
47
47
  define_attribute :description, String
48
48
 
49
49
  # @!attribute dunning_campaign_id
50
- # @return [String] Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is enabled. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
50
+ # @return [String] Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
51
51
  define_attribute :dunning_campaign_id, String
52
52
 
53
53
  # @!attribute hosted_pages
@@ -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 }
@@ -30,6 +30,10 @@ module Recurly
30
30
  # @return [String] Object type
31
31
  define_attribute :object, String
32
32
 
33
+ # @!attribute percentage_tiers
34
+ # @return [Array[SubscriptionAddOnPercentageTier]] If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be removed and replaced by the percentage tiers in the request. 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
+ define_attribute :percentage_tiers, Array, { :item_type => :SubscriptionAddOnPercentageTier }
36
+
33
37
  # @!attribute quantity
34
38
  # @return [Integer] Add-on quantity
35
39
  define_attribute :quantity, Integer
@@ -47,7 +51,7 @@ module Recurly
47
51
  define_attribute :tier_type, String
48
52
 
49
53
  # @!attribute tiers
50
- # @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.
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.
51
55
  define_attribute :tiers, Array, { :item_type => :SubscriptionAddOnTier }
52
56
 
53
57
  # @!attribute unit_amount
@@ -65,6 +69,10 @@ module Recurly
65
69
  # @!attribute usage_percentage
66
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.
67
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
68
76
  end
69
77
  end
70
78
  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 SubscriptionAddOnPercentageTier < Resource
8
+
9
+ # @!attribute 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
+ define_attribute :ending_amount, Float
12
+
13
+ # @!attribute usage_percentage
14
+ # @return [String] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string.
15
+ define_attribute :usage_percentage, String
16
+ end
17
+ end
18
+ 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
@@ -19,7 +19,7 @@ module Recurly
19
19
  define_attribute :unit_amount_decimal, String
20
20
 
21
21
  # @!attribute usage_percentage
22
- # @return [String] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string. A value between 0.0 and 100.0. Optionally, override tiers' default usage percentage. Required if add-on's `add_on_type` is `usage` and `usage_type` is `percentage`. Must be omitted otherwise.
22
+ # @return [String] (deprecated) -- Use the percentage_tiers object instead.
23
23
  define_attribute :usage_percentage, String
24
24
  end
25
25
  end
@@ -11,11 +11,11 @@ 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, but for percentage type usage add ons, represents the site default currency in its minimum divisible unit.
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
18
- # @return [String] Decimal usage percentage.
18
+ # @return [String] (deprecated) -- Use the percentage_tiers object instead.
19
19
  define_attribute :usage_percentage, String
20
20
  end
21
21
  end
@@ -34,6 +34,10 @@ module Recurly
34
34
  # @return [String] Object type
35
35
  define_attribute :object, String
36
36
 
37
+ # @!attribute percentage_tiers
38
+ # @return [Array[SubscriptionAddOnPercentageTier]] The percentage tiers of the subscription based on the usage_timestamp. If tier_type = flat, percentage_tiers = []
39
+ define_attribute :percentage_tiers, Array, { :item_type => :SubscriptionAddOnPercentageTier }
40
+
37
41
  # @!attribute recording_timestamp
38
42
  # @return [DateTime] When the usage was recorded in your system.
39
43
  define_attribute :recording_timestamp, DateTime
@@ -43,7 +47,7 @@ module Recurly
43
47
  define_attribute :tier_type, String
44
48
 
45
49
  # @!attribute tiers
46
- # @return [Array[SubscriptionAddOnTier]] The tiers and prices of the subscription based on the usage_timestamp. If tier_type = flat, tiers = null
50
+ # @return [Array[SubscriptionAddOnTier]] The tiers and prices of the subscription based on the usage_timestamp. If tier_type = flat, tiers = []
47
51
  define_attribute :tiers, Array, { :item_type => :SubscriptionAddOnTier }
48
52
 
49
53
  # @!attribute unit_amount
@@ -1,3 +1,3 @@
1
1
  module Recurly
2
- VERSION = "4.13.0"
2
+ VERSION = "4.17.0"
3
3
  end