recurly 3.18.1 → 3.21.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 (80) hide show
  1. checksums.yaml +4 -4
  2. data/.bumpversion.cfg +1 -1
  3. data/.changelog_config.yaml +11 -0
  4. data/.github/workflows/ci.yml +29 -0
  5. data/.github/workflows/docs.yml +1 -1
  6. data/CHANGELOG.md +254 -163
  7. data/GETTING_STARTED.md +1 -1
  8. data/lib/recurly/client/operations.rb +212 -134
  9. data/lib/recurly/client.rb +5 -3
  10. data/lib/recurly/errors/api_errors.rb +2 -0
  11. data/lib/recurly/pager.rb +1 -1
  12. data/lib/recurly/requests/account_create.rb +4 -0
  13. data/lib/recurly/requests/account_purchase.rb +4 -0
  14. data/lib/recurly/requests/account_update.rb +4 -0
  15. data/lib/recurly/requests/add_on_create.rb +3 -3
  16. data/lib/recurly/requests/add_on_pricing.rb +4 -0
  17. data/lib/recurly/requests/add_on_update.rb +1 -1
  18. data/lib/recurly/requests/address.rb +1 -1
  19. data/lib/recurly/requests/billing_info_create.rb +6 -2
  20. data/lib/recurly/requests/billing_info_verify.rb +14 -0
  21. data/lib/recurly/requests/dunning_campaigns_bulk_update.rb +18 -0
  22. data/lib/recurly/requests/invoice_address.rb +1 -1
  23. data/lib/recurly/requests/invoice_collect.rb +1 -1
  24. data/lib/recurly/requests/line_item_create.rb +6 -2
  25. data/lib/recurly/requests/plan_create.rb +12 -0
  26. data/lib/recurly/requests/plan_pricing.rb +5 -1
  27. data/lib/recurly/requests/plan_ramp_interval.rb +18 -0
  28. data/lib/recurly/requests/plan_ramp_pricing.rb +18 -0
  29. data/lib/recurly/requests/plan_update.rb +8 -0
  30. data/lib/recurly/requests/pricing.rb +4 -0
  31. data/lib/recurly/requests/purchase_create.rb +1 -1
  32. data/lib/recurly/requests/shipping_address_create.rb +1 -1
  33. data/lib/recurly/requests/shipping_address_update.rb +1 -1
  34. data/lib/recurly/requests/subscription_change_billing_info_create.rb +14 -0
  35. data/lib/recurly/requests/subscription_change_create.rb +12 -0
  36. data/lib/recurly/requests/subscription_create.rb +10 -2
  37. data/lib/recurly/requests/subscription_pause.rb +1 -1
  38. data/lib/recurly/requests/subscription_purchase.rb +10 -2
  39. data/lib/recurly/requests/subscription_ramp_interval.rb +18 -0
  40. data/lib/recurly/requests/subscription_update.rb +5 -1
  41. data/lib/recurly/resources/account.rb +4 -0
  42. data/lib/recurly/resources/account_balance_amount.rb +4 -0
  43. data/lib/recurly/resources/account_mini.rb +4 -0
  44. data/lib/recurly/resources/add_on_pricing.rb +4 -0
  45. data/lib/recurly/resources/address.rb +1 -1
  46. data/lib/recurly/resources/billing_info.rb +5 -1
  47. data/lib/recurly/resources/billing_info_updated_by.rb +1 -1
  48. data/lib/recurly/resources/dunning_campaign.rb +50 -0
  49. data/lib/recurly/resources/dunning_campaigns_bulk_update_response.rb +18 -0
  50. data/lib/recurly/resources/dunning_cycle.rb +58 -0
  51. data/lib/recurly/resources/dunning_interval.rb +18 -0
  52. data/lib/recurly/resources/invoice.rb +6 -2
  53. data/lib/recurly/resources/invoice_address.rb +1 -1
  54. data/lib/recurly/resources/line_item.rb +11 -3
  55. data/lib/recurly/resources/payment_method.rb +4 -0
  56. data/lib/recurly/resources/plan.rb +12 -0
  57. data/lib/recurly/resources/plan_pricing.rb +5 -1
  58. data/lib/recurly/resources/plan_ramp_interval.rb +18 -0
  59. data/lib/recurly/resources/plan_ramp_pricing.rb +18 -0
  60. data/lib/recurly/resources/pricing.rb +4 -0
  61. data/lib/recurly/resources/shipping_address.rb +1 -1
  62. data/lib/recurly/resources/subscription.rb +12 -0
  63. data/lib/recurly/resources/subscription_change.rb +12 -0
  64. data/lib/recurly/resources/subscription_change_billing_info.rb +14 -0
  65. data/lib/recurly/resources/subscription_change_preview.rb +12 -0
  66. data/lib/recurly/resources/subscription_ramp_interval_response.rb +22 -0
  67. data/lib/recurly/resources/tax_detail.rb +26 -0
  68. data/lib/recurly/resources/tax_info.rb +4 -0
  69. data/lib/recurly/resources/transaction.rb +5 -1
  70. data/lib/recurly/version.rb +1 -1
  71. data/openapi/api.yaml +976 -162
  72. data/scripts/build +2 -2
  73. data/scripts/format +2 -2
  74. data/scripts/prepare-release +43 -29
  75. data/scripts/release +5 -20
  76. metadata +23 -10
  77. data/.github_changelog_generator +0 -8
  78. data/.travis.yml +0 -14
  79. data/scripts/bump +0 -11
  80. data/scripts/changelog +0 -14
