recurly 3.19.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/.bumpversion.cfg +1 -1
  3. data/.github/workflows/docs.yml +1 -1
  4. data/.github_changelog_generator +8 -0
  5. data/.travis.yml +0 -3
  6. data/CHANGELOG.md +202 -268
  7. data/CONTRIBUTING.md +0 -4
  8. data/GETTING_STARTED.md +20 -17
  9. data/README.md +0 -3
  10. data/lib/recurly/client/operations.rb +774 -630
  11. data/lib/recurly/client.rb +44 -28
  12. data/lib/recurly/errors/api_errors.rb +3 -2
  13. data/lib/recurly/errors.rb +5 -23
  14. data/lib/recurly/pager.rb +5 -15
  15. data/lib/recurly/requests/{account_acquisition_updatable.rb → account_acquisition_update.rb} +1 -1
  16. data/lib/recurly/requests/account_create.rb +2 -6
  17. data/lib/recurly/requests/account_purchase.rb +2 -6
  18. data/lib/recurly/requests/account_update.rb +0 -4
  19. data/lib/recurly/requests/add_on_create.rb +2 -2
  20. data/lib/recurly/requests/add_on_pricing.rb +5 -5
  21. data/lib/recurly/requests/add_on_update.rb +2 -2
  22. data/lib/recurly/requests/address.rb +1 -9
  23. data/lib/recurly/requests/billing_info_create.rb +2 -30
  24. data/lib/recurly/requests/coupon_create.rb +1 -1
  25. data/lib/recurly/requests/external_transaction.rb +1 -1
  26. data/lib/recurly/requests/invoice_address.rb +1 -1
  27. data/lib/recurly/requests/invoice_collect.rb +1 -1
  28. data/lib/recurly/requests/{invoice_updatable.rb → invoice_update.rb} +1 -1
  29. data/lib/recurly/requests/line_item_create.rb +2 -6
  30. data/lib/recurly/requests/plan_create.rb +0 -4
  31. data/lib/recurly/requests/plan_pricing.rb +0 -4
  32. data/lib/recurly/requests/plan_update.rb +0 -4
  33. data/lib/recurly/requests/pricing.rb +0 -4
  34. data/lib/recurly/requests/purchase_create.rb +1 -1
  35. data/lib/recurly/requests/shipping_address_create.rb +1 -1
  36. data/lib/recurly/requests/shipping_address_update.rb +1 -1
  37. data/lib/recurly/requests/subscription_add_on_create.rb +6 -2
  38. data/lib/recurly/requests/subscription_add_on_tier.rb +5 -1
  39. data/lib/recurly/requests/subscription_add_on_update.rb +6 -2
  40. data/lib/recurly/requests/subscription_change_create.rb +1 -9
  41. data/lib/recurly/requests/subscription_create.rb +5 -9
  42. data/lib/recurly/requests/subscription_pause.rb +1 -1
  43. data/lib/recurly/requests/subscription_purchase.rb +2 -6
  44. data/lib/recurly/requests/subscription_update.rb +1 -5
  45. data/lib/recurly/requests/tier.rb +2 -2
  46. data/lib/recurly/requests/tier_pricing.rb +22 -0
  47. data/lib/recurly/resources/account.rb +0 -4
  48. data/lib/recurly/resources/account_mini.rb +0 -4
  49. data/lib/recurly/resources/add_on.rb +1 -1
  50. data/lib/recurly/resources/add_on_pricing.rb +5 -5
  51. data/lib/recurly/resources/address.rb +1 -9
  52. data/lib/recurly/resources/address_with_name.rb +46 -0
  53. data/lib/recurly/resources/billing_info.rb +1 -5
  54. data/lib/recurly/resources/billing_info_updated_by.rb +1 -1
  55. data/lib/recurly/resources/coupon.rb +5 -17
  56. data/lib/recurly/resources/invoice.rb +7 -7
  57. data/lib/recurly/resources/invoice_address.rb +1 -1
  58. data/lib/recurly/resources/line_item.rb +7 -7
  59. data/lib/recurly/resources/payment_method.rb +0 -4
  60. data/lib/recurly/resources/plan.rb +1 -5
  61. data/lib/recurly/resources/plan_pricing.rb +0 -4
  62. data/lib/recurly/resources/pricing.rb +0 -4
  63. data/lib/recurly/resources/shipping_address.rb +1 -1
  64. data/lib/recurly/resources/subscription.rb +0 -4
  65. data/lib/recurly/resources/subscription_add_on.rb +6 -2
  66. data/lib/recurly/resources/subscription_add_on_tier.rb +5 -1
  67. data/lib/recurly/resources/subscription_change.rb +0 -12
  68. data/lib/recurly/resources/tax_info.rb +0 -4
  69. data/lib/recurly/resources/tier.rb +2 -2
  70. data/lib/recurly/resources/tier_pricing.rb +22 -0
  71. data/lib/recurly/resources/transaction.rb +3 -7
  72. data/lib/recurly/resources/unique_coupon_code_params.rb +26 -0
  73. data/lib/recurly/resources/usage.rb +5 -1
  74. data/lib/recurly/version.rb +1 -1
  75. data/openapi/api.yaml +1949 -2573
  76. data/scripts/build +2 -2
  77. data/scripts/bump +11 -0
  78. data/scripts/changelog +14 -0
  79. data/scripts/format +2 -2
  80. data/scripts/prepare-release +29 -43
  81. data/scripts/release +20 -5
  82. metadata +15 -22
  83. data/.changelog_config.yaml +0 -11
  84. data/CODE_OF_CONDUCT.md +0 -130
  85. data/lib/recurly/errors/network_errors.rb +0 -10
  86. data/lib/recurly/requests/billing_info_verify.rb +0 -14
  87. data/lib/recurly/requests/dunning_campaigns_bulk_update.rb +0 -18
  88. data/lib/recurly/requests/subscription_change_billing_info_create.rb +0 -14
  89. data/lib/recurly/resources/dunning_campaign.rb +0 -50
  90. data/lib/recurly/resources/dunning_campaigns_bulk_update_response.rb +0 -18
  91. data/lib/recurly/resources/dunning_cycle.rb +0 -58
  92. data/lib/recurly/resources/dunning_interval.rb +0 -18
  93. data/lib/recurly/resources/line_item_list.rb +0 -26
  94. data/lib/recurly/resources/subscription_change_billing_info.rb +0 -14
  95. data/lib/recurly/resources/subscription_change_preview.rb +0 -86
  96. data/lib/recurly/resources/tax_detail.rb +0 -26
