recurly 3.29.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/.bumpversion.cfg +1 -1
  3. data/.github/workflows/docs.yml +2 -2
  4. data/.github_changelog_generator +8 -0
  5. data/.travis.yml +13 -0
  6. data/CHANGELOG.md +202 -391
  7. data/CONTRIBUTING.md +0 -4
  8. data/GETTING_STARTED.md +20 -17
  9. data/README.md +0 -3
  10. data/lib/data/ca-certificates.crt +40 -0
  11. data/lib/recurly/client/operations.rb +815 -748
  12. data/lib/recurly/client.rb +44 -28
  13. data/lib/recurly/errors/api_errors.rb +33 -1
  14. data/lib/recurly/errors.rb +5 -23
  15. data/lib/recurly/pager.rb +5 -15
  16. data/lib/recurly/requests/{account_acquisition_updatable.rb → account_acquisition_update.rb} +1 -1
  17. data/lib/recurly/requests/account_create.rb +2 -14
  18. data/lib/recurly/requests/account_purchase.rb +2 -14
  19. data/lib/recurly/requests/account_update.rb +0 -12
  20. data/lib/recurly/requests/add_on_create.rb +5 -5
  21. data/lib/recurly/requests/add_on_pricing.rb +5 -5
  22. data/lib/recurly/requests/add_on_update.rb +3 -3
  23. data/lib/recurly/requests/address.rb +1 -13
  24. data/lib/recurly/requests/billing_info_create.rb +4 -52
  25. data/lib/recurly/requests/coupon_create.rb +1 -1
  26. data/lib/recurly/requests/custom_field.rb +0 -8
  27. data/lib/recurly/requests/external_transaction.rb +1 -1
  28. data/lib/recurly/requests/invoice_address.rb +1 -5
  29. data/lib/recurly/requests/invoice_collect.rb +1 -1
  30. data/lib/recurly/requests/invoice_create.rb +1 -9
  31. data/lib/recurly/requests/{invoice_updatable.rb → invoice_update.rb} +1 -1
  32. data/lib/recurly/requests/item_create.rb +1 -1
  33. data/lib/recurly/requests/item_update.rb +1 -1
  34. data/lib/recurly/requests/line_item_create.rb +3 -15
  35. data/lib/recurly/requests/line_item_refund.rb +0 -4
  36. data/lib/recurly/requests/plan_create.rb +1 -17
  37. data/lib/recurly/requests/plan_pricing.rb +1 -5
  38. data/lib/recurly/requests/plan_update.rb +1 -13
  39. data/lib/recurly/requests/pricing.rb +0 -4
  40. data/lib/recurly/requests/purchase_create.rb +1 -9
  41. data/lib/recurly/requests/shipping_address_create.rb +1 -5
  42. data/lib/recurly/requests/shipping_address_update.rb +1 -5
  43. data/lib/recurly/requests/subscription_add_on_create.rb +8 -4
  44. data/lib/recurly/requests/subscription_add_on_tier.rb +5 -1
  45. data/lib/recurly/requests/subscription_add_on_update.rb +6 -2
  46. data/lib/recurly/requests/subscription_change_create.rb +1 -13
  47. data/lib/recurly/requests/subscription_create.rb +6 -26
  48. data/lib/recurly/requests/subscription_pause.rb +1 -1
  49. data/lib/recurly/requests/subscription_purchase.rb +3 -31
  50. data/lib/recurly/requests/subscription_update.rb +1 -13
  51. data/lib/recurly/requests/tier.rb +2 -2
  52. data/lib/recurly/requests/{plan_ramp_pricing.rb → tier_pricing.rb} +6 -2
  53. data/lib/recurly/requests/usage_create.rb +1 -1
  54. data/lib/recurly/resources/account.rb +0 -12
  55. data/lib/recurly/resources/account_balance_amount.rb +0 -8
  56. data/lib/recurly/resources/account_mini.rb +0 -4
  57. data/lib/recurly/resources/add_on.rb +2 -2
  58. data/lib/recurly/resources/add_on_pricing.rb +5 -5
  59. data/lib/recurly/resources/address.rb +1 -13
  60. data/lib/recurly/resources/address_with_name.rb +46 -0
  61. data/lib/recurly/resources/billing_info.rb +1 -5
  62. data/lib/recurly/resources/billing_info_updated_by.rb +1 -1
  63. data/lib/recurly/resources/coupon.rb +5 -17
  64. data/lib/recurly/resources/custom_field.rb +0 -8
  65. data/lib/recurly/resources/custom_field_definition.rb +1 -1
  66. data/lib/recurly/resources/invoice.rb +8 -20
  67. data/lib/recurly/resources/invoice_address.rb +1 -5
  68. data/lib/recurly/resources/item.rb +1 -1
  69. data/lib/recurly/resources/line_item.rb +9 -29
  70. data/lib/recurly/resources/payment_method.rb +0 -12
  71. data/lib/recurly/resources/plan.rb +2 -18
  72. data/lib/recurly/resources/plan_pricing.rb +1 -5
  73. data/lib/recurly/resources/pricing.rb +0 -4
  74. data/lib/recurly/resources/shipping_address.rb +1 -5
  75. data/lib/recurly/resources/subscription.rb +0 -20
  76. data/lib/recurly/resources/subscription_add_on.rb +6 -2
  77. data/lib/recurly/resources/subscription_add_on_tier.rb +5 -1
  78. data/lib/recurly/resources/subscription_change.rb +0 -16
  79. data/lib/recurly/resources/tax_info.rb +3 -7
  80. data/lib/recurly/resources/tier.rb +2 -2
  81. data/lib/recurly/resources/{plan_ramp_pricing.rb → tier_pricing.rb} +6 -2
  82. data/lib/recurly/resources/transaction.rb +3 -7
  83. data/lib/recurly/resources/unique_coupon_code_params.rb +26 -0
  84. data/lib/recurly/resources/usage.rb +6 -2
  85. data/lib/recurly/version.rb +1 -1
  86. data/openapi/api.yaml +2308 -13819
  87. data/scripts/build +2 -2
  88. data/scripts/bump +11 -0
  89. data/scripts/changelog +14 -0
  90. data/scripts/format +2 -2
  91. data/scripts/prepare-release +29 -43
  92. data/scripts/release +20 -5
  93. metadata +14 -33
  94. data/.changelog_config.yaml +0 -11
  95. data/.github/workflows/ci.yml +0 -29
  96. data/.github/workflows/pr-review.yml +0 -27
  97. data/CODE_OF_CONDUCT.md +0 -130
  98. data/lib/recurly/errors/network_errors.rb +0 -10
  99. data/lib/recurly/requests/billing_info_verify.rb +0 -18
  100. data/lib/recurly/requests/billing_info_verify_cvv.rb +0 -26
  101. data/lib/recurly/requests/credit_application_policy.rb +0 -18
  102. data/lib/recurly/requests/dunning_campaigns_bulk_update.rb +0 -18
  103. data/lib/recurly/requests/gateway_attributes.rb +0 -14
  104. data/lib/recurly/requests/plan_ramp_interval.rb +0 -18
  105. data/lib/recurly/requests/subscription_change_billing_info_create.rb +0 -14
  106. data/lib/recurly/requests/subscription_ramp_interval.rb +0 -18
  107. data/lib/recurly/resources/credit_application_policy.rb +0 -18
  108. data/lib/recurly/resources/dunning_campaign.rb +0 -50
  109. data/lib/recurly/resources/dunning_campaigns_bulk_update_response.rb +0 -18
  110. data/lib/recurly/resources/dunning_cycle.rb +0 -58
  111. data/lib/recurly/resources/dunning_interval.rb +0 -18
  112. data/lib/recurly/resources/gateway_attributes.rb +0 -14
  113. data/lib/recurly/resources/line_item_list.rb +0 -26
  114. data/lib/recurly/resources/plan_ramp_interval.rb +0 -18
  115. data/lib/recurly/resources/subscription_change_billing_info.rb +0 -14
  116. data/lib/recurly/resources/subscription_change_preview.rb +0 -90
  117. data/lib/recurly/resources/subscription_ramp_interval_response.rb +0 -30
  118. data/lib/recurly/resources/tax_detail.rb +0 -38
