recurly 3.28.0 → 3.29.1

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 (55) hide show
  1. checksums.yaml +4 -4
  2. data/.bumpversion.cfg +1 -1
  3. data/.github/workflows/ci.yml +3 -3
  4. data/.github/workflows/docs.yml +1 -1
  5. data/.github/workflows/pr-review.yml +27 -0
  6. data/CHANGELOG.md +22 -0
  7. data/GETTING_STARTED.md +1 -1
  8. data/lib/data/ca-certificates.crt +0 -40
  9. data/lib/recurly/client/operations.rb +92 -40
  10. data/lib/recurly/errors/api_errors.rb +0 -31
  11. data/lib/recurly/requests/account_create.rb +4 -0
  12. data/lib/recurly/requests/account_purchase.rb +4 -0
  13. data/lib/recurly/requests/account_update.rb +4 -0
  14. data/lib/recurly/requests/add_on_create.rb +1 -1
  15. data/lib/recurly/requests/add_on_update.rb +1 -1
  16. data/lib/recurly/requests/address.rb +4 -0
  17. data/lib/recurly/requests/billing_info_create.rb +13 -1
  18. data/lib/recurly/requests/billing_info_verify.rb +4 -0
  19. data/lib/recurly/requests/billing_info_verify_cvv.rb +26 -0
  20. data/lib/recurly/requests/credit_application_policy.rb +18 -0
  21. data/lib/recurly/requests/custom_field.rb +8 -0
  22. data/lib/recurly/requests/gateway_attributes.rb +1 -1
  23. data/lib/recurly/requests/invoice_address.rb +4 -0
  24. data/lib/recurly/requests/invoice_create.rb +9 -1
  25. data/lib/recurly/requests/item_create.rb +1 -1
  26. data/lib/recurly/requests/item_update.rb +1 -1
  27. data/lib/recurly/requests/line_item_create.rb +5 -1
  28. data/lib/recurly/requests/plan_create.rb +1 -1
  29. data/lib/recurly/requests/plan_update.rb +1 -1
  30. data/lib/recurly/requests/purchase_create.rb +8 -0
  31. data/lib/recurly/requests/shipping_address_create.rb +4 -0
  32. data/lib/recurly/requests/shipping_address_update.rb +4 -0
  33. data/lib/recurly/requests/subscription_create.rb +13 -1
  34. data/lib/recurly/requests/subscription_purchase.rb +21 -1
  35. data/lib/recurly/requests/subscription_update.rb +8 -0
  36. data/lib/recurly/resources/account.rb +4 -0
  37. data/lib/recurly/resources/add_on.rb +1 -1
  38. data/lib/recurly/resources/address.rb +4 -0
  39. data/lib/recurly/resources/credit_application_policy.rb +18 -0
  40. data/lib/recurly/resources/custom_field.rb +8 -0
  41. data/lib/recurly/resources/gateway_attributes.rb +1 -1
  42. data/lib/recurly/resources/invoice.rb +8 -0
  43. data/lib/recurly/resources/invoice_address.rb +4 -0
  44. data/lib/recurly/resources/item.rb +1 -1
  45. data/lib/recurly/resources/line_item.rb +6 -2
  46. data/lib/recurly/resources/payment_method.rb +4 -0
  47. data/lib/recurly/resources/plan.rb +1 -1
  48. data/lib/recurly/resources/shipping_address.rb +4 -0
  49. data/lib/recurly/resources/subscription.rb +8 -0
  50. data/lib/recurly/resources/subscription_ramp_interval_response.rb +8 -0
  51. data/lib/recurly/resources/tax_detail.rb +4 -4
  52. data/lib/recurly/resources/tax_info.rb +1 -1
  53. data/lib/recurly/version.rb +1 -1
  54. data/openapi/api.yaml +10784 -301
  55. metadata +11 -7
@@ -21,67 +21,36 @@ module Recurly
21
21
  }
22
22
 
23
23
  class ResponseError < Errors::APIError; end
24
-
25
24
  class ServerError < ResponseError; end
26
-
27
25
  class InternalServerError < ServerError; end
28
-
29
26
  class ServiceNotAvailableError < InternalServerError; end