@@ -103,12 +103,14 @@ module Recurly
103
103
  handle_response! request, http_response
104
104
  end
105
105
 
106
- def post(path, request_data, request_class, **options)
107
- request_class.new(request_data).validate!
106
+ def post(path, request_data = nil, request_class = nil, **options)
108
107
  request = Net::HTTP::Post.new build_url(path, options)
109
108
  request.set_content_type(JSON_CONTENT_TYPE)
110
109
  set_headers(request, options[:headers])
111
- request.body = JSON.dump(request_data)
110
+ if request_data
111
+ request_class.new(request_data).validate!
112
+ request.body = JSON.dump(request_data)
113
+ end
112
114
  http_response = run_request(request, options)
113
115
  handle_response! request, http_response
114
116
  end
@@ -28,6 +28,8 @@ module Recurly
28
28
 
29
29
  class ServiceNotAvailableError < InternalServerError; end
30
30
 
31
+ class TaxServiceError < InternalServerError; end
32
+
31
33
  class BadGatewayError < ServerError; end
32
34
 
33
35
  class ServiceUnavailableError < ServerError; end
data/lib/recurly/pager.rb CHANGED
@@ -24,7 +24,7 @@ module Recurly
24
24
 
25
25
  # Makes a HEAD request to the API to determine how many total records exist.
26
26
  def count
27
- resource = @client.send(:head, self.next, @options)
27
+ resource = @client.send(:head, self.next, **@options)
28
28
  resource.get_response.total_records
29
29
  end
30
30
 
@@ -38,6 +38,10 @@ module Recurly
38
38
  # @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.
39
39
  define_attribute :custom_fields, Array, { :item_type => :CustomField }
40
40
 
41
+ # @!attribute dunning_campaign_id
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
+ define_attribute :dunning_campaign_id, String
44
+
41
45
  # @!attribute email
42
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.
43
47
  define_attribute :email, String
@@ -38,6 +38,10 @@ module Recurly
38
38
  # @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.
39
39
  define_attribute :custom_fields, Array, { :item_type => :CustomField }
40
40
 
41
+ # @!attribute dunning_campaign_id
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
+ define_attribute :dunning_campaign_id, String
44
+
41
45
  # @!attribute email
42
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.
43
47
  define_attribute :email, String
@@ -30,6 +30,10 @@ module Recurly
30
30
  # @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.
31
31
  define_attribute :custom_fields, Array, { :item_type => :CustomField }
32
32
 
33
+ # @!attribute dunning_campaign_id
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
+ define_attribute :dunning_campaign_id, String
36
+
33
37
  # @!attribute email
34
38
  # @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.
35
39
  define_attribute :email, String
@@ -27,7 +27,7 @@ module Recurly
27
27
  define_attribute :code, String
28
28
 
29
29
  # @!attribute currencies
30
- # @return [Array[AddOnPricing]] * If `item_code`/`item_id` is part of the request and the item has a default currency then `currencies` is optional. If the item does not have a default currency, then `currencies` is required. If `item_code`/`item_id` is not present `currencies` is required. * If the add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `currencies` must be absent.
30
+ # @return [Array[AddOnPricing]] * If `item_code`/`item_id` is part of the request and the item has a default currency then `currencies` is optional. If the item does not have a default currency, then `currencies` is required. If `item_code`/`item_id` is not present `currencies` is required. * If the add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `currencies` must be absent. * Must be absent if `add_on_type` is `usage` and `usage_type` is `percentage`.
31
31
  define_attribute :currencies, Array, { :item_type => :AddOnPricing }