@@ -15,7 +15,7 @@ module Recurly
15
15
  define_attribute :company, String
16
16
 
17
17
  # @!attribute country
18
- # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
18
+ # @return [String] Country, 2-letter ISO code.
19
19
  define_attribute :country, String
20
20
 
21
21
  # @!attribute email
@@ -15,7 +15,7 @@ module Recurly
15
15
  define_attribute :company, String
16
16
 
17
17
  # @!attribute country
18
- # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
18
+ # @return [String] Country, 2-letter ISO code.
19
19
  define_attribute :country, String
20
20
 
21
21
  # @!attribute email
@@ -7,7 +7,7 @@ module Recurly
7
7
  class SubscriptionAddOnCreate < Request
8
8
 
9
9
  # @!attribute add_on_source
10
- # @return [String] Used to determine where the associated add-on data is pulled from. If this value is set to `plan_add_on` or left blank, then add_on data will be pulled from the plan's add-ons. If the associated `plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then the associated add-on data will be pulled from the site's item catalog.
10
+ # @return [String] Used to determine where the associated add-on data is pulled from. If this value is set to `plan_add_on` or left blank, then add-on data will be pulled from the plan's add-ons. If the associated `plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then the associated add-on data will be pulled from the site's item catalog.
11
11
  define_attribute :add_on_source, String
12
12
 
13
13
  # @!attribute code
@@ -27,9 +27,13 @@ module Recurly
27
27
  define_attribute :tiers, Array, { :item_type => :SubscriptionAddOnTier }
28
28
 
29
29
  # @!attribute unit_amount
30
- # @return [Float] * Optionally, override the add-on's default unit amount. * If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount` must be absent.
30
+ # @return [Float] Allows up to 2 decimal places. Optionally, override the add-on's default unit amount. If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount` cannot be provided.
31
31
  define_attribute :unit_amount, Float
32
32
 
33
+ # @!attribute unit_amount_decimal
34
+ # @return [String] Allows up to 9 decimal places. Optionally, override the add-on's default unit amount. If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount_decimal` cannot be provided. Only supported when the plan add-on's `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
35
+ define_attribute :unit_amount_decimal, String
36
+
33
37
  # @!attribute usage_percentage
34
38
  # @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. Must be omitted otherwise. `usage_percentage` does not support tiers. See our [Guide](https://developers.recurly.com/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons.
35
39
  define_attribute :usage_percentage, Float
@@ -11,8 +11,12 @@ module Recurly
11
11
  define_attribute :ending_quantity, Integer
12
12
 
13
13
  # @!attribute unit_amount