30
-
31
27
  class TaxServiceError < InternalServerError; end
32
-
33
28
  class BadGatewayError < ServerError; end
34
-
35
29
  class ServiceUnavailableError < ServerError; end
36
-
37
30
  class RedirectionError < ResponseError; end
38
-
39
31
  class NotModifiedError < ResponseError; end
40
-
41
32
  class ClientError < Errors::APIError; end
42
-
43
33
  class BadRequestError < ClientError; end
44
-
45
34
  class InvalidContentTypeError < BadRequestError; end
46
-
47
35
  class UnauthorizedError < ClientError; end
48
-
49
36
  class PaymentRequiredError < ClientError; end
50
-
51
37
  class ForbiddenError < ClientError; end
52
-
53
38
  class InvalidApiKeyError < ForbiddenError; end
54
-
55
39
  class InvalidPermissionsError < ForbiddenError; end
56
-
57
40
  class NotFoundError < ClientError; end
58
-
59
41
  class NotAcceptableError < ClientError; end
60
-
61
42
  class UnknownApiVersionError < NotAcceptableError; end
62
-
63
43
  class UnavailableInApiVersionError < NotAcceptableError; end
64
-
65
44
  class InvalidApiVersionError < NotAcceptableError; end
66
-
67
45
  class PreconditionFailedError < ClientError; end
68
-
69
46
  class UnprocessableEntityError < ClientError; end
70
-
71
47
  class ValidationError < UnprocessableEntityError; end
72
-
73
48
  class MissingFeatureError < UnprocessableEntityError; end
74
-
75
49
  class TransactionError < UnprocessableEntityError; end
76
-
77
50
  class SimultaneousRequestError < UnprocessableEntityError; end
78
-
79
51
  class ImmutableSubscriptionError < UnprocessableEntityError; end
80
-
81
52
  class InvalidTokenError < UnprocessableEntityError; end
82
-
83
53
  class TooManyRequestsError < ClientError; end
84
-
85
54
  class RateLimitedError < TooManyRequestsError; end
86
55
  end
87
56
  end
@@ -46,6 +46,10 @@ module Recurly
46
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.
47
47
  define_attribute :email, String
48
48
 
49
+ # @!attribute entity_use_code
50
+ # @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.
51
+ define_attribute :entity_use_code, String
52
+
49
53
  # @!attribute exemption_certificate
50
54
  # @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.
51
55
  define_attribute :exemption_certificate, String
@@ -46,6 +46,10 @@ module Recurly
46
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.
47
47
  define_attribute :email, String
48
48
 
49
+ # @!attribute entity_use_code
50
+ # @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.
51
+ define_attribute :entity_use_code, String
52
+
49
53
  # @!attribute exemption_certificate
50
54
  # @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.
51
55
  define_attribute :exemption_certificate, String
@@ -38,6 +38,10 @@ module Recurly
38
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.
39
39
  define_attribute :email, String
40
40
 
41
+ # @!attribute entity_use_code
42
+ # @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.
43
+ define_attribute :entity_use_code, String
44
+
41
45
  # @!attribute exemption_certificate
42
46
  # @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.
43
47
  define_attribute :exemption_certificate, String
@@ -71,7 +71,7 @@ module Recurly
71
71
  define_attribute :revenue_schedule_type, String
72
72
 
73
73
  # @!attribute tax_code
74
- # @return [String] Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`. If `item_code`/`item_id` is part of the request then `tax_code` must be absent.
74
+ # @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.
75
75
  define_attribute :tax_code, String
76
76
 
77
77
  # @!attribute tier_type
@@ -59,7 +59,7 @@ module Recurly
59
59
  define_attribute :revenue_schedule_type, String
60
60
 
61
61
  # @!attribute tax_code
62
- # @return [String] Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`. If an `Item` is associated to the `AddOn` then `tax code` must be absent.
62
+ # @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 an `Item` is associated to the `AddOn` then `tax_code` must be absent.
63
63
  define_attribute :tax_code, String
64
64
 
65
65
  # @!attribute tiers
@@ -18,6 +18,10 @@ module Recurly
18
18
  # @return [String] First name