32
32
 
33
33
  # @!attribute default_quantity
@@ -39,11 +39,11 @@ module Recurly
39
39
  define_attribute :display_quantity, :Boolean
40
40
 
41
41
  # @!attribute item_code
42
- # @return [String] Unique code to identify an item. Avaliable when the `Credit Invoices` and `Subscription Billing Terms` features are enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
42
+ # @return [String] Unique code to identify an item. Avaliable when the `Credit Invoices` feature is enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
43
43
  define_attribute :item_code, String
44
44
 
45
45
  # @!attribute item_id
46
- # @return [String] System-generated unique identifier for an item. Available when the `Credit Invoices` and `Subscription Billing Terms` features are enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
46
+ # @return [String] System-generated unique identifier for an item. Available when the `Credit Invoices` feature is enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
47
47
  define_attribute :item_id, String
48
48
 
49
49
  # @!attribute measured_unit_id
@@ -10,6 +10,10 @@ 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
+
13
17
  # @!attribute unit_amount
14
18
  # @return [Float] Unit price
15
19
  define_attribute :unit_amount, Float
@@ -23,7 +23,7 @@ module Recurly
23
23
  define_attribute :code, String
24
24
 
25
25
  # @!attribute currencies
26
- # @return [Array[AddOnPricing]] If the add-on's `tier_type` is `tiered`, `volume` or `stairstep`, then `currencies` must be absent.
26
+ # @return [Array[AddOnPricing]] If the add-on's `tier_type` is `tiered`, `volume` or `stairstep`, then `currencies` must be absent. Must also be absent if `add_on_type` is `usage` and `usage_type` is `percentage`.
27
27
  define_attribute :currencies, Array, { :item_type => :AddOnPricing }
28
28
 
29
29
  # @!attribute default_quantity
@@ -11,7 +11,7 @@ module Recurly
11
11
  define_attribute :city, String
12
12
 
13
13
  # @!attribute country
14
- # @return [String] Country, 2-letter ISO code.
14
+ # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
15
15
  define_attribute :country, String
16
16
 
17
17
  # @!attribute first_name
@@ -22,6 +22,10 @@ module Recurly
22
22
  # @return [String] Amazon billing agreement ID
23
23
  define_attribute :amazon_billing_agreement_id, String
24
24
 
25
+ # @!attribute backup_payment_method
26
+ # @return [Boolean] The `backup_payment_method` field is used to designate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined. All payment methods, including the billing info marked `primary_payment_method` can be set as a backup. An account can have a maximum of 1 backup, if a user sets a different payment method as a backup, the existing backup will no longer be marked as such.
27
+ define_attribute :backup_payment_method, :Boolean
28
+
25
29
  # @!attribute company
26
30
  # @return [String] Company name
27
31
  define_attribute :company, String
@@ -75,7 +79,7 @@ module Recurly
75
79
  define_attribute :paypal_billing_agreement_id, String
76
80
 
77
81
  # @!attribute primary_payment_method
78
- # @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.
82
+ # @return [Boolean] The `primary_payment_method` field 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` with a value of `true`. When adding billing infos via the billing_info and /accounts endpoints, this value is not permitted, and will return an error if provided.
79
83
  define_attribute :primary_payment_method, :Boolean
80
84
 
81
85
  # @!attribute routing_number
@@ -107,7 +111,7 @@ module Recurly
107
111
  define_attribute :transaction_type, String
108
112
 
109
113
  # @!attribute type
110
- # @return [String] The payment method type for a non-credit card based billing info. The value of `bacs` is the only accepted value (Bacs only)
114
+ # @return [String] The payment method type for a non-credit card based billing info. `bacs` and `becs` are the only accepted values.
111
115
  define_attribute :type, String
112
116
 
113
117
  # @!attribute vat_number
@@ -0,0 +1,14 @@
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 BillingInfoVerify < Request
8
+
9
+ # @!attribute gateway_code
10
+ # @return [String] An identifier for a specific payment gateway.
11
+ define_attribute :gateway_code, String
12
+ end
13
+ end
14
+ 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 DunningCampaignsBulkUpdate < Request
8
+
9
+ # @!attribute plan_codes
10
+ # @return [Array[String]] List of `plan_codes` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_ids` is present.
11
+ define_attribute :plan_codes, Array, { :item_type => String }
12
+
13
+ # @!attribute plan_ids
14
+ # @return [Array[String]] List of `plan_ids` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_codes` is present.
15
+ define_attribute :plan_ids, Array, { :item_type => String }
16
+ end
17
+ end
18
+ end
@@ -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 code.
18
+ # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
19
19
  define_attribute :country, String