@@ -19,24 +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
- # @!attribute bulk
26
- # @return [Boolean] Optional field to be used only when needing to bypass the 60 second limit on creating subscriptions. Should only be used when creating subscriptions in bulk from the API.
27
- define_attribute :bulk, :Boolean
28
-
29
25
  # @!attribute collection_method
30
26
  # @return [String] Collection method
31
27
  define_attribute :collection_method, String
32
28
 
33
- # @!attribute coupon_code
34
- # @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.
35
- define_attribute :coupon_code, String
36
-
37
- # @!attribute credit_application_policy
38
- # @return [CreditApplicationPolicy] Controls whether credit invoices are automatically applied to new invoices. The `mode` field determines the application behavior. When mode is `all`, the optional `allowed_origins` array can restrict which credit invoice origins are applied. - `all`: All available credit invoices are applied (default) - `none`: No credit invoices are applied automatically
39
- define_attribute :credit_application_policy, :CreditApplicationPolicy
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 }
40
32
 
41
33
  # @!attribute credit_customer_notes
42
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.
@@ -78,10 +70,6 @@ module Recurly
78
70
  # @return [Integer] Optionally override the default quantity of 1.
79
71
  define_attribute :quantity, Integer
80
72
 
81
- # @!attribute ramp_intervals
82
- # @return [Array[SubscriptionRampInterval]] The new set of ramp intervals for the subscription.
83
- define_attribute :ramp_intervals, Array, { :item_type => :SubscriptionRampInterval }
84
-
85
73
  # @!attribute renewal_billing_cycles