19
19
  define_attribute :first_name, String
20
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
+
21
25
  # @!attribute last_name
22
26
  # @return [String] Last name
23
27
  define_attribute :last_name, String
@@ -26,6 +26,10 @@ module Recurly
26
26
  # @return [Boolean] The `backup_payment_method` field is used to designate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined. All payment methods, including the billing info marked `primary_payment_method` can be set as a backup. An account can have a maximum of 1 backup, if a user sets a different payment method as a backup, the existing backup will no longer be marked as such.
27
27
  define_attribute :backup_payment_method, :Boolean
28
28
 
29
+ # @!attribute card_network_preference
30
+ # @return [String] Represents the card network preference associated with the billing info for dual badged cards. Must be a supported card network.
31
+ define_attribute :card_network_preference, String
32
+
29
33
  # @!attribute company
30
34
  # @return [String] Company name
31
35
  define_attribute :company, String
@@ -51,7 +55,7 @@ module Recurly
51
55
  define_attribute :gateway_attributes, :GatewayAttributes
52
56
 
53
57
  # @!attribute gateway_code
54
- # @return [String] An identifier for a specific payment gateway. Must be used in conjunction with `gateway_token`.
58
+ # @return [String] An identifier for a specific payment gateway.
55
59
  define_attribute :gateway_code, String
56
60
 
57
61
  # @!attribute gateway_token
@@ -90,6 +94,10 @@ module Recurly
90
94
  # @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.
91
95
  define_attribute :primary_payment_method, :Boolean
92
96
 
97
+ # @!attribute roku_billing_agreement_id
98
+ # @return [String] Roku's CIB if billing through Roku
99
+ define_attribute :roku_billing_agreement_id, String
100
+
93
101
  # @!attribute routing_number
94
102
  # @return [String] The bank's rounting number. (ACH only)
95
103
  define_attribute :routing_number, String
@@ -98,6 +106,10 @@ module Recurly
98
106
  # @return [String] Bank identifier code for UK based banks. Required for Bacs based billing infos. (Bacs only)
99
107
  define_attribute :sort_code, String
100
108
 
109
+ # @!attribute store_billing_info
110
+ # @return [Boolean] Whether to store this billing info onto its associated account. Defaults to `true`.
111
+ define_attribute :store_billing_info, :Boolean
112
+
101
113
  # @!attribute tax_identifier
102
114
  # @return [String] Tax identifier is required if adding a billing info that is a consumer card in Brazil. This would be the customer's CPF, CPF is a Brazilian tax identifier for all tax paying residents.
103
115
  define_attribute :tax_identifier, String
@@ -9,6 +9,10 @@ module Recurly
9
9
  # @!attribute gateway_code
10
10
  # @return [String] An identifier for a specific payment gateway.
11
11
  define_attribute :gateway_code, String
12
+
13
+ # @!attribute three_d_secure_action_result_token_id
14
+ # @return [String] A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge.
15
+ define_attribute :three_d_secure_action_result_token_id, String
12
16
  end
13
17
  end
14
18
  end
@@ -0,0 +1,26 @@
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 BillingInfoVerifyCVV < Request
8
+
9
+ # @!attribute gateway_code
10
+ # @return [String] An identifier for a specific payment gateway.
11
+ define_attribute :gateway_code, String
12
+
13
+ # @!attribute three_d_secure_action_result_token_id
14
+ # @return [String] A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge.
15
+ define_attribute :three_d_secure_action_result_token_id, String
16
+
17
+ # @!attribute token_id
18
+ # @return [String] A token [generated by Recurly.js](https://recurly.com/developers/reference/recurly-js/#getting-a-token).
19
+ define_attribute :token_id, String
20
+
21
+ # @!attribute verification_value
22
+ # @return [String] Unique security code for a credit card.
23
+ define_attribute :verification_value, String
24
+ end
25
+ end
26
+ 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 CreditApplicationPolicy < Request
8
+
9
+ # @!attribute allowed_origins
10
+ # @return [Array[String]] Optional array of credit invoice origin types to allow when mode is `all`. If not specified when mode is `all`, credits from all origins are applied. Only valid when mode is `all`.
11
+ define_attribute :allowed_origins, Array, { :item_type => String }
12
+
13
+ # @!attribute mode
14
+ # @return [String]
15
+ define_attribute :mode, String
16
+ end
17
+ end
18
+ end
@@ -10,6 +10,14 @@ 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
+
13
21
  # @!attribute value