20
20
 
21
21
  # @!attribute first_name
@@ -7,7 +7,7 @@ module Recurly
7
7
  class InvoiceCollect < Request
8
8
 
9
9
  # @!attribute billing_info_id
10
- # @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.
10
+ # @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.
11
11
  define_attribute :billing_info_id, String
12
12
 
13
13
  # @!attribute three_d_secure_action_result_token_id
@@ -35,11 +35,11 @@ module Recurly
35
35
  define_attribute :end_date, DateTime
36
36
 
37
37
  # @!attribute item_code
38
- # @return [String] Unique code to identify an item. Avaliable when the Credit Invoices and Subscription Billing Terms features are enabled.
38
+ # @return [String] Unique code to identify an item. Avaliable when the Credit Invoices feature is enabled.
39
39
  define_attribute :item_code, String
40
40
 
41
41
  # @!attribute item_id
42
- # @return [String] System-generated unique identifier for an item. Available when the Credit Invoices and Subscription Billing Terms features are enabled.
42
+ # @return [String] System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled.
43
43
  define_attribute :item_id, String
44
44
 
45
45
  # @!attribute origin
@@ -70,6 +70,10 @@ module Recurly
70
70
  # @return [Boolean] `true` exempts tax on charges, `false` applies tax on charges. If not defined, then defaults to the Plan and Site settings. This attribute does not work for credits (negative line items). Credits are always applied post-tax. Pre-tax discounts should use the Coupons feature.
71
71
  define_attribute :tax_exempt, :Boolean
72
72
 
73
+ # @!attribute tax_inclusive
74
+ # @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.
75
+ define_attribute :tax_inclusive, :Boolean
76
+
73
77
  # @!attribute type
74
78
  # @return [String] Line item type. If `item_code`/`item_id` is present then `type` should not be present. If `item_code`/`item_id` is not present then `type` is required.
75
79
  define_attribute :type, String
@@ -42,6 +42,10 @@ module Recurly
42
42
  # @return [String] Optional description, not displayed.
43
43
  define_attribute :description, String
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 plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
47
+ define_attribute :dunning_campaign_id, String
48
+
45
49
  # @!attribute hosted_pages
46
50
  # @return [PlanHostedPages] Hosted pages settings
47
51
  define_attribute :hosted_pages, :PlanHostedPages
@@ -58,6 +62,14 @@ module Recurly
58
62
  # @return [String] This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice.
59
63
  define_attribute :name, String
60
64
 
65
+ # @!attribute pricing_model
66
+ # @return [String] A fixed pricing model has the same price for each billing period. A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing periods. The price change could be an increase or decrease.
67
+ define_attribute :pricing_model, String
68
+
69
+ # @!attribute ramp_intervals
70
+ # @return [Array[PlanRampInterval]] Ramp Intervals
71
+ define_attribute :ramp_intervals, Array, { :item_type => :PlanRampInterval }
72
+
61
73
  # @!attribute revenue_schedule_type
62
74
  # @return [String] Revenue schedule type
63
75
  define_attribute :revenue_schedule_type, String
@@ -14,8 +14,12 @@ 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] This field is deprecated. Please do not use it.
19
+ define_attribute :tax_inclusive, :Boolean
20
+
17
21
  # @!attribute unit_amount
18
- # @return [Float] Unit price
22
+ # @return [Float] This field should not be sent when the pricing model is 'ramp'.
19
23
  define_attribute :unit_amount, Float
20
24
  end
21
25
  end
@@ -0,0 +1,18 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Requests
7
+ class PlanRampInterval < Request
8
+
9
+ # @!attribute currencies
10
+ # @return [Array[PlanRampPricing]] Represents the price for the ramp interval.
11
+ define_attribute :currencies, Array, { :item_type => :PlanRampPricing }
12
+
13
+ # @!attribute starting_billing_cycle
14
+ # @return [Integer] Represents the first billing cycle of a ramp.
15
+ define_attribute :starting_billing_cycle, Integer
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Requests
7
+ class PlanRampPricing < Request
8
+
9
+ # @!attribute currency
10
+ # @return [String] 3-letter ISO 4217 currency code.
11
+ define_attribute :currency, String
12
+
13
+ # @!attribute unit_amount
14
+ # @return [Float] Represents the price for the Ramp Interval.
15
+ define_attribute :unit_amount, Float
16
+ end
17
+ end
18
+ end
@@ -38,6 +38,10 @@ module Recurly
38
38
  # @return [String] Optional description, not displayed.