86
74
  # @return [Integer] If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`.
87
75
  define_attribute :renewal_billing_cycles, Integer
@@ -95,13 +83,9 @@ module Recurly
95
83
  define_attribute :shipping, :SubscriptionShippingCreate
96
84
 
97
85
  # @!attribute starts_at
98
- # @return [DateTime] If set, the subscription will begin on this specified date. The subscription will apply the setup fee and trial period, unless the plan has no trial. Omit this field if the subscription should be started immediately.
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.
99
87
  define_attribute :starts_at, DateTime
100
88
 
101
- # @!attribute tax_inclusive
102
- # @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.
103
- define_attribute :tax_inclusive, :Boolean
104
-
105
89
  # @!attribute terms_and_conditions
106
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.
107
91
  define_attribute :terms_and_conditions, String
@@ -115,16 +99,12 @@ module Recurly
115
99
  define_attribute :transaction_type, String
116
100
 
117
101
  # @!attribute trial_ends_at
118
- # @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.
119
103
  define_attribute :trial_ends_at, DateTime
120
104
 
121
105
  # @!attribute unit_amount
122
106
  # @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.
123
107
  define_attribute :unit_amount, Float
124
-
125
- # @!attribute vat_reverse_charge_notes
126
- # @return [String] This will default to the VAT reverse charge notes text specified on the Invoice Settings. Specify custom notes to add or override VAT reverse charge notes. Custom notes will stay with a subscription on all renewals.
127
- define_attribute :vat_reverse_charge_notes, String
128
108
  end
129
109
  end
130
110
  end
@@ -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
@@ -14,22 +14,10 @@ module Recurly
14
14
  # @return [Boolean] Whether the subscription renews at the end of its term.
15
15
  define_attribute :auto_renew, :Boolean
16
16
 
