recurly 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bumpversion.cfg +1 -1
- data/.github/ISSUE_TEMPLATE/bug-report.md +30 -0
- data/.github/ISSUE_TEMPLATE/question-or-other.md +10 -0
- data/.yardopts +1 -2
- data/GETTING_STARTED.md +13 -20
- data/README.md +4 -13
- data/lib/recurly/client.rb +9 -1
- data/lib/recurly/client/operations.rb +298 -173
- data/lib/recurly/http.rb +3 -1
- data/lib/recurly/requests/account_create.rb +4 -0
- data/lib/recurly/requests/account_purchase.rb +4 -0
- data/lib/recurly/requests/account_update.rb +4 -0
- data/lib/recurly/requests/billing_info_create.rb +8 -0
- data/lib/recurly/requests/invoice_collect.rb +18 -0
- data/lib/recurly/requests/item_create.rb +50 -0
- data/lib/recurly/requests/item_update.rb +50 -0
- data/lib/recurly/requests/line_item_create.rb +21 -5
- data/lib/recurly/requests/pricing.rb +18 -0
- data/lib/recurly/requests/purchase_create.rb +4 -0
- data/lib/recurly/requests/subscription_cancel.rb +14 -0
- data/lib/recurly/requests/subscription_change_create.rb +5 -1
- data/lib/recurly/requests/subscription_create.rb +4 -0
- data/lib/recurly/requests/subscription_update.rb +1 -1
- data/lib/recurly/resources/binary_file.rb +14 -0
- data/lib/recurly/resources/item.rb +74 -0
- data/lib/recurly/resources/line_item.rb +13 -1
- data/lib/recurly/resources/pricing.rb +18 -0
- data/lib/recurly/resources/transaction.rb +1 -1
- data/lib/recurly/resources/transaction_error.rb +8 -0
- data/lib/recurly/schema/file_parser.rb +13 -0
- data/lib/recurly/version.rb +1 -1
- data/openapi/api.yaml +15083 -0
- metadata +15 -3
data/lib/recurly/http.rb
CHANGED
@@ -3,7 +3,8 @@ module Recurly
|
|
3
3
|
class Response
|
4
4
|
attr_accessor :status, :body, :request,
|
5
5
|
:request_id, :rate_limit, :rate_limit_remaining,
|
6
|
-
:rate_limit_reset, :date, :proxy_metadata
|
6
|
+
:rate_limit_reset, :date, :proxy_metadata,
|
7
|
+
:content_type
|
7
8
|
|
8
9
|
def initialize(resp, request)
|
9
10
|
@request = request
|
@@ -12,6 +13,7 @@ module Recurly
|
|
12
13
|
@rate_limit = resp.headers["x-ratelimit-limit"].to_i
|
13
14
|
@rate_limit_remaining = resp.headers["x-ratelimit-remaining"].to_i
|
14
15
|
@rate_limit_reset = Time.at(resp.headers["x-ratelimit-reset"].to_i).to_datetime
|
16
|
+
@content_type = resp.headers["content-type"].split(";").first if resp.headers["content-type"]
|
15
17
|
if resp.body && !resp.body.empty?
|
16
18
|
@body = resp.body
|
17
19
|
else
|
@@ -74,6 +74,10 @@ module Recurly
|
|
74
74
|
# @return [Boolean] The tax status of the account. `true` exempts tax on the account, `false` applies tax on the account.
|
75
75
|
define_attribute :tax_exempt, :Boolean
|
76
76
|
|
77
|
+
# @!attribute transaction_type
|
78
|
+
# @return [String] An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
|
79
|
+
define_attribute :transaction_type, String
|
80
|
+
|
77
81
|
# @!attribute username
|
78
82
|
# @return [String] A secondary value for the account.
|
79
83
|
define_attribute :username, String
|
@@ -74,6 +74,10 @@ module Recurly
|
|
74
74
|
# @return [Boolean] The tax status of the account. `true` exempts tax on the account, `false` applies tax on the account.
|
75
75
|
define_attribute :tax_exempt, :Boolean
|
76
76
|
|
77
|
+
# @!attribute transaction_type
|
78
|
+
# @return [String] An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
|
79
|
+
define_attribute :transaction_type, String
|
80
|
+
|
77
81
|
# @!attribute username
|
78
82
|
# @return [String] A secondary value for the account.
|
79
83
|
define_attribute :username, String
|
@@ -62,6 +62,10 @@ module Recurly
|
|
62
62
|
# @return [Boolean] The tax status of the account. `true` exempts tax on the account, `false` applies tax on the account.
|
63
63
|
define_attribute :tax_exempt, :Boolean
|
64
64
|
|
65
|
+
# @!attribute transaction_type
|
66
|
+
# @return [String] An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
|
67
|
+
define_attribute :transaction_type, String
|
68
|
+
|
65
69
|
# @!attribute username
|
66
70
|
# @return [String] A secondary value for the account.
|
67
71
|
define_attribute :username, String
|
@@ -50,10 +50,18 @@ module Recurly
|
|
50
50
|
# @return [String] PayPal billing agreement ID
|
51
51
|
define_attribute :paypal_billing_agreement_id, String
|
52
52
|
|
53
|
+
# @!attribute three_d_secure_action_result_token_id
|
54
|
+
# @return [String] A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge.
|
55
|
+
define_attribute :three_d_secure_action_result_token_id, String
|
56
|
+
|
53
57
|
# @!attribute token_id
|
54
58
|
# @return [String] A token [generated by Recurly.js](https://docs.recurly.com/js/#getting-a-token).
|
55
59
|
define_attribute :token_id, String
|
56
60
|
|
61
|
+
# @!attribute transaction_type
|
62
|
+
# @return [String] An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
|
63
|
+
define_attribute :transaction_type, String
|
64
|
+
|
57
65
|
# @!attribute vat_number
|
58
66
|
# @return [String] VAT number
|
59
67
|
define_attribute :vat_number, 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 Requests
|
7
|
+
class InvoiceCollect < 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
|
+
|
13
|
+
# @!attribute transaction_type
|
14
|
+
# @return [String] An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
|
15
|
+
define_attribute :transaction_type, String
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,50 @@
|
|
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 ItemCreate < Request
|
8
|
+
|
9
|
+
# @!attribute accounting_code
|
10
|
+
# @return [String] Accounting code for invoice line items.
|
11
|
+
define_attribute :accounting_code, String
|
12
|
+
|
13
|
+
# @!attribute code
|
14
|
+
# @return [String] Unique code to identify the item.
|
15
|
+
define_attribute :code, String
|
16
|
+
|
17
|
+
# @!attribute currencies
|
18
|
+
# @return [Array[Pricing]] Item Pricing
|
19
|
+
define_attribute :currencies, Array, { :item_type => :Pricing }
|
20
|
+
|
21
|
+
# @!attribute custom_fields
|
22
|
+
# @return [Array[CustomField]]
|
23
|
+
define_attribute :custom_fields, Array, { :item_type => :CustomField }
|
24
|
+
|
25
|
+
# @!attribute description
|
26
|
+
# @return [String] Optional, description.
|
27
|
+
define_attribute :description, String
|
28
|
+
|
29
|
+
# @!attribute external_sku
|
30
|
+
# @return [String] Optional, stock keeping unit to link the item to other inventory systems.
|
31
|
+
define_attribute :external_sku, String
|
32
|
+
|
33
|
+
# @!attribute name
|
34
|
+
# @return [String] This name describes your item and will appear on the invoice when it's purchased on a one time basis.
|
35
|
+
define_attribute :name, String
|
36
|
+
|
37
|
+
# @!attribute revenue_schedule_type
|
38
|
+
# @return [String] Revenue schedule type
|
39
|
+
define_attribute :revenue_schedule_type, String
|
40
|
+
|
41
|
+
# @!attribute tax_code
|
42
|
+
# @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`.
|
43
|
+
define_attribute :tax_code, String
|
44
|
+
|
45
|
+
# @!attribute tax_exempt
|
46
|
+
# @return [Boolean] `true` exempts tax on the item, `false` applies tax on the item.
|
47
|
+
define_attribute :tax_exempt, :Boolean
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,50 @@
|
|
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 ItemUpdate < Request
|
8
|
+
|
9
|
+
# @!attribute accounting_code
|
10
|
+
# @return [String] Accounting code for invoice line items.
|
11
|
+
define_attribute :accounting_code, String
|
12
|
+
|
13
|
+
# @!attribute code
|
14
|
+
# @return [String] Unique code to identify the item.
|
15
|
+
define_attribute :code, String
|
16
|
+
|
17
|
+
# @!attribute currencies
|
18
|
+
# @return [Array[Pricing]] Item Pricing
|
19
|
+
define_attribute :currencies, Array, { :item_type => :Pricing }
|
20
|
+
|
21
|
+
# @!attribute custom_fields
|
22
|
+
# @return [Array[CustomField]]
|
23
|
+
define_attribute :custom_fields, Array, { :item_type => :CustomField }
|
24
|
+
|
25
|
+
# @!attribute description
|
26
|
+
# @return [String] Optional, description.
|
27
|
+
define_attribute :description, String
|
28
|
+
|
29
|
+
# @!attribute external_sku
|
30
|
+
# @return [String] Optional, stock keeping unit to link the item to other inventory systems.
|
31
|
+
define_attribute :external_sku, String
|
32
|
+
|
33
|
+
# @!attribute name
|
34
|
+
# @return [String] This name describes your item and will appear on the invoice when it's purchased on a one time basis.
|
35
|
+
define_attribute :name, String
|
36
|
+
|
37
|
+
# @!attribute revenue_schedule_type
|
38
|
+
# @return [String] Revenue schedule type
|
39
|
+
define_attribute :revenue_schedule_type, String
|
40
|
+
|
41
|
+
# @!attribute tax_code
|
42
|
+
# @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`.
|
43
|
+
define_attribute :tax_code, String
|
44
|
+
|
45
|
+
# @!attribute tax_exempt
|
46
|
+
# @return [Boolean] `true` exempts tax on the item, `false` applies tax on the item.
|
47
|
+
define_attribute :tax_exempt, :Boolean
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -6,30 +6,46 @@ module Recurly
|
|
6
6
|
module Requests
|
7
7
|
class LineItemCreate < Request
|
8
8
|
|
9
|
+
# @!attribute accounting_code
|
10
|
+
# @return [String] Accounting Code for the `LineItem`. If `item_code`/`item_id` is part of the request then `accounting_code` must be absent.
|
11
|
+
define_attribute :accounting_code, String
|
12
|
+
|
9
13
|
# @!attribute credit_reason_code
|
10
14
|
# @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
15
|
define_attribute :credit_reason_code, String
|
12
16
|
|
13
17
|
# @!attribute currency
|
14
|
-
# @return [String] 3-letter ISO 4217 currency code.
|
18
|
+
# @return [String] 3-letter ISO 4217 currency code. If `item_code`/`item_id` is part of the request then `currency` is optional, if the site has a single default currency. `currency` is required if `item_code`/`item_id` is present, and there are multiple currencies defined on the site. If `item_code`/`item_id` is not present `currency` is required.
|
15
19
|
define_attribute :currency, String
|
16
20
|
|
17
21
|
# @!attribute description
|
18
|
-
# @return [String] Description that appears on the invoice.
|
22
|
+
# @return [String] Description that appears on the invoice. If `item_code`/`item_id` is part of the request then `description` must be absent.
|
19
23
|
define_attribute :description, String
|
20
24
|
|
21
25
|
# @!attribute end_date
|
22
26
|
# @return [DateTime] If this date is provided, it indicates the end of a time range.
|
23
27
|
define_attribute :end_date, DateTime
|
24
28
|
|
29
|
+
# @!attribute item_code
|
30
|
+
# @return [String] Unique code to identify an item, when the Catalog feature is enabled.
|
31
|
+
define_attribute :item_code, String
|
32
|
+
|
33
|
+
# @!attribute item_id
|
34
|
+
# @return [String] Available when the Catalog feature is enabled.
|
35
|
+
define_attribute :item_id, String
|
36
|
+
|
25
37
|
# @!attribute product_code
|
26
|
-
# @return [String] Optional field to track a product code or SKU for the line item. This can be used to later reporting on product purchases. For Vertex tax calculations, this field will be used as the Vertex `product` field.
|
38
|
+
# @return [String] Optional field to track a product code or SKU for the line item. This can be used to later reporting on product purchases. For Vertex tax calculations, this field will be used as the Vertex `product` field. If `item_code`/`item_id` is part of the request then `product_code` must be absent.
|
27
39
|
define_attribute :product_code, String
|
28
40
|
|
29
41
|
# @!attribute quantity
|
30
42
|
# @return [Integer] This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes.
|
31
43
|
define_attribute :quantity, Integer
|
32
44
|
|
45
|
+
# @!attribute revenue_schedule_type
|
46
|
+
# @return [String] Revenue schedule type
|
47
|
+
define_attribute :revenue_schedule_type, String
|
48
|
+
|
33
49
|
# @!attribute start_date
|
34
50
|
# @return [DateTime] If an end date is present, this is value indicates the beginning of a billing time range. If no end date is present it indicates billing for a specific date. Defaults to the current date-time.
|
35
51
|
define_attribute :start_date, DateTime
|
@@ -43,11 +59,11 @@ module Recurly
|
|
43
59
|
define_attribute :tax_exempt, :Boolean
|
44
60
|
|
45
61
|
# @!attribute type
|
46
|
-
# @return [String] Line item type.
|
62
|
+
# @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.
|
47
63
|
define_attribute :type, String
|
48
64
|
|
49
65
|
# @!attribute unit_amount
|
50
|
-
# @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`.
|
66
|
+
# @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.
|
51
67
|
define_attribute :unit_amount, Float
|
52
68
|
end
|
53
69
|
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 Pricing < 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] Unit price
|
15
|
+
define_attribute :unit_amount, Float
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -62,6 +62,10 @@ module Recurly
|
|
62
62
|
# @return [String] Terms and conditions to be put on the purchase invoice.
|
63
63
|
define_attribute :terms_and_conditions, String
|
64
64
|
|
65
|
+
# @!attribute transaction_type
|
66
|
+
# @return [String] An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
|
67
|
+
define_attribute :transaction_type, String
|
68
|
+
|
65
69
|
# @!attribute vat_reverse_charge_notes
|
66
70
|
# @return [String] VAT reverse charge notes for cross border European tax settlement.
|
67
71
|
define_attribute :vat_reverse_charge_notes, String
|
@@ -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 SubscriptionCancel < Request
|
8
|
+
|
9
|
+
# @!attribute timeframe
|
10
|
+
# @return [String] The timeframe parameter controls when the expiration takes place. The `bill_date` timeframe causes the subscription to expire when the subscription is scheduled to bill next. The `term_end` timeframe causes the subscription to continue to bill until the end of the subscription term, then expire.
|
11
|
+
define_attribute :timeframe, String
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -43,9 +43,13 @@ module Recurly
|
|
43
43
|
define_attribute :shipping, :SubscriptionChangeShippingCreate
|
44
44
|
|
45
45
|
# @!attribute timeframe
|
46
|
-
# @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
|
46
|
+
# @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`.
|
47
47
|
define_attribute :timeframe, String
|
48
48
|
|
49
|
+
# @!attribute transaction_type
|
50
|
+
# @return [String] An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
|
51
|
+
define_attribute :transaction_type, String
|
52
|
+
|
49
53
|
# @!attribute unit_amount
|
50
54
|
# @return [Float] Optionally, sets custom pricing for the subscription, overriding the plan's default unit amount. The subscription's current currency will be used.
|
51
55
|
define_attribute :unit_amount, Float
|
@@ -86,6 +86,10 @@ module Recurly
|
|
86
86
|
# @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.
|
87
87
|
define_attribute :total_billing_cycles, Integer
|
88
88
|
|
89
|
+
# @!attribute transaction_type
|
90
|
+
# @return [String] An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
|
91
|
+
define_attribute :transaction_type, String
|
92
|
+
|
89
93
|
# @!attribute trial_ends_at
|
90
94
|
# @return [DateTime] If set, overrides the default trial behavior for the subscription. The date must be in the future.
|
91
95
|
define_attribute :trial_ends_at, DateTime
|
@@ -27,7 +27,7 @@ module Recurly
|
|
27
27
|
define_attribute :net_terms, Integer
|
28
28
|
|
29
29
|
# @!attribute next_bill_date
|
30
|
-
# @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. For a subscription in a trial period, this will change when the trial expires.
|
30
|
+
# @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. For a subscription in a trial period, this will change when the trial expires. This parameter is useful for postponement of a subscription to change its billing date without proration.
|
31
31
|
define_attribute :next_bill_date, DateTime
|
32
32
|
|
33
33
|
# @!attribute po_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 Resources
|
7
|
+
class BinaryFile < Resource
|
8
|
+
|
9
|
+
# @!attribute data
|
10
|
+
# @return [String]
|
11
|
+
define_attribute :data, String
|
12
|
+
end
|
13
|
+
end
|
14
|
+
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 Resources
|
7
|
+
class Item < Resource
|
8
|
+
|
9
|
+
# @!attribute accounting_code
|
10
|
+
# @return [String] Accounting code for invoice line items.
|
11
|
+
define_attribute :accounting_code, String
|
12
|
+
|
13
|
+
# @!attribute code
|
14
|
+
# @return [String] Unique code to identify the item.
|
15
|
+
define_attribute :code, String
|
16
|
+
|
17
|
+
# @!attribute created_at
|
18
|
+
# @return [DateTime] Created at
|
19
|
+
define_attribute :created_at, DateTime
|
20
|
+
|
21
|
+
# @!attribute currencies
|
22
|
+
# @return [Array[Pricing]] Item Pricing
|
23
|
+
define_attribute :currencies, Array, { :item_type => :Pricing }
|
24
|
+
|
25
|
+
# @!attribute custom_fields
|
26
|
+
# @return [Array[CustomField]]
|
27
|
+
define_attribute :custom_fields, Array, { :item_type => :CustomField }
|
28
|
+
|
29
|
+
# @!attribute deleted_at
|
30
|
+
# @return [DateTime] Deleted at
|
31
|
+
define_attribute :deleted_at, DateTime
|
32
|
+
|
33
|
+
# @!attribute description
|
34
|
+
# @return [String] Optional, description.
|
35
|
+
define_attribute :description, String
|
36
|
+
|
37
|
+
# @!attribute external_sku
|
38
|
+
# @return [String] Optional, stock keeping unit to link the item to other inventory systems.
|
39
|
+
define_attribute :external_sku, String
|
40
|
+
|
41
|
+
# @!attribute id
|
42
|
+
# @return [String] Item ID
|
43
|
+
define_attribute :id, String
|
44
|
+
|
45
|
+
# @!attribute name
|
46
|
+
# @return [String] This name describes your item and will appear on the invoice when it's purchased on a one time basis.
|
47
|
+
define_attribute :name, String
|
48
|
+
|
49
|
+
# @!attribute object
|
50
|
+
# @return [String] Object type
|
51
|
+
define_attribute :object, String
|
52
|
+
|
53
|
+
# @!attribute revenue_schedule_type
|
54
|
+
# @return [String] Revenue schedule type
|
55
|
+
define_attribute :revenue_schedule_type, String
|
56
|
+
|
57
|
+
# @!attribute state
|
58
|
+
# @return [String] The current state of the item.
|
59
|
+
define_attribute :state, String
|
60
|
+
|
61
|
+
# @!attribute tax_code
|
62
|
+
# @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`.
|
63
|
+
define_attribute :tax_code, String
|
64
|
+
|
65
|
+
# @!attribute tax_exempt
|
66
|
+
# @return [Boolean] `true` exempts tax on the item, `false` applies tax on the item.
|
67
|
+
define_attribute :tax_exempt, :Boolean
|
68
|
+
|
69
|
+
# @!attribute updated_at
|
70
|
+
# @return [DateTime] Last updated at
|
71
|
+
define_attribute :updated_at, DateTime
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -66,6 +66,14 @@ module Recurly
|
|
66
66
|
# @return [String] Once the line item has been invoiced this will be the invoice's number. If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence.
|
67
67
|
define_attribute :invoice_number, String
|
68
68
|
|
69
|
+
# @!attribute item_code
|
70
|
+
# @return [String] Unique code to identify an item, when the Catalog feature is enabled.
|
71
|
+
define_attribute :item_code, String
|
72
|
+
|
73
|
+
# @!attribute item_id
|
74
|
+
# @return [String] Available when the Catalog feature is enabled.
|
75
|
+
define_attribute :item_id, String
|
76
|
+
|
69
77
|
# @!attribute legacy_category
|
70
78
|
# @return [String] Category to describe the role of a line item on a legacy invoice: - "charges" refers to charges being billed for on this invoice. - "credits" refers to refund or proration credits. This portion of the invoice can be considered a credit memo. - "applied_credits" refers to previous credits applied to this invoice. See their original_line_item_id to determine where the credit first originated. - "carryforwards" can be ignored. They exist to consume any remaining credit balance. A new credit with the same amount will be created and placed back on the account.
|
71
79
|
define_attribute :legacy_category, String
|
@@ -95,7 +103,7 @@ module Recurly
|
|
95
103
|
define_attribute :previous_line_item_id, String
|
96
104
|
|
97
105
|
# @!attribute product_code
|
98
|
-
# @return [String] For plan
|
106
|
+
# @return [String] For plan-related line items this will be the plan's code, for add-on related line items it will be the add-on's code. For item-related line itmes it will be the item's `external_sku`.
|
99
107
|
define_attribute :product_code, String
|
100
108
|
|
101
109
|
# @!attribute proration_rate
|
@@ -114,6 +122,10 @@ module Recurly
|
|
114
122
|
# @return [Integer] For refund charges, the quantity being refunded. For non-refund charges, the total quantity refunded (possibly over multiple refunds).
|
115
123
|
define_attribute :refunded_quantity, Integer
|
116
124
|
|
125
|
+
# @!attribute revenue_schedule_type
|
126
|
+
# @return [String] Revenue schedule type
|
127
|
+
define_attribute :revenue_schedule_type, String
|
128
|
+
|
117
129
|
# @!attribute shipping_address
|
118
130
|
# @return [ShippingAddress]
|
119
131
|
define_attribute :shipping_address, :ShippingAddress
|