39
39
  define_attribute :description, String
40
40
 
41
+ # @!attribute dunning_campaign_id
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
+ define_attribute :dunning_campaign_id, String
44
+
41
45
  # @!attribute hosted_pages
42
46
  # @return [PlanHostedPages] Hosted pages settings
43
47
  define_attribute :hosted_pages, :PlanHostedPages
@@ -50,6 +54,10 @@ module Recurly
50
54
  # @return [String] This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice.
51
55
  define_attribute :name, String
52
56
 
57
+ # @!attribute ramp_intervals
58
+ # @return [Array[PlanRampInterval]] Ramp Intervals
59
+ define_attribute :ramp_intervals, Array, { :item_type => :PlanRampInterval }
60
+
53
61
  # @!attribute revenue_schedule_type
54
62
  # @return [String] Revenue schedule type
55
63
  define_attribute :revenue_schedule_type, String
@@ -10,6 +10,10 @@ 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
+
13
17
  # @!attribute unit_amount
14
18
  # @return [Float] Unit price
15
19
  define_attribute :unit_amount, Float
@@ -11,7 +11,7 @@ module Recurly
11
11
  define_attribute :account, :AccountPurchase
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.
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.
15
15
  define_attribute :billing_info_id, String
16
16
 
17
17
  # @!attribute collection_method
@@ -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 code.
18
+ # @return [String] Country, 2-letter ISO 3166-1 alpha-2 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 code.
18
+ # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
19
19
  define_attribute :country, String
20
20
 
21
21
  # @!attribute email
@@ -0,0 +1,14 @@
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 SubscriptionChangeBillingInfoCreate < Request
8
+
9
+ # @!attribute three_d_secure_action_result_token_id
10
+ # @return [String] A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge.
11
+ define_attribute :three_d_secure_action_result_token_id, String
12
+ end
13
+ end
14
+ end
@@ -10,6 +10,10 @@ module Recurly
10
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
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
+
13
17
  # @!attribute collection_method
14
18
  # @return [String] Collection method
15
19
  define_attribute :collection_method, String
@@ -42,6 +46,10 @@ module Recurly
42
46
  # @return [Integer] Optionally override the default quantity of 1.
43
47
  define_attribute :quantity, Integer
44
48
 
49
+ # @!attribute ramp_intervals
50
+ # @return [Array[SubscriptionRampInterval]] The new set of ramp intervals for the subscription.
51
+ define_attribute :ramp_intervals, Array, { :item_type => :SubscriptionRampInterval }
52
+
45
53
  # @!attribute revenue_schedule_type
46
54
  # @return [String] Revenue schedule type
47
55
  define_attribute :revenue_schedule_type, String
@@ -50,6 +58,10 @@ module Recurly
50
58
  # @return [SubscriptionChangeShippingCreate] The shipping address can currently only be changed immediately, using SubscriptionUpdate.
51
59
  define_attribute :shipping, :SubscriptionChangeShippingCreate
52
60
 
61
+ # @!attribute tax_inclusive
62
+ # @return [Boolean] This field is deprecated. Please do not use it.
63
+ define_attribute :tax_inclusive, :Boolean
64
+
53
65
  # @!attribute timeframe
54
66
  # @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`.
55
67
  define_attribute :timeframe, String
@@ -19,7 +19,7 @@ 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.
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.
23
23
  define_attribute :billing_info_id, String
24
24
 
25
25
  # @!attribute collection_method
@@ -70,6 +70,10 @@ module Recurly
70
70
  # @return [Integer] Optionally override the default quantity of 1.
71
71
  define_attribute :quantity, Integer
72
72
 
73
+ # @!attribute ramp_intervals
74
+ # @return [Array[SubscriptionRampInterval]] The new set of ramp intervals for the subscription.
75
+ define_attribute :ramp_intervals, Array, { :item_type => :SubscriptionRampInterval }
76
+
73
77
  # @!attribute renewal_billing_cycles
74
78
  # @return [Integer] If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`.
75
79
  define_attribute :renewal_billing_cycles, Integer
@@ -86,6 +90,10 @@ module Recurly
86
90
  # @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