17
- # @!attribute bulk
18
- # @return [Boolean] Optional field to be used only when needing to bypass the 60 second limit on creating subscriptions. Should only be used when creating subscriptions in bulk from the API.
19
- define_attribute :bulk, :Boolean
20
-
21
- # @!attribute credit_application_policy
22
- # @return [CreditApplicationPolicy] Controls whether credit invoices are automatically applied to new invoices. The `mode` field determines the application behavior. When mode is `all`, the optional `allowed_origins` array can restrict which credit invoice origins are applied. - `all`: All available credit invoices are applied (default) - `none`: No credit invoices are applied automatically
23
- define_attribute :credit_application_policy, :CreditApplicationPolicy
24
-
25
17
  # @!attribute custom_fields
26
18
  # @return [Array[CustomField]] The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
27
19
  define_attribute :custom_fields, Array, { :item_type => :CustomField }
28
20
 
29
- # @!attribute customer_notes
30
- # @return [String] Specify custom notes to add or override Customer Notes. Custom notes will stay with a subscription on all renewals.
31
- define_attribute :customer_notes, String
32
-
33
21
  # @!attribute next_bill_date
34
22
  # @return [DateTime] If present, this sets the date the subscription's next billing period will start (`current_period_ends_at`). This can be used to align the subscription’s billing to a specific day of the month. The initial invoice will be prorated for the period between the subscription's activation date and the billing period end date. Subsequent periods will be based off the plan interval. For a subscription with a trial period, this will change when the trial expires.
35
23
  define_attribute :next_bill_date, DateTime
@@ -46,10 +34,6 @@ module Recurly
46
34
  # @return [Integer] Optionally override the default quantity of 1.
47
35
  define_attribute :quantity, Integer
48
36
 
49
- # @!attribute ramp_intervals
50
- # @return [Array[SubscriptionRampInterval]] The new set of ramp intervals for the subscription.
51
- define_attribute :ramp_intervals, Array, { :item_type => :SubscriptionRampInterval }
52
-
53
37
  # @!attribute renewal_billing_cycles
54
38
  # @return [Integer] If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`.
55
39
  define_attribute :renewal_billing_cycles, Integer
@@ -63,32 +47,20 @@ module Recurly
63
47
  define_attribute :shipping, :SubscriptionShippingPurchase
64
48
 
65
49
  # @!attribute starts_at
66
- # @return [DateTime] If set, the subscription will begin on this specified date. The subscription will apply the setup fee and trial period, unless the plan has no trial.
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.
67
51
  define_attribute :starts_at, DateTime
68
52
 
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.
71
- define_attribute :tax_inclusive, :Boolean
72
-
73
- # @!attribute terms_and_conditions
74
- # @return [String] Specify custom notes to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals.
75
- define_attribute :terms_and_conditions, String
76
-
77
53
  # @!attribute total_billing_cycles
78
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.
79
55
  define_attribute :total_billing_cycles, Integer
80
56
 
81
57
  # @!attribute trial_ends_at
82
- # @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.
83
59
  define_attribute :trial_ends_at, DateTime
84
60
 
85
61
  # @!attribute unit_amount
86
- # @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.
87
63
  define_attribute :unit_amount, Float
88
-
89
- # @!attribute vat_reverse_charge_notes
90
- # @return [String] Specify custom notes to add or override VAT reverse charge notes. Custom notes will stay with a subscription on all renewals.
91
- define_attribute :vat_reverse_charge_notes, String
92
64
  end
93
65
  end
94
66
  end
@@ -11,17 +11,13 @@ 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
18
18
  # @return [String] Change collection method
19
19
  define_attribute :collection_method, String
20
20
 
21
- # @!attribute credit_application_policy
22
- # @return [CreditApplicationPolicy] Controls whether credit invoices are automatically applied to new invoices. The `mode` field determines the application behavior. When mode is `all`, the optional `allowed_origins` array can restrict which credit invoice origins are applied. - `all`: All available credit invoices are applied (default) - `none`: No credit invoices are applied automatically
23
- define_attribute :credit_application_policy, :CreditApplicationPolicy
24
-
25
21
  # @!attribute custom_fields