14
- # @return [Float] Unit amount
14
+ # @return [Float] Allows up to 2 decimal places. Optionally, override the tiers' default unit amount.
15
15
  define_attribute :unit_amount, Float
16
+
17
+ # @!attribute unit_amount_decimal
18
+ # @return [String] Allows up to 9 decimal places. Optionally, override tiers' default unit amount. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
19
+ define_attribute :unit_amount_decimal, String
16
20
  end
17
21
  end
18
22
  end
@@ -7,7 +7,7 @@ module Recurly
7
7
  class SubscriptionAddOnUpdate < Request
8
8
 
9
9
  # @!attribute add_on_source
10
- # @return [String] Used to determine where the associated add-on data is pulled from. If this value is set to `plan_add_on` or left blank, then add_on data will be pulled from the plan's add-ons. If the associated `plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then the associated add-on data will be pulled from the site's item catalog.
10
+ # @return [String] Used to determine where the associated add-on data is pulled from. If this value is set to `plan_add_on` or left blank, then add-on data will be pulled from the plan's add-ons. If the associated `plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then the associated add-on data will be pulled from the site's item catalog.
11
11
  define_attribute :add_on_source, String
12
12
 
13
13
  # @!attribute code
@@ -31,9 +31,13 @@ module Recurly
31
31
  define_attribute :tiers, Array, { :item_type => :SubscriptionAddOnTier }
32
32
 
33
33
  # @!attribute unit_amount
34
- # @return [Float] Optionally, override the add-on's default unit amount.
34
+ # @return [Float] Allows up to 2 decimal places. Optionally, override the add-on's default unit amount. If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount` cannot be provided.
35
35
  define_attribute :unit_amount, Float
36
36
 
37
+ # @!attribute unit_amount_decimal
38
+ # @return [String] Allows up to 9 decimal places. Optionally, override the add-on's default unit amount. If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount_decimal` cannot be provided. Only supported when the plan add-on's `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
39
+ define_attribute :unit_amount_decimal, String
40
+
37
41
  # @!attribute usage_percentage
38
42
  # @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.
39
43
  define_attribute :usage_percentage, Float
@@ -7,13 +7,9 @@ module Recurly
7
7
  class SubscriptionChangeCreate < Request
8
8
 
9
9
  # @!attribute add_ons
10
- # @return [Array[SubscriptionAddOnUpdate]] If this value is omitted your existing add-ons will be removed. If you provide a value for this field it will replace any existing add-ons. So, when adding or modifying an add-on, you need to include the existing subscription add-ons. Unchanged add-ons can be included just using the subscription add-on's ID: `{"id": "abc123"}`. If a subscription add-on's `code` is supplied without the `id`, `{"code": "def456"}`, the subscription add-on attributes will be set to the current values of the plan add-on unless provided in the request. - If an `id` is passed, any attributes not passed in will pull from the existing subscription add-on - If a `code` is passed, any attributes not passed in will pull from the current values of the plan add-on - Attributes passed in as part of the request will override either of the above scenarios
10
+ # @return [Array[SubscriptionAddOnUpdate]] If you provide a value for this field it will replace any existing add-ons. So, when adding or modifying an add-on, you need to include the existing subscription add-ons. Unchanged add-ons can be included just using the subscription add-on''s ID: `{"id": "abc123"}`. If this value is omitted your existing add-ons will be unaffected. To remove all existing add-ons, this value should be an empty array.' If a subscription add-on's `code` is supplied without the `id`, `{"code": "def456"}`, the subscription add-on attributes will be set to the current values of the plan add-on unless provided in the request. - If an `id` is passed, any attributes not passed in will pull from the existing subscription add-on - If a `code` is passed, any attributes not passed in will pull from the current values of the plan add-on - Attributes passed in as part of the request will override either of the above scenarios
11
11
  define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOnUpdate }
12
12
 
13
- # @!attribute billing_info
14
- # @return [SubscriptionChangeBillingInfoCreate]
15
- define_attribute :billing_info, :SubscriptionChangeBillingInfoCreate
16
-
17
13
  # @!attribute collection_method
18
14
  # @return [String] Collection method
19
15
  define_attribute :collection_method, String
@@ -54,10 +50,6 @@ module Recurly
54
50
  # @return [SubscriptionChangeShippingCreate] The shipping address can currently only be changed immediately, using SubscriptionUpdate.
55
51
  define_attribute :shipping, :SubscriptionChangeShippingCreate
56
52
 
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.
59
- define_attribute :tax_inclusive, :Boolean
60
-
61
53
  # @!attribute timeframe