91
  define_attribute :starts_at, DateTime
88
92
 
93
+ # @!attribute tax_inclusive
94
+ # @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.
95
+ define_attribute :tax_inclusive, :Boolean
96
+
89
97
  # @!attribute terms_and_conditions
90
98
  # @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.
91
99
  define_attribute :terms_and_conditions, String
@@ -99,7 +107,7 @@ module Recurly
99
107
  define_attribute :transaction_type, String
100
108
 
101
109
  # @!attribute trial_ends_at
102
- # @return [DateTime] If set, overrides the default trial behavior for the subscription. The date must be in the future.
110
+ # @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.
103
111
  define_attribute :trial_ends_at, DateTime
104
112
 
105
113
  # @!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.
10
+ # @return [Integer] Number of billing cycles to pause the subscriptions. A value of 0 will cancel any pending pauses on the subscription.
11
11
  define_attribute :remaining_pause_cycles, Integer
12
12
  end
13
13
  end
@@ -34,6 +34,10 @@ module Recurly
34
34
  # @return [Integer] Optionally override the default quantity of 1.
35
35
  define_attribute :quantity, Integer
36
36
 
37
+ # @!attribute ramp_intervals
38
+ # @return [Array[SubscriptionRampInterval]] The new set of ramp intervals for the subscription.
39
+ define_attribute :ramp_intervals, Array, { :item_type => :SubscriptionRampInterval }
40
+
37
41
  # @!attribute renewal_billing_cycles
38
42
  # @return [Integer] If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`.
39
43
  define_attribute :renewal_billing_cycles, Integer
@@ -50,16 +54,20 @@ module Recurly
50
54
  # @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
55
  define_attribute :starts_at, DateTime
52
56
 
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
+
53
61
  # @!attribute total_billing_cycles
54
62
  # @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.
55
63
  define_attribute :total_billing_cycles, Integer
56
64
 
57
65
  # @!attribute trial_ends_at
58
- # @return [DateTime] If set, overrides the default trial behavior for the subscription. The date must be in the future.
66
+ # @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.
59
67
  define_attribute :trial_ends_at, DateTime
60
68
 
61
69
  # @!attribute unit_amount
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.
70
+ # @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.
63
71
  define_attribute :unit_amount, Float
64
72
  end
65
73
  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 SubscriptionRampInterval < Request
8
+
9
+ # @!attribute starting_billing_cycle
10
+ # @return [Integer] Represents how many billing cycles are included in a ramp interval.
11
+ define_attribute :starting_billing_cycle, Integer
12
+
13
+ # @!attribute unit_amount
14
+ # @return [Integer] Represents the price for the ramp interval.
15
+ define_attribute :unit_amount, Integer
16
+ end
17
+ end
18
+ end
@@ -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.
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.
15
15
  define_attribute :billing_info_id, String
16
16
 
17
17
  # @!attribute collection_method
@@ -54,6 +54,10 @@ 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. Please do not use it.
59
+ define_attribute :tax_inclusive, :Boolean
60
+
57
61
  # @!attribute terms_and_conditions
58
62
  # @return [String] Specify custom notes to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals.
59
63
  define_attribute :terms_and_conditions, String
@@ -42,6 +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
+
45
49
  # @!attribute email
46
50
  # @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.
47
51
  define_attribute :email, String
@@ -13,6 +13,10 @@ module Recurly
13
13
  # @!attribute currency
14
14
  # @return [String] 3-letter ISO 4217 currency code.
15
15
  define_attribute :currency, String
16
+
17
+ # @!attribute processing_prepayment_amount
18
+ # @return [Float] Total amount for the prepayment credit invoices in a `processing` state on the account.
19
+ define_attribute :processing_prepayment_amount, Float
16
20
  end
17
21
  end
18
22
  end
@@ -18,6 +18,10 @@ 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
+
21
25
  # @!attribute email
22
26
  # @return [String] The email address used for communicating with this customer.
23
27
  define_attribute :email, String
@@ -10,6 +10,10 @@ 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
+
13
17
  # @!attribute unit_amount
14
18
  # @return [Float] Unit price
15
19
  define_attribute :unit_amount, Float
@@ -11,7 +11,7 @@ module Recurly
11
11
  define_attribute :city, String
12
12
 
13
13
  # @!attribute country
14
- # @return [String] Country, 2-letter ISO code.
14
+ # @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
15
15
  define_attribute :country, String
16
16
 
17
17
  # @!attribute first_name