26
22
  # @return [Array[CustomField]] The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
27
23
  define_attribute :custom_fields, Array, { :item_type => :CustomField }
@@ -58,17 +54,9 @@ module Recurly
58
54
  # @return [SubscriptionShippingUpdate] Subscription shipping details
59
55
  define_attribute :shipping, :SubscriptionShippingUpdate
60
56
 
61
- # @!attribute tax_inclusive
62
- # @return [Boolean] This field is deprecated. Please do not use it.
63
- define_attribute :tax_inclusive, :Boolean
64
-
65
57
  # @!attribute terms_and_conditions
66
58
  # @return [String] Specify custom notes to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals.
67
59
  define_attribute :terms_and_conditions, String
68
-
69
- # @!attribute vat_reverse_charge_notes
70
- # @return [String] Specify custom notes to add or override VAT reverse charge notes. Custom notes will stay with a subscription on all renewals.
71
- define_attribute :vat_reverse_charge_notes, String
72
60
  end
73
61
  end
74
62
  end
@@ -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
@@ -4,15 +4,19 @@
4
4
  # need and we will usher them to the appropriate places.
5
5
  module Recurly
6
6
  module Requests
7
- class PlanRampPricing < Request
7
+ class TierPricing < Request
8
8
 
9
9
  # @!attribute currency
10
10
  # @return [String] 3-letter ISO 4217 currency code.
11
11
  define_attribute :currency, String
12
12
 
13
13
  # @!attribute unit_amount
14
- # @return [Float] Represents the price for the Ramp Interval.
14
+ # @return [Float] Allows up to 2 decimal places. Required unless `unit_amount_decimal` is provided.
15
15
  define_attribute :unit_amount, Float
16
+
17
+ # @!attribute unit_amount_decimal
18
+ # @return [String] Allows up to 9 decimal places. Only supported when `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
19
+ define_attribute :unit_amount_decimal, String
16
20
  end
17
21
  end
18
22
  end
@@ -7,7 +7,7 @@ module Recurly
7
7
  class UsageCreate < Request
8
8
 
9
9
  # @!attribute amount
10
- # @return [Float] The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places. Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is "500").
10
+ # @return [Float] The amount of usage. Can be positive, negative, or 0. No decimals allowed, we will strip them. If the usage-based add-on is billed with a percentage, your usage will be a monetary amount you will want to format in cents. (e.g., $5.00 is "500").
11
11
  define_attribute :amount, Float
12
12
 
13
13
  # @!attribute merchant_tag
@@ -42,18 +42,10 @@ 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
52
48
 
53
- # @!attribute entity_use_code
54
- # @return [String] The Avalara AvaTax value that can be passed to identify the customer type for tax purposes. The range of values can be A - R (more info at Avalara). Value is case-sensitive.
55
- define_attribute :entity_use_code, String
56
-
57
49
  # @!attribute exemption_certificate
58
50
  # @return [String] The tax exemption certificate number for the account. If the merchant has an integration for the Vertex tax provider, this optional value will be sent in any tax calculation requests for the account.
59
51
  define_attribute :exemption_certificate, String
@@ -110,10 +102,6 @@ module Recurly
110
102
  # @return [String] Used to determine the language and locale of emails sent on behalf of the merchant to the customer.
111
103
  define_attribute :preferred_locale, String
112
104
 
113
- # @!attribute preferred_time_zone
114
- # @return [String] The [IANA time zone name](https://docs.recurly.com/docs/email-time-zones-and-time-stamps#supported-api-iana-time-zone-names) used to determine the time zone of emails sent on behalf of the merchant to the customer.
115
- define_attribute :preferred_time_zone, String
116
-
117
105
  # @!attribute shipping_addresses
118
106
  # @return [Array[ShippingAddress]] The shipping addresses on the account.
119
107
  define_attribute :shipping_addresses, Array, { :item_type => :ShippingAddress }