62
54
  # @return [String] The timeframe parameter controls when the upgrade or downgrade takes place. The subscription change can occur now, when the subscription is next billed, or when the subscription term ends. Generally, if you're performing an upgrade, you will want the change to occur immediately (now). If you're performing a downgrade, you should set the timeframe to `term_end` or `bill_date` so the change takes effect at a scheduled billing date. The `renewal` timeframe option is accepted as an alias for `term_end`.
63
55
  define_attribute :timeframe, String
@@ -19,16 +19,16 @@ module Recurly
19
19
  define_attribute :auto_renew, :Boolean
20
20
 
21
21
  # @!attribute billing_info_id
22
- # @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature.
22
+ # @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info.
23
23
  define_attribute :billing_info_id, String
24
24
 
25
25
  # @!attribute collection_method
26
26
  # @return [String] Collection method
27
27
  define_attribute :collection_method, String
28
28
 
29
- # @!attribute coupon_code
30
- # @return [String] Optional coupon code to redeem on the account and discount the subscription. Please note, the subscription request will fail if the coupon is invalid.
31
- define_attribute :coupon_code, String
29
+ # @!attribute coupon_codes
30
+ # @return [Array[String]] A list of coupon_codes to be redeemed on the subscription or account during the purchase.
31
+ define_attribute :coupon_codes, Array, { :item_type => String }
32
32
 
33
33
  # @!attribute credit_customer_notes
34
34
  # @return [String] If there are pending credits on the account that will be invoiced during the subscription creation, these will be used as the Customer Notes on the credit invoice.
@@ -86,10 +86,6 @@ module Recurly
86
86
  # @return [DateTime] If set, the subscription will begin in the future on this date. The subscription will apply the setup fee and trial period, unless the plan has no trial.
87
87
  define_attribute :starts_at, DateTime
88
88
 
89
- # @!attribute tax_inclusive
90
- # @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.
91
- define_attribute :tax_inclusive, :Boolean
92
-
93
89
  # @!attribute terms_and_conditions
94
90
  # @return [String] This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin. Specify custom notes to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals.
95
91
  define_attribute :terms_and_conditions, String
@@ -103,7 +99,7 @@ module Recurly
103
99
  define_attribute :transaction_type, String
104
100
 
105
101
  # @!attribute trial_ends_at
106
- # @return [DateTime] IIf set, overrides the default trial behavior for the subscription. When the current date time or a past date time is provided the subscription will begin with no trial phase (overriding any plan default trial). When a future date time is provided the subscription will begin with a trial phase ending at the specified date time.
102
+ # @return [DateTime] If set, overrides the default trial behavior for the subscription. The date must be in the future.
107
103
  define_attribute :trial_ends_at, DateTime
108
104
 
109
105
  # @!attribute unit_amount
@@ -7,7 +7,7 @@ module Recurly
7
7
  class SubscriptionPause < Request
8
8
 
9
9
  # @!attribute remaining_pause_cycles
10
- # @return [Integer] Number of billing cycles to pause the subscriptions. A value of 0 will cancel any pending pauses on the subscription.
10
+ # @return [Integer] Number of billing cycles to pause the subscriptions.
11
11
  define_attribute :remaining_pause_cycles, Integer
12
12
  end
13
13
  end
@@ -50,20 +50,16 @@ module Recurly
50
50
  # @return [DateTime] If set, the subscription will begin in the future on this date. The subscription will apply the setup fee and trial period, unless the plan has no trial.
51
51
  define_attribute :starts_at, DateTime
52
52
 
53
- # @!attribute tax_inclusive
54
- # @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.
55
- define_attribute :tax_inclusive, :Boolean
56
-
57
53
  # @!attribute total_billing_cycles
58
54
  # @return [Integer] The number of cycles/billing periods in a term. When `remaining_billing_cycles=0`, if `auto_renew=true` the subscription will renew and a new term will begin, otherwise the subscription will expire.
59
55
  define_attribute :total_billing_cycles, Integer
60
56
 
61
57
  # @!attribute trial_ends_at
62
- # @return [DateTime] If set, overrides the default trial behavior for the subscription. When the current date time or a past date time is provided the subscription will begin with no trial phase (overriding any plan default trial). When a future date time is provided the subscription will begin with a trial phase ending at the specified date time.
58
+ # @return [DateTime] If set, overrides the default trial behavior for the subscription. The date must be in the future.
63
59
  define_attribute :trial_ends_at, DateTime
64
60
 
65
61
  # @!attribute unit_amount
66
- # @return [Float] Override the unit amount of the subscription plan by setting this value. If not provided, the subscription will inherit the price from the subscription plan for the provided currency.
62
+ # @return [Float] Override the unit amount of the subscription plan by setting this value in cents. If not provided, the subscription will inherit the price from the subscription plan for the provided currency.
67
63
  define_attribute :unit_amount, Float