14
22
  # @return [String] Any values that resemble a credit card number or security code (CVV/CVC) will be rejected.
15
23
  define_attribute :value, String
@@ -7,7 +7,7 @@ module Recurly
7
7
  class GatewayAttributes < Request
8
8
 
9
9
  # @!attribute account_reference
10
- # @return [String] Used by Adyen gateways. The Shopper Reference value used when the external token was created. Must be used in conjunction with gateway_token and gateway_code.
10
+ # @return [String] Used by Adyen and Braintree gateways. For Adyen The Shopper Reference value used when the external token was created. Must be used in conjunction with gateway_token and gateway_code. For Braintree the PayPal PayerID is populated in the response.
11
11
  define_attribute :account_reference, String
12
12
  end
13
13
  end
@@ -22,6 +22,10 @@ module Recurly
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
+
25
29
  # @!attribute last_name
26
30
  # @return [String] Last name
27
31
  define_attribute :last_name, String
@@ -14,6 +14,10 @@ module Recurly
14
14
  # @return [String] An automatic invoice means a corresponding transaction is run using the account's billing information at the same time the invoice is created. Manual invoices are created without a corresponding transaction. The merchant must enter a manual payment transaction or have the customer pay the invoice with an automatic method, like credit card, PayPal, Amazon, or ACH bank payment.
15
15
  define_attribute :collection_method, String
16
16
 
17
+ # @!attribute credit_application_policy
18
+ # @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
19
+ define_attribute :credit_application_policy, :CreditApplicationPolicy
20
+
17
21
  # @!attribute credit_customer_notes
18
22
  # @return [String] This will default to the Customer Notes text specified on the Invoice Settings for credit invoices. Specify customer notes to add or override Customer Notes on credit invoices.
19
23
  define_attribute :credit_customer_notes, String
@@ -23,7 +27,7 @@ module Recurly
23
27
  define_attribute :currency, String
24
28
 
25
29
  # @!attribute net_terms
26
- # @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.
30
+ # @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.
27
31
  define_attribute :net_terms, Integer
28
32
 
29
33
  # @!attribute po_number
@@ -37,6 +41,10 @@ module Recurly
37
41
  # @!attribute vat_reverse_charge_notes
38
42
  # @return [String] VAT Reverse Charge Notes only appear if you have EU VAT enabled or are using your own Avalara AvaTax account and the customer is in the EU, has a VAT number, and is in a different country than your own. This will default to the VAT Reverse Charge Notes text specified on the Tax Settings page in your Recurly admin, unless custom notes were created with the original subscription.
39
43
  define_attribute :vat_reverse_charge_notes, String
44
+
45
+ # @!attribute vertex_transaction_type
46
+ # @return [String] Used by Vertex for tax calculations. Possible values are sale, rental, lease.
47
+ define_attribute :vertex_transaction_type, String
40
48
  end
41
49
  end
42
50
  end
@@ -47,7 +47,7 @@ module Recurly
47
47
  define_attribute :revenue_schedule_type, String
48
48
 
49
49
  # @!attribute tax_code
50
- # @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`.
50
+ # @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.
51
51
  define_attribute :tax_code, String
52
52
 
53
53
  # @!attribute tax_exempt
@@ -47,7 +47,7 @@ module Recurly
47
47
  define_attribute :revenue_schedule_type, String
48
48
 
49
49
  # @!attribute tax_code
50
- # @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`.
50
+ # @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.
51
51
  define_attribute :tax_code, String
52
52
 
53
53
  # @!attribute tax_exempt
@@ -67,7 +67,7 @@ module Recurly
67
67
  define_attribute :start_date, DateTime
68
68
 
69
69
  # @!attribute tax_code
70
- # @return [String] Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`.
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.
71
71
  define_attribute :tax_code, String
72
72
 
73
73
  # @!attribute tax_exempt