@@ -10,17 +10,9 @@ module Recurly
10
10
  # @return [Float] Total amount the account is past due.
11
11
  define_attribute :amount, Float
12
12
 
13
- # @!attribute available_credit_amount
14
- # @return [Float] Total amount of the open balances on credit invoices for the account.
15
- define_attribute :available_credit_amount, Float
16
-
17
13
  # @!attribute currency
18
14
  # @return [String] 3-letter ISO 4217 currency code.
19
15
  define_attribute :currency, String
20
-
21
- # @!attribute processing_prepayment_amount
22
- # @return [Float] Total amount for the prepayment credit invoices in a `processing` state on the account.
23
- define_attribute :processing_prepayment_amount, Float
24
16
  end
25
17
  end
26
18
  end
@@ -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
@@ -87,11 +87,11 @@ module Recurly
87
87
  define_attribute :state, String
88
88
 
89
89
  # @!attribute tax_code
90
- # @return [String] Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes. If `item_code`/`item_id` is part of the request then `tax_code` must be absent.
90
+ # @return [String] Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.
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] This field is deprecated. Please do not use it.
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,21 +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 geo_code
22
- # @return [String] Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.
23
- define_attribute :geo_code, String
24
-
25
- # @!attribute last_name
26
- # @return [String] Last name
27
- define_attribute :last_name, String
28
-
29
17
  # @!attribute phone
30
18
  # @return [String] Phone number
31
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
@@ -10,14 +10,6 @@ module Recurly
10
10
  # @return [String] Fields must be created in the UI before values can be assigned to them.
11
11
  define_attribute :name, String
12
12
 
13
- # @!attribute source_record_id
14
- # @return [String] The UUID of the record this custom field was automatically copied from. Only present when the field was copied from another record.
15
- define_attribute :source_record_id, String
16
-
17
- # @!attribute source_record_type
18
- # @return [String] The type of record this custom field was automatically copied from. Only present when the field was copied from another record.
19
- define_attribute :source_record_type, String
20
-
21
13
  # @!attribute value
22
14
  # @return [String] Any values that resemble a credit card number or security code (CVV/CVC) will be rejected.
23
15
  define_attribute :value, String
@@ -43,7 +43,7 @@ module Recurly
43
43
  define_attribute :updated_at, DateTime
44
44
 
45
45
  # @!attribute user_access
46
- # @return [String] The access control applied inside Recurly's admin UI: - `api_only` - No one will be able to view or edit this field's data via the admin UI. - `read_only` - Users with the Customers role will be able to view this field's data via the admin UI, but editing will only be available via the API. - `write` - Users with the Customers role will be able to view and edit this field's data via the admin UI. - `set_only` - Users with the Customers role will be able to set this field's data via the admin console.
46
+ # @return [String] The access control applied inside Recurly's admin UI: - `api_only` - No one will be able to view or edit this field's data via the admin UI. - `read_only` - Users with the Customers role will be able to view this field's data via the admin UI, but editing will only be available via the API. - `write` - Users with the Customers role will be able to view and edit this field's data via the admin UI.
47
47
  define_attribute :user_access, String
48
48
  end
49
49
  end
@@ -19,7 +19,7 @@ module Recurly
19
19
  define_attribute :balance, Float
20
20
 
21
21
  # @!attribute billing_info_id
22
- # @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature.
22
+ # @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info.
23
23
  define_attribute :billing_info_id, String
24
24
 
25
25
  # @!attribute closed_at
@@ -42,10 +42,6 @@ module Recurly
42
42
  # @return [String] 3-letter ISO 4217 currency code.
43
43
  define_attribute :currency, String
44
44
 
45
- # @!attribute custom_fields
46
- # @return [Array[CustomField]] A list of custom fields that were on the account at the time of invoice creation and were marked to be displayed on invoices. Read-only; cannot be set directly on the invoice.
47
- define_attribute :custom_fields, Array, { :item_type => :CustomField }
48
-
49
45
  # @!attribute customer_notes