68
64
  end
69
65
  end
@@ -11,7 +11,7 @@ module Recurly
11
11
  define_attribute :auto_renew, :Boolean
12
12
 
13
13
  # @!attribute billing_info_id
14
- # @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature.
14
+ # @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info.
15
15
  define_attribute :billing_info_id, String
16
16
 
17
17
  # @!attribute collection_method
@@ -54,10 +54,6 @@ module Recurly
54
54
  # @return [SubscriptionShippingUpdate] Subscription shipping details
55
55
  define_attribute :shipping, :SubscriptionShippingUpdate
56
56
 
57
- # @!attribute tax_inclusive
58
- # @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.
59
- define_attribute :tax_inclusive, :Boolean
60
-
61
57
  # @!attribute terms_and_conditions
62
58
  # @return [String] Specify custom notes to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals.
63
59
  define_attribute :terms_and_conditions, String
@@ -7,8 +7,8 @@ module Recurly
7
7
  class Tier < Request
8
8
 
9
9
  # @!attribute currencies
10
- # @return [Array[Pricing]] Tier pricing
11
- define_attribute :currencies, Array, { :item_type => :Pricing }
10
+ # @return [Array[TierPricing]] Tier pricing
11
+ define_attribute :currencies, Array, { :item_type => :TierPricing }
12
12
 
13
13
  # @!attribute ending_quantity
14
14
  # @return [Integer] Ending quantity
@@ -0,0 +1,22 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Requests
7
+ class TierPricing < Request
8
+
9
+ # @!attribute currency
10
+ # @return [String] 3-letter ISO 4217 currency code.
11
+ define_attribute :currency, String
12
+
13
+ # @!attribute unit_amount
14
+ # @return [Float] Allows up to 2 decimal places. Required unless `unit_amount_decimal` is provided.
15
+ define_attribute :unit_amount, Float
16
+
17
+ # @!attribute unit_amount_decimal
18
+ # @return [String] Allows up to 9 decimal places. Only supported when `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
19
+ define_attribute :unit_amount_decimal, String
20
+ end
21
+ end
22
+ end
@@ -42,10 +42,6 @@ module Recurly
42
42
  # @return [DateTime] If present, when the account was last marked inactive.
43
43
  define_attribute :deleted_at, DateTime
44
44
 
45
- # @!attribute dunning_campaign_id
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
- define_attribute :dunning_campaign_id, String
48
-
49
45
  # @!attribute email
50
46
  # @return [String] The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.
51
47
  define_attribute :email, String
@@ -18,10 +18,6 @@ module Recurly
18
18
  # @return [String]
19
19
  define_attribute :company, String
20
20
 
21
- # @!attribute dunning_campaign_id
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
- define_attribute :dunning_campaign_id, String
24
-
25
21
  # @!attribute email
26
22
  # @return [String] The email address used for communicating with this customer.
27
23
  define_attribute :email, String
@@ -91,7 +91,7 @@ module Recurly
91
91
  define_attribute :tax_code, String
92
92
 
93
93
  # @!attribute tier_type
94
- # @return [String] The type of tiering used by the Add-on.
94
+ # @return [String] The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://developers.recurly.com/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.
95
95
  define_attribute :tier_type, String
96
96
 
97
97
  # @!attribute tiers
@@ -10,13 +10,13 @@ module Recurly
10
10
  # @return [String] 3-letter ISO 4217 currency code.
11
11
  define_attribute :currency, String
12
12
 
13
- # @!attribute tax_inclusive
14
- # @return [Boolean] 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.
15
- define_attribute :tax_inclusive, :Boolean
16
-
17
13
  # @!attribute unit_amount
18
- # @return [Float] Unit price
14
+ # @return [Float] Allows up to 2 decimal places. Required unless `unit_amount_decimal` is provided.
19
15
  define_attribute :unit_amount, Float
16
+
17
+ # @!attribute unit_amount_decimal
18
+ # @return [String] Allows up to 9 decimal places. Only supported when `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
19
+ define_attribute :unit_amount_decimal, String
20
20
  end
21
21
  end
22
22
  end
@@ -11,17 +11,9 @@ module Recurly
11
11
  define_attribute :city, String
12
12
 
13
13
  # @!attribute country
14
- # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
14
+ # @return [String] Country, 2-letter ISO code.
15
15
  define_attribute :country, String
16
16
 
17
- # @!attribute first_name
18
- # @return [String] First name
19
- define_attribute :first_name, String
20
-
21
- # @!attribute last_name
22
- # @return [String] Last name
23
- define_attribute :last_name, String
24
-
25
17
  # @!attribute phone