@@ -85,6 +85,10 @@ module Recurly
85
85
  # @!attribute unit_amount
86
86
  # @return [Float] A positive or negative amount with `type=charge` will result in a positive `unit_amount`. A positive or negative amount with `type=credit` will result in a negative `unit_amount`. If `item_code`/`item_id` is present, `unit_amount` can be passed in, to override the `Item`'s `unit_amount`. If `item_code`/`item_id` is not present then `unit_amount` is required.
87
87
  define_attribute :unit_amount, Float
88
+
89
+ # @!attribute vertex_transaction_type
90
+ # @return [String] Used by Vertex for tax calculations. Possible values are sale, rental, lease.
91
+ define_attribute :vertex_transaction_type, String
88
92
  end
89
93
  end
90
94
  end
@@ -87,7 +87,7 @@ module Recurly
87
87
  define_attribute :setup_fee_revenue_schedule_type, String
88
88
 
89
89
  # @!attribute tax_code
90
- # @return [String] Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`.
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.
91
91
  define_attribute :tax_code, String
92
92
 
93
93
  # @!attribute tax_exempt
@@ -75,7 +75,7 @@ module Recurly
75
75
  define_attribute :setup_fee_revenue_schedule_type, String
76
76
 
77
77
  # @!attribute tax_code
78
- # @return [String] Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`.
78
+ # @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.
79
79
  define_attribute :tax_code, String
80
80
 
81
81
  # @!attribute tax_exempt
@@ -22,6 +22,10 @@ module Recurly
22
22
  # @return [Array[String]] A list of coupon_codes to be redeemed on the subscription or account during the purchase.
23
23
  define_attribute :coupon_codes, Array, { :item_type => String }
24
24
 
25
+ # @!attribute credit_application_policy_override
26
+ # @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
27
+ define_attribute :credit_application_policy_override, :CreditApplicationPolicy
28
+
25
29
  # @!attribute credit_customer_notes
26
30
  # @return [String] Notes to be put on the credit invoice resulting from credits in the purchase, if any.
27
31
  define_attribute :credit_customer_notes, String
@@ -73,6 +77,10 @@ module Recurly
73
77
  # @!attribute vat_reverse_charge_notes
74
78
  # @return [String] VAT reverse charge notes for cross border European tax settlement.
75
79
  define_attribute :vat_reverse_charge_notes, String
80
+
81
+ # @!attribute vertex_transaction_type
82
+ # @return [String] Used by Vertex for tax calculations. Possible values are sale, rental, lease.
83
+ define_attribute :vertex_transaction_type, String
76
84
  end
77
85
  end
78
86
  end
@@ -26,6 +26,10 @@ module Recurly
26
26
  # @return [String]
27
27
  define_attribute :first_name, String
28
28
 
29
+ # @!attribute geo_code
30
+ # @return [String] Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.
31
+ define_attribute :geo_code, String
32
+
29
33
  # @!attribute last_name
30
34
  # @return [String]
31
35
  define_attribute :last_name, String
@@ -26,6 +26,10 @@ module Recurly
26
26
  # @return [String]
27
27
  define_attribute :first_name, String
28
28
 
29
+ # @!attribute geo_code
30
+ # @return [String] Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.
31
+ define_attribute :geo_code, String
32
+
29
33
  # @!attribute id
30
34
  # @return [String] Shipping Address ID
31
35
  define_attribute :id, String
@@ -22,6 +22,10 @@ module Recurly
22
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
+ # @!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
+
25
29
  # @!attribute collection_method
26
30
  # @return [String] Collection method
27
31
  define_attribute :collection_method, String
@@ -30,6 +34,10 @@ module Recurly
30
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.
31
35
  define_attribute :coupon_code, String
32
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
40
+
33
41
  # @!attribute credit_customer_notes
34
42
  # @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.
35
43
  define_attribute :credit_customer_notes, String
@@ -87,7 +95,7 @@ module Recurly
87
95
  define_attribute :shipping, :SubscriptionShippingCreate
88
96
 
89
97
  # @!attribute starts_at
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.
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.
91
99
  define_attribute :starts_at, DateTime
92
100
 
93
101
  # @!attribute tax_inclusive