50
46
  # @return [String] This will default to the Customer Notes text specified on the Invoice Settings. Specify custom notes to add or override Customer Notes.
51
47
  define_attribute :customer_notes, String
@@ -58,17 +54,17 @@ module Recurly
58
54
  # @return [DateTime] Date invoice is due. This is the date the net terms are reached.
59
55
  define_attribute :due_at, DateTime
60
56
 
61
- # @!attribute dunning_campaign_id
62
- # @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.
63
- 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
64
60
 
65
61
  # @!attribute id
66
62
  # @return [String] Invoice ID
67
63
  define_attribute :id, String
68
64
 
69
65
  # @!attribute line_items
70
- # @return [LineItemList]
71
- define_attribute :line_items, :LineItemList
66
+ # @return [Array[LineItem]] Line Items
67
+ define_attribute :line_items, Array, { :item_type => :LineItem }
72
68
 
73
69
  # @!attribute net_terms
74
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.
@@ -95,7 +91,7 @@ module Recurly
95
91
  define_attribute :po_number, String
96
92
 
97
93
  # @!attribute previous_invoice_id
98
- # @return [String] On refund invoices, this value will exist and show the invoice ID of the purchase invoice the refund was created from. This field is only populated for sites without the [Only Bill What Changed](https://docs.recurly.com/docs/only-bill-what-changed) feature enabled. Sites with Only Bill What Changed enabled should use the [related_invoices endpoint](https://recurly.com/developers/api/v2019-10-10/index.html#operation/list_related_invoices) to see purchase invoices refunded by this invoice.
94
+ # @return [String] On refund invoices, this value will exist and show the invoice ID of the purchase invoice the refund was created from.
99
95
  define_attribute :previous_invoice_id, String
100
96
 
101
97
  # @!attribute refundable_amount
@@ -115,13 +111,9 @@ module Recurly
115
111
  define_attribute :subscription_ids, Array, { :item_type => String }
116
112
 
117
113
  # @!attribute subtotal
118
- # @return [Float] The summation of charges and credits, before discounts and taxes.
114
+ # @return [Float] The summation of charges, discounts, and credits, before tax.
119
115
  define_attribute :subtotal, Float
120
116
 
121
- # @!attribute subtotal_after_discount
122
- # @return [Float] The summation of charges and credits, after discounts applied.
123
- define_attribute :subtotal_after_discount, Float
124
-
125
117
  # @!attribute tax
126
118
  # @return [Float] The total tax on this invoice.
127
119
  define_attribute :tax, Float
@@ -150,10 +142,6 @@ module Recurly
150
142
  # @return [DateTime] Last updated at
151
143
  define_attribute :updated_at, DateTime
152
144
 
153
- # @!attribute used_tax_service
154
- # @return [Boolean] Will be `true` when the invoice had a successful response from the tax service and `false` when the invoice was not sent to tax service due to a lack of address or enabled jurisdiction or was processed without tax due to a non-blocking error returned from the tax service.
155
- define_attribute :used_tax_service, :Boolean
156
-
157
145
  # @!attribute vat_number
158
146
  # @return [String] VAT registration number for the customer on this invoice. This will come from the VAT Number field in the Billing Info or the Account Info depending on your tax settings and the invoice collection method.
159
147
  define_attribute :vat_number, String
@@ -15,17 +15,13 @@ 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
22
22
  # @return [String] First name
23
23
  define_attribute :first_name, String
24
24
 
25
- # @!attribute geo_code
26
- # @return [String] Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.
27
- define_attribute :geo_code, String
28
-
29
25
  # @!attribute last_name
30
26
  # @return [String] Last name
31
27
  define_attribute :last_name, String
@@ -67,7 +67,7 @@ module Recurly
67
67
  define_attribute :state, String
68
68
 
69
69
  # @!attribute tax_code
70
- # @return [String] Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.
70
+ # @return [String] Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.
71
71
  define_attribute :tax_code, String
72
72
 
73
73
  # @!attribute tax_exempt