26
18
  # @return [String] Phone number
27
19
  define_attribute :phone, String
@@ -0,0 +1,46 @@
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 AddressWithName < Resource
8
+
9
+ # @!attribute city
10
+ # @return [String] City
11
+ define_attribute :city, String
12
+
13
+ # @!attribute country
14
+ # @return [String] Country, 2-letter ISO code.
15
+ define_attribute :country, String
16
+
17
+ # @!attribute first_name
18
+ # @return [String] First name
19
+ define_attribute :first_name, String
20
+
21
+ # @!attribute last_name
22
+ # @return [String] Last name
23
+ define_attribute :last_name, String
24
+
25
+ # @!attribute phone
26
+ # @return [String] Phone number
27
+ define_attribute :phone, String
28
+
29
+ # @!attribute postal_code
30
+ # @return [String] Zip or postal code.
31
+ define_attribute :postal_code, String
32
+
33
+ # @!attribute region
34
+ # @return [String] State or province.
35
+ define_attribute :region, String
36
+
37
+ # @!attribute street1
38
+ # @return [String] Street 1
39
+ define_attribute :street1, String
40
+
41
+ # @!attribute street2
42
+ # @return [String] Street 2
43
+ define_attribute :street2, String
44
+ end
45
+ end
46
+ end
@@ -14,10 +14,6 @@ module Recurly
14
14
  # @return [Address]
15
15
  define_attribute :address, :Address
16
16
 
17
- # @!attribute backup_payment_method
18
- # @return [Boolean] The `backup_payment_method` field is used to indicate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined.
19
- define_attribute :backup_payment_method, :Boolean
20
-
21
17
  # @!attribute company
22
18
  # @return [String]
23
19
  define_attribute :company, String
@@ -51,7 +47,7 @@ module Recurly
51
47
  define_attribute :payment_method, :PaymentMethod
52
48
 
53
49
  # @!attribute primary_payment_method
54
- # @return [Boolean] The `primary_payment_method` field is used to indicate the primary billing info on the account. The first billing info created on an account will always become primary. This payment method will be used
50
+ # @return [Boolean] The `primary_payment_method` indicator is used to designate the primary billing info on the account. The first billing info created on an account will always become primary. Adding additional billing infos provides the flexibility to mark another billing info as primary, or adding additional non-primary billing infos. This can be accomplished by passing the `primary_payment_method` indicator. When adding billing infos via the billing_info and /accounts endpoints, this value is not permitted, and will return an error if provided.
55
51
  define_attribute :primary_payment_method, :Boolean
56
52
 
57
53
  # @!attribute updated_at
@@ -7,7 +7,7 @@ module Recurly
7
7
  class BillingInfoUpdatedBy < Resource
8
8
 
9
9
  # @!attribute country
10
- # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code matching the origin IP address, if known by Recurly.
10
+ # @return [String] Country of IP address, if known by Recurly.
11
11
  define_attribute :country, String
12
12
 
13
13
  # @!attribute ip
@@ -11,21 +11,13 @@ module Recurly
11
11
  define_attribute :applies_to_all_items, :Boolean
12
12
 
13
13
  # @!attribute applies_to_all_plans
14
- # @return [Boolean] The coupon is valid for all plans if true. If false then `plans` and `plans_names` will list the applicable plans.
14
+ # @return [Boolean] The coupon is valid for all plans if true. If false then `plans` will list the applicable plans.
15
15
  define_attribute :applies_to_all_plans, :Boolean
16
16
 
17
17
  # @!attribute applies_to_non_plan_charges
18
18
  # @return [Boolean] The coupon is valid for one-time, non-plan charges if true.
19
19
  define_attribute :applies_to_non_plan_charges, :Boolean
20
20
 
21
- # @!attribute bulk_coupon_code
22
- # @return [String] The Coupon code of the parent Bulk Coupon
23
- define_attribute :bulk_coupon_code, String
24
-
25
- # @!attribute bulk_coupon_id
26
- # @return [String] The Coupon ID of the parent Bulk Coupon
27
- define_attribute :bulk_coupon_id, String
28
-
29
21
  # @!attribute code
30
22
  # @return [String] The code the customer enters to redeem the coupon.
31
23
  define_attribute :code, String
@@ -94,18 +86,10 @@ module Recurly
94
86
  # @return [Array[PlanMini]] A list of plans for which this coupon applies. This will be `null` if `applies_to_all_plans=true`.
95
87
  define_attribute :plans, Array, { :item_type => :PlanMini }
96
88
 