@@ -113,6 +121,10 @@ module Recurly
113
121
  # @!attribute unit_amount
114
122
  # @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.
115
123
  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
116
128
  end
117
129
  end
118
130
  end
@@ -14,10 +14,22 @@ 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
+
17
25
  # @!attribute custom_fields
18
26
  # @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.
19
27
  define_attribute :custom_fields, Array, { :item_type => :CustomField }
20
28
 
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
+
21
33
  # @!attribute next_bill_date
22
34
  # @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.
23
35
  define_attribute :next_bill_date, DateTime
@@ -51,13 +63,17 @@ module Recurly
51
63
  define_attribute :shipping, :SubscriptionShippingPurchase
52
64
 
53
65
  # @!attribute starts_at
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.
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.
55
67
  define_attribute :starts_at, DateTime
56
68
 
57
69
  # @!attribute tax_inclusive
58
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.
59
71
  define_attribute :tax_inclusive, :Boolean
60
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
+
61
77
  # @!attribute total_billing_cycles
62
78
  # @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.
63
79
  define_attribute :total_billing_cycles, Integer
@@ -69,6 +85,10 @@ module Recurly
69
85
  # @!attribute unit_amount
70
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.
71
87
  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
72
92
  end
73
93
  end
74
94
  end
@@ -18,6 +18,10 @@ module Recurly
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
+
21
25
  # @!attribute custom_fields
22
26
  # @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.
23
27
  define_attribute :custom_fields, Array, { :item_type => :CustomField }
@@ -61,6 +65,10 @@ module Recurly
61
65
  # @!attribute terms_and_conditions
62
66
  # @return [String] Specify custom notes to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals.
63
67
  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
64
72
  end
65
73
  end
66
74
  end
@@ -50,6 +50,10 @@ module Recurly
50
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.
51
51
  define_attribute :email, String
52
52
 
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
+
53
57
  # @!attribute exemption_certificate
54
58
  # @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.
55
59
  define_attribute :exemption_certificate, String
@@ -87,7 +87,7 @@ module Recurly
87
87
  define_attribute :state, String
88
88
 
89
89
  # @!attribute tax_code
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`.
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.
91
91
  define_attribute :tax_code, String
92
92
 
93
93
  # @!attribute tier_type
@@ -18,6 +18,10 @@ module Recurly
18
18
  # @return [String] First name
19
19
  define_attribute :first_name, String
20
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
+
21
25
  # @!attribute last_name
22
26
  # @return [String] Last name
23
27
  define_attribute :last_name, String
@@ -0,0 +1,18 @@
1
+ # This file is automatically created by Recurly's OpenAPI generation process
2
+ # and thus any edits you make by hand will be lost. If you wish to make a
3
+ # change to this file, please create a Github issue explaining the changes you
4
+ # need and we will usher them to the appropriate places.
5
+ module Recurly
6
+ module Resources
7
+ class CreditApplicationPolicy < Resource
8
+
9
+ # @!attribute allowed_origins
10
+ # @return [Array[String]] Optional array of credit invoice origin types to allow when mode is `all`. If not specified when mode is `all`, credits from all origins are applied. Only valid when mode is `all`.
11
+ define_attribute :allowed_origins, Array, { :item_type => String }
12
+
13
+ # @!attribute mode
14
+ # @return [String]
15
+ define_attribute :mode, String
16
+ end
17
+ end
18
+ end
@@ -10,6 +10,14 @@ 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
+
13
21
  # @!attribute value
14
22
  # @return [String] Any values that resemble a credit card number or security code (CVV/CVC) will be rejected.
15
23
  define_attribute :value, String
@@ -7,7 +7,7 @@ module Recurly
7
7
  class GatewayAttributes < Resource
8
8
 
9
9
  # @!attribute account_reference
10
- # @return [String] Used by Adyen gateways. The Shopper Reference value used when the external token was created.
10
+ # @return [String] Used by Adyen and Braintree gateways. For Adyen the Shopper Reference value used when the external token was created. For Braintree the PayPal PayerID is populated in the response.
11
11
  define_attribute :account_reference, String
12
12
  end
13
13
  end