recurly 3.0.0.beta.4 → 3.0.0.beta.5
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.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +3 -1
- data/Gemfile +1 -1
- data/README.md +1 -1
- data/lib/recurly.rb +6 -2
- data/lib/recurly/client.rb +31 -26
- data/lib/recurly/client/adapter.rb +4 -2
- data/lib/recurly/client/operations.rb +118 -8
- data/lib/recurly/errors.rb +1 -1
- data/lib/recurly/pager.rb +3 -3
- data/lib/recurly/requests/account_acquisition_updatable.rb +1 -1
- data/lib/recurly/requests/account_create.rb +2 -2
- data/lib/recurly/requests/account_purchase.rb +86 -0
- data/lib/recurly/requests/account_update.rb +2 -2
- data/lib/recurly/requests/add_on_create.rb +3 -3
- data/lib/recurly/requests/add_on_update.rb +3 -3
- data/lib/recurly/requests/coupon_create.rb +6 -6
- data/lib/recurly/requests/external_refund.rb +1 -1
- data/lib/recurly/requests/invoice_create.rb +2 -2
- data/lib/recurly/requests/invoice_refund.rb +2 -2
- data/lib/recurly/requests/line_item_create.rb +3 -3
- data/lib/recurly/requests/plan_create.rb +3 -3
- data/lib/recurly/requests/plan_update.rb +4 -4
- data/lib/recurly/requests/purchase_create.rb +74 -0
- data/lib/recurly/requests/shipping_address_update.rb +2 -2
- data/lib/recurly/requests/subscription_change_create.rb +2 -2
- data/lib/recurly/requests/subscription_create.rb +1 -1
- data/lib/recurly/requests/subscription_purchase.rb +58 -0
- data/lib/recurly/requests/subscription_shipping_purchase.rb +22 -0
- data/lib/recurly/requests/subscription_update.rb +2 -2
- data/lib/recurly/resources/account.rb +18 -18
- data/lib/recurly/resources/account_acquisition.rb +9 -9
- data/lib/recurly/resources/account_balance.rb +2 -2
- data/lib/recurly/resources/account_mini.rb +4 -4
- data/lib/recurly/resources/account_note.rb +6 -6
- data/lib/recurly/resources/add_on.rb +15 -15
- data/lib/recurly/resources/add_on_mini.rb +4 -4
- data/lib/recurly/resources/billing_info.rb +16 -16
- data/lib/recurly/resources/billing_info_payment_method.rb +1 -1
- data/lib/recurly/resources/coupon.rb +16 -16
- data/lib/recurly/resources/coupon_discount.rb +1 -1
- data/lib/recurly/resources/coupon_discount_trial.rb +1 -1
- data/lib/recurly/resources/coupon_mini.rb +6 -6
- data/lib/recurly/resources/coupon_redemption.rb +12 -12
- data/lib/recurly/resources/coupon_redemption_mini.rb +7 -7
- data/lib/recurly/resources/credit_payment.rb +7 -7
- data/lib/recurly/resources/custom_field_definition.rb +12 -12
- data/lib/recurly/resources/error.rb +1 -1
- data/lib/recurly/resources/error_may_have_transaction.rb +1 -1
- data/lib/recurly/resources/fraud_info.rb +1 -1
- data/lib/recurly/resources/invoice.rb +12 -12
- data/lib/recurly/resources/invoice_mini.rb +2 -2
- data/lib/recurly/resources/line_item.rb +6 -6
- data/lib/recurly/resources/plan.rb +15 -15
- data/lib/recurly/resources/plan_mini.rb +4 -4
- data/lib/recurly/resources/settings.rb +6 -6
- data/lib/recurly/resources/shipping_address.rb +8 -8
- data/lib/recurly/resources/site.rb +16 -16
- data/lib/recurly/resources/subscription.rb +2 -2
- data/lib/recurly/resources/subscription_change.rb +8 -8
- data/lib/recurly/resources/transaction.rb +8 -8
- data/lib/recurly/resources/transaction_payment_method.rb +2 -2
- data/lib/recurly/resources/unique_coupon_code.rb +11 -11
- data/lib/recurly/resources/user.rb +8 -8
- data/lib/recurly/schema.rb +5 -6
- data/lib/recurly/schema/json_deserializer.rb +5 -4
- data/lib/recurly/schema/json_parser.rb +4 -4
- data/lib/recurly/schema/request_caster.rb +4 -4
- data/lib/recurly/schema/schema_factory.rb +1 -1
- data/lib/recurly/schema/schema_validator.rb +1 -2
- data/lib/recurly/version.rb +1 -1
- data/recurly.gemspec +12 -11
- data/scripts/format +6 -0
- data/scripts/test +12 -1
- metadata +22 -5
- data/scripts/check-deps +0 -28
- data/scripts/install-deps +0 -44
data/lib/recurly/errors.rb
CHANGED
@@ -12,7 +12,7 @@ module Recurly
|
|
12
12
|
# @param error_key [String]
|
13
13
|
# @return [Errors::APIError,Errors::NetworkError]
|
14
14
|
def self.error_class(error_key)
|
15
|
-
class_name = error_key.split(
|
15
|
+
class_name = error_key.split("_").map(&:capitalize).join
|
16
16
|
class_name += "Error" unless class_name.end_with?("Error")
|
17
17
|
Errors.const_get(class_name)
|
18
18
|
end
|
data/lib/recurly/pager.rb
CHANGED
@@ -72,11 +72,11 @@ module Recurly
|
|
72
72
|
private
|
73
73
|
|
74
74
|
def from_json(data)
|
75
|
-
@data = data[
|
75
|
+
@data = data["data"].map do |resource_data|
|
76
76
|
JSONParser.from_json(resource_data)
|
77
77
|
end
|
78
|
-
@next = data[
|
79
|
-
@has_more = data[
|
78
|
+
@next = data["next"]
|
79
|
+
@has_more = data["has_more"]
|
80
80
|
end
|
81
81
|
|
82
82
|
def item_enumerator
|
@@ -12,7 +12,7 @@ module Recurly
|
|
12
12
|
|
13
13
|
# @!attribute channel
|
14
14
|
# @return [String] The channel through which the account was acquired.
|
15
|
-
define_attribute :channel, String
|
15
|
+
define_attribute :channel, String
|
16
16
|
|
17
17
|
# @!attribute cost
|
18
18
|
# @return [Hash] Account balance
|
@@ -16,7 +16,7 @@ module Recurly
|
|
16
16
|
|
17
17
|
# @!attribute bill_to
|
18
18
|
# @return [String] An enumerable describing the billing behavior of the account, specifically whether the account is self-paying or will rely on the parent account to pay.
|
19
|
-
define_attribute :bill_to, String
|
19
|
+
define_attribute :bill_to, String
|
20
20
|
|
21
21
|
# @!attribute billing_info
|
22
22
|
# @return [BillingInfoCreate]
|
@@ -64,7 +64,7 @@ module Recurly
|
|
64
64
|
|
65
65
|
# @!attribute preferred_locale
|
66
66
|
# @return [String] Used to determine the language and locale of emails sent on behalf of the merchant to the customer. The list of locales is restricted to those the merchant has enabled on the site.
|
67
|
-
define_attribute :preferred_locale, String
|
67
|
+
define_attribute :preferred_locale, String
|
68
68
|
|
69
69
|
# @!attribute shipping_addresses
|
70
70
|
# @return [Array[ShippingAddressCreate]]
|
@@ -0,0 +1,86 @@
|
|
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 AccountPurchase < Request
|
8
|
+
|
9
|
+
# @!attribute acquisition
|
10
|
+
# @return [AccountAcquisitionUpdatable]
|
11
|
+
define_attribute :acquisition, :AccountAcquisitionUpdatable
|
12
|
+
|
13
|
+
# @!attribute address
|
14
|
+
# @return [Address]
|
15
|
+
define_attribute :address, :Address
|
16
|
+
|
17
|
+
# @!attribute bill_to
|
18
|
+
# @return [String] An enumerable describing the billing behavior of the account, specifically whether the account is self-paying or will rely on the parent account to pay.
|
19
|
+
define_attribute :bill_to, String
|
20
|
+
|
21
|
+
# @!attribute billing_info
|
22
|
+
# @return [BillingInfoCreate]
|
23
|
+
define_attribute :billing_info, :BillingInfoCreate
|
24
|
+
|
25
|
+
# @!attribute cc_emails
|
26
|
+
# @return [String] Additional email address that should receive account correspondence. These should be separated only by commas. These CC emails will receive all emails that the `email` field also receives.
|
27
|
+
define_attribute :cc_emails, String
|
28
|
+
|
29
|
+
# @!attribute code
|
30
|
+
# @return [String] The unique identifier of the account. This cannot be changed once the account is created.
|
31
|
+
define_attribute :code, String
|
32
|
+
|
33
|
+
# @!attribute company
|
34
|
+
# @return [String]
|
35
|
+
define_attribute :company, String
|
36
|
+
|
37
|
+
# @!attribute custom_fields
|
38
|
+
# @return [Array[CustomField]]
|
39
|
+
define_attribute :custom_fields, Array, { :item_type => :CustomField }
|
40
|
+
|
41
|
+
# @!attribute email
|
42
|
+
# @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
|
+
define_attribute :email, String
|
44
|
+
|
45
|
+
# @!attribute exemption_certificate
|
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.
|
47
|
+
define_attribute :exemption_certificate, String
|
48
|
+
|
49
|
+
# @!attribute first_name
|
50
|
+
# @return [String]
|
51
|
+
define_attribute :first_name, String
|
52
|
+
|
53
|
+
# @!attribute id
|
54
|
+
# @return [String] Optional, but if present allows an existing account to be used and updated as part of the purchase.
|
55
|
+
define_attribute :id, String
|
56
|
+
|
57
|
+
# @!attribute last_name
|
58
|
+
# @return [String]
|
59
|
+
define_attribute :last_name, String
|
60
|
+
|
61
|
+
# @!attribute parent_account_code
|
62
|
+
# @return [String] The account code of the parent account to be associated with this account. Passing an empty value removes any existing parent association from this account. If both `parent_account_code` and `parent_account_id` are passed, the non-blank value in `parent_account_id` will be used. Only one level of parent child relationship is allowed. You cannot assign a parent account that itself has a parent account.
|
63
|
+
define_attribute :parent_account_code, String
|
64
|
+
|
65
|
+
# @!attribute parent_account_id
|
66
|
+
# @return [String] The UUID of the parent account to be associated with this account. Passing an empty value removes any existing parent association from this account. If both `parent_account_code` and `parent_account_id` are passed, the non-blank value in `parent_account_id` will be used. Only one level of parent child relationship is allowed. You cannot assign a parent account that itself has a parent account.
|
67
|
+
define_attribute :parent_account_id, String
|
68
|
+
|
69
|
+
# @!attribute preferred_locale
|
70
|
+
# @return [String] Used to determine the language and locale of emails sent on behalf of the merchant to the customer. The list of locales is restricted to those the merchant has enabled on the site.
|
71
|
+
define_attribute :preferred_locale, String
|
72
|
+
|
73
|
+
# @!attribute tax_exempt
|
74
|
+
# @return [Boolean] The tax status of the account. `true` exempts tax on the account, `false` applies tax on the account.
|
75
|
+
define_attribute :tax_exempt, :Boolean
|
76
|
+
|
77
|
+
# @!attribute username
|
78
|
+
# @return [String] A secondary value for the account.
|
79
|
+
define_attribute :username, String
|
80
|
+
|
81
|
+
# @!attribute vat_number
|
82
|
+
# @return [String] The VAT number of the account (to avoid having the VAT applied). This is only used for manually collected invoices.
|
83
|
+
define_attribute :vat_number, String
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -12,7 +12,7 @@ module Recurly
|
|
12
12
|
|
13
13
|
# @!attribute bill_to
|
14
14
|
# @return [String] An enumerable describing the billing behavior of the account, specifically whether the account is self-paying or will rely on the parent account to pay.
|
15
|
-
define_attribute :bill_to, String
|
15
|
+
define_attribute :bill_to, String
|
16
16
|
|
17
17
|
# @!attribute billing_info
|
18
18
|
# @return [BillingInfoCreate]
|
@@ -56,7 +56,7 @@ module Recurly
|
|
56
56
|
|
57
57
|
# @!attribute preferred_locale
|
58
58
|
# @return [String] Used to determine the language and locale of emails sent on behalf of the merchant to the customer. The list of locales is restricted to those the merchant has enabled on the site.
|
59
|
-
define_attribute :preferred_locale, String
|
59
|
+
define_attribute :preferred_locale, String
|
60
60
|
|
61
61
|
# @!attribute tax_exempt
|
62
62
|
# @return [Boolean] The tax status of the account. `true` exempts tax on the account, `false` applies tax on the account.
|
@@ -30,12 +30,12 @@ module Recurly
|
|
30
30
|
# @return [String] Describes your add-on and will appear in subscribers' invoices.
|
31
31
|
define_attribute :name, String
|
32
32
|
|
33
|
-
# @!attribute
|
33
|
+
# @!attribute plan_id
|
34
34
|
# @return [String] Plan ID
|
35
|
-
define_attribute :plan_id, String
|
35
|
+
define_attribute :plan_id, String
|
36
36
|
|
37
37
|
# @!attribute tax_code
|
38
|
-
# @return [String] Optional field
|
38
|
+
# @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`.
|
39
39
|
define_attribute :tax_code, String
|
40
40
|
end
|
41
41
|
end
|
@@ -26,16 +26,16 @@ module Recurly
|
|
26
26
|
# @return [Boolean] Determines if the quantity field is displayed on the hosted pages for the add-on.
|
27
27
|
define_attribute :display_quantity, :Boolean
|
28
28
|
|
29
|
-
# @!attribute
|
29
|
+
# @!attribute id
|
30
30
|
# @return [String] Add-on ID
|
31
|
-
define_attribute :id, String
|
31
|
+
define_attribute :id, String
|
32
32
|
|
33
33
|
# @!attribute name
|
34
34
|
# @return [String] Describes your add-on and will appear in subscribers' invoices.
|
35
35
|
define_attribute :name, String
|
36
36
|
|
37
37
|
# @!attribute tax_code
|
38
|
-
# @return [String] Optional field
|
38
|
+
# @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`.
|
39
39
|
define_attribute :tax_code, String
|
40
40
|
end
|
41
41
|
end
|
@@ -20,7 +20,7 @@ module Recurly
|
|
20
20
|
|
21
21
|
# @!attribute coupon_type
|
22
22
|
# @return [String] Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint.
|
23
|
-
define_attribute :coupon_type, String
|
23
|
+
define_attribute :coupon_type, String
|
24
24
|
|
25
25
|
# @!attribute currencies
|
26
26
|
# @return [Array[CouponPricing]] Fixed discount currencies by currency. Required if the coupon type is `fixed`. This parameter should contain the coupon discount values
|
@@ -32,11 +32,11 @@ module Recurly
|
|
32
32
|
|
33
33
|
# @!attribute discount_type
|
34
34
|
# @return [String] The type of discount provided by the coupon (how the amount discounted is calculated)
|
35
|
-
define_attribute :discount_type, String
|
35
|
+
define_attribute :discount_type, String
|
36
36
|
|
37
37
|
# @!attribute duration
|
38
38
|
# @return [String] This field does not apply when the discount_type is `free_trial`. - "single_use" coupons applies to the first invoice only. - "temporal" coupons will apply to invoices for the duration determined by the `temporal_unit` and `temporal_amount` attributes. - "forever" coupons will apply to invoices forever.
|
39
|
-
define_attribute :duration, String
|
39
|
+
define_attribute :duration, String
|
40
40
|
|
41
41
|
# @!attribute free_trial_amount
|
42
42
|
# @return [Integer] Sets the duration of time the `free_trial_unit` is for. Required if `discount_type` is `free_trial`.
|
@@ -44,7 +44,7 @@ module Recurly
|
|
44
44
|
|
45
45
|
# @!attribute free_trial_unit
|
46
46
|
# @return [String] Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine the duration of time the coupon is for. Required if `discount_type` is `free_trial`.
|
47
|
-
define_attribute :free_trial_unit, String
|
47
|
+
define_attribute :free_trial_unit, String
|
48
48
|
|
49
49
|
# @!attribute hosted_description
|
50
50
|
# @return [String] This description will show up when a customer redeems a coupon on your Hosted Payment Pages, or if you choose to show the description on your own checkout page.
|
@@ -76,7 +76,7 @@ module Recurly
|
|
76
76
|
|
77
77
|
# @!attribute redemption_resource
|
78
78
|
# @return [String] Whether the discount is for all eligible charges on the account, or only a specific subscription.
|
79
|
-
define_attribute :redemption_resource, String
|
79
|
+
define_attribute :redemption_resource, String
|
80
80
|
|
81
81
|
# @!attribute temporal_amount
|
82
82
|
# @return [Integer] If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for.
|
@@ -84,7 +84,7 @@ module Recurly
|
|
84
84
|
|
85
85
|
# @!attribute temporal_unit
|
86
86
|
# @return [String] If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for.
|
87
|
-
define_attribute :temporal_unit, String
|
87
|
+
define_attribute :temporal_unit, String
|
88
88
|
|
89
89
|
# @!attribute unique_code_template
|
90
90
|
# @return [String] On a bulk coupon, the template from which unique coupon codes are generated. - You must start the template with your coupon_code wrapped in single quotes. - Outside of single quotes, use a 9 for a character that you want to be a random number. - Outside of single quotes, use an "x" for a character that you want to be a random letter. - Outside of single quotes, use an * for a character that you want to be a random number or letter. - Use single quotes ' ' for characters that you want to remain static. These strings can be alphanumeric and may contain a - _ or +. For example: "'abc-'****'-def'"
|
@@ -12,7 +12,7 @@ module Recurly
|
|
12
12
|
|
13
13
|
# @!attribute payment_method
|
14
14
|
# @return [String] Payment method used for external refund transaction.
|
15
|
-
define_attribute :payment_method, String
|
15
|
+
define_attribute :payment_method, String
|
16
16
|
|
17
17
|
# @!attribute refunded_at
|
18
18
|
# @return [DateTime] Date the external refund payment was made. Defaults to the current date-time.
|
@@ -12,7 +12,7 @@ module Recurly
|
|
12
12
|
|
13
13
|
# @!attribute collection_method
|
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
|
-
define_attribute :collection_method, String
|
15
|
+
define_attribute :collection_method, String
|
16
16
|
|
17
17
|
# @!attribute credit_customer_notes
|
18
18
|
# @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.
|
@@ -36,7 +36,7 @@ module Recurly
|
|
36
36
|
|
37
37
|
# @!attribute type
|
38
38
|
# @return [String] Specify a type to limit the type of line items that will be invoiced.
|
39
|
-
define_attribute :type, String
|
39
|
+
define_attribute :type, String
|
40
40
|
|
41
41
|
# @!attribute vat_reverse_charge_notes
|
42
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.
|
@@ -24,11 +24,11 @@ module Recurly
|
|
24
24
|
|
25
25
|
# @!attribute refund_method
|
26
26
|
# @return [String] Indicates how the invoice should be refunded when both a credit and transaction are present on the invoice: - `transaction_first` – Refunds the transaction first, then any amount is issued as credit back to the account. Default value when Credit Invoices feature is enabled. - `credit_first` – Issues credit back to the account first, then refunds any remaining amount back to the transaction. Default value when Credit Invoices feature is not enabled. - `all_credit` – Issues credit to the account for the entire amount of the refund. Only available when the Credit Invoices feature is enabled. - `all_transaction` – Refunds the entire amount back to transactions, using transactions from previous invoices if necessary. Only available when the Credit Invoices feature is enabled.
|
27
|
-
define_attribute :refund_method, String
|
27
|
+
define_attribute :refund_method, String
|
28
28
|
|
29
29
|
# @!attribute type
|
30
30
|
# @return [String] The type of refund. Amount and line items cannot both be specified in the request.
|
31
|
-
define_attribute :type, String
|
31
|
+
define_attribute :type, String
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -8,7 +8,7 @@ module Recurly
|
|
8
8
|
|
9
9
|
# @!attribute credit_reason_code
|
10
10
|
# @return [String] The reason the credit was given when line item is `type=credit`. When the Credit Invoices feature is enabled, the value can be set and will default to `general`. When the Credit Invoices feature is not enabled, the value will always be `null`.
|
11
|
-
define_attribute :credit_reason_code, String
|
11
|
+
define_attribute :credit_reason_code, String
|
12
12
|
|
13
13
|
# @!attribute currency
|
14
14
|
# @return [String] 3-letter ISO 4217 currency code.
|
@@ -31,7 +31,7 @@ module Recurly
|
|
31
31
|
define_attribute :start_date, DateTime
|
32
32
|
|
33
33
|
# @!attribute tax_code
|
34
|
-
# @return [String] Optional field
|
34
|
+
# @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`.
|
35
35
|
define_attribute :tax_code, String
|
36
36
|
|
37
37
|
# @!attribute tax_exempt
|
@@ -40,7 +40,7 @@ module Recurly
|
|
40
40
|
|
41
41
|
# @!attribute type
|
42
42
|
# @return [String] Line item type.
|
43
|
-
define_attribute :type, String
|
43
|
+
define_attribute :type, String
|
44
44
|
|
45
45
|
# @!attribute unit_amount
|
46
46
|
# @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`.
|
@@ -40,7 +40,7 @@ module Recurly
|
|
40
40
|
|
41
41
|
# @!attribute interval_unit
|
42
42
|
# @return [String] Unit for the plan's billing interval.
|
43
|
-
define_attribute :interval_unit, String
|
43
|
+
define_attribute :interval_unit, String
|
44
44
|
|
45
45
|
# @!attribute name
|
46
46
|
# @return [String] This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice.
|
@@ -51,7 +51,7 @@ module Recurly
|
|
51
51
|
define_attribute :setup_fee_accounting_code, String
|
52
52
|
|
53
53
|
# @!attribute tax_code
|
54
|
-
# @return [String] Optional field
|
54
|
+
# @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`.
|
55
55
|
define_attribute :tax_code, String
|
56
56
|
|
57
57
|
# @!attribute tax_exempt
|
@@ -68,7 +68,7 @@ module Recurly
|
|
68
68
|
|
69
69
|
# @!attribute trial_unit
|
70
70
|
# @return [String] Units for the plan's trial period.
|
71
|
-
define_attribute :trial_unit, String
|
71
|
+
define_attribute :trial_unit, String
|
72
72
|
end
|
73
73
|
end
|
74
74
|
end
|
@@ -34,9 +34,9 @@ module Recurly
|
|
34
34
|
# @return [PlanHostedPages] Hosted pages settings
|
35
35
|
define_attribute :hosted_pages, :PlanHostedPages
|
36
36
|
|
37
|
-
# @!attribute
|
37
|
+
# @!attribute id
|
38
38
|
# @return [String] Plan ID
|
39
|
-
define_attribute :id, String
|
39
|
+
define_attribute :id, String
|
40
40
|
|
41
41
|
# @!attribute name
|
42
42
|
# @return [String] This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice.
|
@@ -47,7 +47,7 @@ module Recurly
|
|
47
47
|
define_attribute :setup_fee_accounting_code, String
|
48
48
|
|
49
49
|
# @!attribute tax_code
|
50
|
-
# @return [String] Optional field
|
50
|
+
# @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`.
|
51
51
|
define_attribute :tax_code, String
|
52
52
|
|
53
53
|
# @!attribute tax_exempt
|
@@ -64,7 +64,7 @@ module Recurly
|
|
64
64
|
|
65
65
|
# @!attribute trial_unit
|
66
66
|
# @return [String] Units for the plan's trial period.
|
67
|
-
define_attribute :trial_unit, String
|
67
|
+
define_attribute :trial_unit, String
|
68
68
|
end
|
69
69
|
end
|
70
70
|
end
|
@@ -0,0 +1,74 @@
|
|
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 PurchaseCreate < Request
|
8
|
+
|
9
|
+
# @!attribute account
|
10
|
+
# @return [AccountPurchase]
|
11
|
+
define_attribute :account, :AccountPurchase
|
12
|
+
|
13
|
+
# @!attribute collection_method
|
14
|
+
# @return [String] Collection method
|
15
|
+
define_attribute :collection_method, String
|
16
|
+
|
17
|
+
# @!attribute coupon_codes
|
18
|
+
# @return [Array[String]] A list of coupon_codes to be redeemed on the subscription or account during the purchase.
|
19
|
+
define_attribute :coupon_codes, Array, { :item_type => String }
|
20
|
+
|
21
|
+
# @!attribute credit_customer_notes
|
22
|
+
# @return [String] Notes to be put on the credit invoice resulting from credits in the purchase, if any.
|
23
|
+
define_attribute :credit_customer_notes, String
|
24
|
+
|
25
|
+
# @!attribute currency
|
26
|
+
# @return [String] 3-letter ISO 4217 currency code.
|
27
|
+
define_attribute :currency, String
|
28
|
+
|
29
|
+
# @!attribute customer_notes
|
30
|
+
# @return [String] Customer notes
|
31
|
+
define_attribute :customer_notes, String
|
32
|
+
|
33
|
+
# @!attribute gateway_code
|
34
|
+
# @return [String] The default payment gateway identifier to be used for the purchase transaction. This will also be applied as the default for any subscriptions included in the purchase request.
|
35
|
+
define_attribute :gateway_code, String
|
36
|
+
|
37
|
+
# @!attribute gift_card_redemption_code
|
38
|
+
# @return [String] A gift card redemption code to be redeemed on the purchase invoice.
|
39
|
+
define_attribute :gift_card_redemption_code, String
|
40
|
+
|
41
|
+
# @!attribute line_items
|
42
|
+
# @return [Array[LineItemCreate]] A list of one time charges or credits to be created with the purchase.
|
43
|
+
define_attribute :line_items, Array, { :item_type => :LineItemCreate }
|
44
|
+
|
45
|
+
# @!attribute net_terms
|
46
|
+
# @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.
|
47
|
+
define_attribute :net_terms, Integer
|
48
|
+
|
49
|
+
# @!attribute po_number
|
50
|
+
# @return [String] For manual invoicing, this identifies the PO number associated with the subscription.
|
51
|
+
define_attribute :po_number, String
|
52
|
+
|
53
|
+
# @!attribute shipping_address
|
54
|
+
# @return [ShippingAddressCreate]
|
55
|
+
define_attribute :shipping_address, :ShippingAddressCreate
|
56
|
+
|
57
|
+
# @!attribute shipping_address_id
|
58
|
+
# @return [String] Assign a shipping address from the account's existing shipping addresses. If this and `shipping_address` are both present, `shipping_address` will take precedence.
|
59
|
+
define_attribute :shipping_address_id, String
|
60
|
+
|
61
|
+
# @!attribute subscriptions
|
62
|
+
# @return [Array[SubscriptionPurchase]] A list of subscriptions to be created with the purchase.
|
63
|
+
define_attribute :subscriptions, Array, { :item_type => :SubscriptionPurchase }
|
64
|
+
|
65
|
+
# @!attribute terms_and_conditions
|
66
|
+
# @return [String] Terms and conditions to be put on the purchase invoice.
|
67
|
+
define_attribute :terms_and_conditions, String
|
68
|
+
|
69
|
+
# @!attribute vat_reverse_charge_notes
|
70
|
+
# @return [String] VAT reverse charge notes for cross border European tax settlement.
|
71
|
+
define_attribute :vat_reverse_charge_notes, String
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -26,9 +26,9 @@ module Recurly
|
|
26
26
|
# @return [String]
|
27
27
|
define_attribute :first_name, String
|
28
28
|
|
29
|
-
# @!attribute
|
29
|
+
# @!attribute id
|
30
30
|
# @return [String] Shipping Address ID
|
31
|
-
define_attribute :id, String
|
31
|
+
define_attribute :id, String
|
32
32
|
|
33
33
|
# @!attribute last_name
|
34
34
|
# @return [String]
|