97
- # @!attribute plans_names
98
- # @return [Array[String]] A list of plan names for which this coupon applies.
99
- define_attribute :plans_names, Array, { :item_type => String }
100
-
101
89
  # @!attribute redeem_by
102
90
  # @return [DateTime] The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time.
103
91
  define_attribute :redeem_by, DateTime
104
92
 
105
- # @!attribute redeemed_at
106
- # @return [DateTime] The date and time the unique coupon code was redeemed. This is only present for bulk coupons.
107
- define_attribute :redeemed_at, DateTime
108
-
109
93
  # @!attribute redemption_resource
110
94
  # @return [String] Whether the discount is for all eligible charges on the account, or only a specific subscription.
111
95
  define_attribute :redemption_resource, String
@@ -126,6 +110,10 @@ module Recurly
126
110
  # @return [String] On a bulk coupon, the template from which unique coupon codes are generated.
127
111
  define_attribute :unique_code_template, String
128
112
 
113
+ # @!attribute unique_coupon_code
114
+ # @return [Hash] Will be populated when the Coupon being returned is a `UniqueCouponCode`.
115
+ define_attribute :unique_coupon_code, Hash
116
+
129
117
  # @!attribute unique_coupon_codes_count
130
118
  # @return [Integer] When this number reaches `max_redemptions` the coupon will no longer be redeemable.
131
119
  define_attribute :unique_coupon_codes_count, Integer
@@ -19,7 +19,7 @@ module Recurly
19
19
  define_attribute :balance, Float
20
20
 
21
21
  # @!attribute billing_info_id
22
- # @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature.
22
+ # @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info.
23
23
  define_attribute :billing_info_id, String
24
24
 
25
25
  # @!attribute closed_at
@@ -54,17 +54,17 @@ module Recurly
54
54
  # @return [DateTime] Date invoice is due. This is the date the net terms are reached.
55
55
  define_attribute :due_at, DateTime
56
56
 
57
- # @!attribute dunning_campaign_id
58
- # @return [String] Unique ID to identify the dunning campaign used when dunning the invoice. For sites without multiple dunning campaigns enabled, this will always be the default dunning campaign.
59
- define_attribute :dunning_campaign_id, String
57
+ # @!attribute has_more_line_items
58
+ # @return [Boolean] Identifies if the invoice has more line items than are returned in `line_items`. If `has_more_line_items` is `true`, then a request needs to be made to the `list_invoice_line_items` endpoint.
59
+ define_attribute :has_more_line_items, :Boolean
60
60
 
61
61
  # @!attribute id
62
62
  # @return [String] Invoice ID
63
63
  define_attribute :id, String
64
64
 
65
65
  # @!attribute line_items
66
- # @return [LineItemList]
67
- define_attribute :line_items, :LineItemList
66
+ # @return [Array[LineItem]] Line Items
67
+ define_attribute :line_items, Array, { :item_type => :LineItem }
68
68
 
69
69
  # @!attribute net_terms
70
70
  # @return [Integer] Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly.
@@ -111,7 +111,7 @@ module Recurly
111
111
  define_attribute :subscription_ids, Array, { :item_type => String }
112
112
 
113
113
  # @!attribute subtotal
114
- # @return [Float] The summation of charges and credits, before discounts and taxes.
114
+ # @return [Float] The summation of charges, discounts, and credits, before tax.
115
115
  define_attribute :subtotal, Float
116
116
 
117
117
  # @!attribute tax
@@ -15,7 +15,7 @@ module Recurly
15
15
  define_attribute :company, String
16
16
 
17
17
  # @!attribute country
18
- # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
18
+ # @return [String] Country, 2-letter ISO code.
19
19
  define_attribute :country, String
20
20
 
21
21
  # @!attribute first_name
@@ -34,10 +34,6 @@ module Recurly
34
34
  # @return [Integer] Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
35
35
  define_attribute :avalara_transaction_type, Integer
36
36
 
37
- # @!attribute bill_for_account_id
38
- # @return [String] The UUID of the account responsible for originating the line item.
39
- define_attribute :bill_for_account_id, String
40
-
41
37
  # @!attribute created_at
42
38
  # @return [DateTime] When the line item was created.
43
39
  define_attribute :created_at, DateTime
@@ -67,7 +63,7 @@ module Recurly
67
63
  define_attribute :end_date, DateTime
68
64
 
69
65
  # @!attribute external_sku
70
- # @return [String] Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices feature is enabled.
66
+ # @return [String] Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices and Subscription Billing Terms features are enabled.
71
67
  define_attribute :external_sku, String
72
68
 
73
69
  # @!attribute id
@@ -83,11 +79,11 @@ module Recurly
83
79
  define_attribute :invoice_number, String
84
80
 
85
81
  # @!attribute item_code
86
- # @return [String] Unique code to identify an item. Available when the Credit Invoices feature is enabled.
82
+ # @return [String] Unique code to identify an item. Available when the Credit Invoices and Subscription Billing Terms features are enabled.
87
83
  define_attribute :item_code, String
88
84
 
89
85
  # @!attribute item_id
90
- # @return [String] System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled.
86
+ # @return [String] System-generated unique identifier for an item. Available when the Credit Invoices and Subscription Billing Terms features are enabled.
91
87
  define_attribute :item_id, String
92
88
 
93
89
  # @!attribute legacy_category
@@ -190,6 +186,10 @@ module Recurly
190
186
  # @return [Float] Positive amount for a charge, negative amount for a credit.
191
187
  define_attribute :unit_amount, Float
192
188
 
189
+ # @!attribute unit_amount_decimal
190
+ # @return [String] Positive amount for a charge, negative amount for a credit.
191
+ define_attribute :unit_amount_decimal, String
192
+
193
193
  # @!attribute updated_at
194
194
  # @return [DateTime] When the line item was last changed.
195
195
  define_attribute :updated_at, DateTime
@@ -18,10 +18,6 @@ module Recurly
18
18
  # @return [String] Visa, MasterCard, American Express, Discover, JCB, etc.
19
19
  define_attribute :card_type, String
20
20
 
21
- # @!attribute cc_bin_country
22
- # @return [String] The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled.
23
- define_attribute :cc_bin_country, String
24
-
25
21
  # @!attribute exp_month
26
22
  # @return [Integer] Expiration month.
27
23
  define_attribute :exp_month, Integer
@@ -46,10 +46,6 @@ module Recurly
46
46
  # @return [String] Optional description, not displayed.
47
47
  define_attribute :description, String
48
48
 
49
- # @!attribute dunning_campaign_id
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
- define_attribute :dunning_campaign_id, String
52
-
53
49
  # @!attribute hosted_pages
54
50
  # @return [PlanHostedPages] Hosted pages settings
55
51
  define_attribute :hosted_pages, :PlanHostedPages
@@ -107,7 +103,7 @@ module Recurly
107
103
  define_attribute :trial_length, Integer
108
104
 
109
105
  # @!attribute trial_requires_billing_info
110
- # @return [Boolean] Allow free trial subscriptions to be created without billing info.
106
+ # @return [Boolean] Allow free trial subscriptions to be created without billing info. Should not be used if billing info is needed for initial invoice due to existing uninvoiced charges or setup fee.
111
107
  define_attribute :trial_requires_billing_info, :Boolean
112
108
 
113
109
  # @!attribute trial_unit
@@ -14,10 +14,6 @@ module Recurly
14
14
  # @return [Float] Amount of one-time setup fee automatically charged at the beginning of a subscription billing cycle. For subscription plans with a trial, the setup fee will be charged at the time of signup. Setup fees do not increase with the quantity of a subscription plan.
15
15
  define_attribute :setup_fee, Float
16
16
 
17
- # @!attribute tax_inclusive
18
- # @return [Boolean] 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.
19
- define_attribute :tax_inclusive, :Boolean
20
-
21
17
  # @!attribute unit_amount
22
18
  # @return [Float] Unit price
23
19
  define_attribute :unit_amount, Float
@@ -10,10 +10,6 @@ module Recurly
10
10
  # @return [String] 3-letter ISO 4217 currency code.
11
11
  define_attribute :currency, String
12
12
 
13
- # @!attribute tax_inclusive
14
- # @return [Boolean] 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.
15
- define_attribute :tax_inclusive, :Boolean
16
-
17
13
  # @!attribute unit_amount
18
14
  # @return [Float] Unit price
19
15
  define_attribute :unit_amount, Float
@@ -19,7 +19,7 @@ module Recurly
19
19
  define_attribute :company, String
20
20
 
21
21
  # @!attribute country
22
- # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
22
+ # @return [String] Country, 2-letter ISO code.
23
23
  define_attribute :country, String
24
24
 
25
25
  # @!attribute created_at
@@ -14,10 +14,6 @@ module Recurly
14
14
  # @return [DateTime] Activated at
15
15
  define_attribute :activated_at, DateTime
16
16
 
17
- # @!attribute active_invoice_id
18
- # @return [String] The invoice ID of the latest invoice created for an active subscription.
19
- define_attribute :active_invoice_id, String
20
-
21
17
  # @!attribute add_ons
22
18
  # @return [Array[SubscriptionAddOn]] Add-ons
23
19
  define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOn }