recurly 4.0.0 → 4.4.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/.changelog_config.yaml +11 -0
- data/.github/workflows/docs.yml +1 -1
- data/.travis.yml +1 -0
- data/CHANGELOG.md +63 -312
- data/CODE_OF_CONDUCT.md +130 -0
- data/CONTRIBUTING.md +4 -0
- data/GETTING_STARTED.md +1 -1
- data/README.md +3 -0
- data/lib/recurly/client.rb +23 -14
- data/lib/recurly/client/operations.rb +50 -154
- data/lib/recurly/errors.rb +1 -0
- data/lib/recurly/errors/network_errors.rb +7 -0
- data/lib/recurly/pager.rb +2 -2
- data/lib/recurly/requests/add_on_create.rb +2 -2
- data/lib/recurly/requests/add_on_update.rb +2 -2
- data/lib/recurly/requests/billing_info_create.rb +5 -1
- data/lib/recurly/requests/billing_info_verify.rb +14 -0
- data/lib/recurly/requests/subscription_add_on_tier.rb +6 -2
- data/lib/recurly/requests/subscription_purchase.rb +1 -1
- data/lib/recurly/requests/tier.rb +5 -1
- data/lib/recurly/resources/billing_info.rb +5 -1
- data/lib/recurly/resources/invoice.rb +1 -1
- data/lib/recurly/resources/subscription_add_on_tier.rb +6 -2
- data/lib/recurly/resources/subscription_change.rb +4 -0
- data/lib/recurly/resources/subscription_change_billing_info.rb +14 -0
- data/lib/recurly/resources/tax_detail.rb +26 -0
- data/lib/recurly/resources/tax_info.rb +4 -0
- data/lib/recurly/resources/tier.rb +5 -1
- data/lib/recurly/resources/transaction.rb +4 -0
- data/lib/recurly/version.rb +1 -1
- data/openapi/api.yaml +297 -232
- data/scripts/build +2 -2
- data/scripts/format +2 -2
- data/scripts/prepare-release +43 -29
- data/scripts/release +5 -20
- metadata +12 -9
- data/.github_changelog_generator +0 -8
- data/scripts/bump +0 -11
- data/scripts/changelog +0 -14
data/lib/recurly/errors.rb
CHANGED
data/lib/recurly/pager.rb
CHANGED
@@ -24,7 +24,7 @@ module Recurly
|
|
24
24
|
|
25
25
|
# Makes a HEAD request to the API to determine how many total records exist.
|
26
26
|
def count
|
27
|
-
resource = @client.send(:head, self.next,
|
27
|
+
resource = @client.send(:head, self.next, **@options)
|
28
28
|
resource.get_response.total_records
|
29
29
|
end
|
30
30
|
|
@@ -116,7 +116,7 @@ module Recurly
|
|
116
116
|
|
117
117
|
def fetch_next!(options)
|
118
118
|
path = extract_path(self.next)
|
119
|
-
page = @client.send(:get, path, options)
|
119
|
+
page = @client.send(:get, path, **options)
|
120
120
|
@data = page.data.map { |d| JSONParser.from_json(d) }
|
121
121
|
@has_more = page.has_more
|
122
122
|
@next = page.next
|
@@ -79,11 +79,11 @@ module Recurly
|
|
79
79
|
define_attribute :tier_type, String
|
80
80
|
|
81
81
|
# @!attribute tiers
|
82
|
-
# @return [Array[Tier]] If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies
|
82
|
+
# @return [Array[Tier]] If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`, or alternatively, `usage_percentage` for usage percentage type usage add ons. There must be one tier with an `ending_quantity` of 999999999 which is the default if not provided.
|
83
83
|
define_attribute :tiers, Array, { :item_type => :Tier }
|
84
84
|
|
85
85
|
# @!attribute usage_percentage
|
86
|
-
# @return [Float] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage and `usage_type` is percentage. Must be omitted otherwise.
|
86
|
+
# @return [Float] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage, `tier_type` is `flat` and `usage_type` is percentage. Must be omitted otherwise.
|
87
87
|
define_attribute :usage_percentage, Float
|
88
88
|
|
89
89
|
# @!attribute usage_type
|
@@ -63,11 +63,11 @@ module Recurly
|
|
63
63
|
define_attribute :tax_code, String
|
64
64
|
|
65
65
|
# @!attribute tiers
|
66
|
-
# @return [Array[Tier]] If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies
|
66
|
+
# @return [Array[Tier]] If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`, or alternatively, `usage_percentage` for usage percentage type usage add ons. There must be one tier with an `ending_quantity` of 999999999 which is the default if not provided.
|
67
67
|
define_attribute :tiers, Array, { :item_type => :Tier }
|
68
68
|
|
69
69
|
# @!attribute usage_percentage
|
70
|
-
# @return [Float] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage and `usage_type` is percentage. Must be omitted otherwise.
|
70
|
+
# @return [Float] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage, `tier_type` is `flat` and `usage_type` is percentage. Must be omitted otherwise.
|
71
71
|
define_attribute :usage_percentage, Float
|
72
72
|
end
|
73
73
|
end
|
@@ -14,6 +14,10 @@ module Recurly
|
|
14
14
|
# @return [String] Amazon billing agreement ID
|
15
15
|
define_attribute :amazon_billing_agreement_id, String
|
16
16
|
|
17
|
+
# @!attribute backup_payment_method
|
18
|
+
# @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.
|
19
|
+
define_attribute :backup_payment_method, :Boolean
|
20
|
+
|
17
21
|
# @!attribute company
|
18
22
|
# @return [String] Company name
|
19
23
|
define_attribute :company, String
|
@@ -63,7 +67,7 @@ module Recurly
|
|
63
67
|
define_attribute :paypal_billing_agreement_id, String
|
64
68
|
|
65
69
|
# @!attribute primary_payment_method
|
66
|
-
# @return [Boolean] The `primary_payment_method`
|
70
|
+
# @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.
|
67
71
|
define_attribute :primary_payment_method, :Boolean
|
68
72
|
|
69
73
|
# @!attribute tax_identifier
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# This file is automatically created by Recurly's OpenAPI generation process
|
2
|
+
# and thus any edits you make by hand will be lost. If you wish to make a
|
3
|
+
# change to this file, please create a Github issue explaining the changes you
|
4
|
+
# need and we will usher them to the appropriate places.
|
5
|
+
module Recurly
|
6
|
+
module Requests
|
7
|
+
class BillingInfoVerify < Request
|
8
|
+
|
9
|
+
# @!attribute gateway_code
|
10
|
+
# @return [String] An identifier for a specific payment gateway.
|
11
|
+
define_attribute :gateway_code, String
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -11,12 +11,16 @@ module Recurly
|
|
11
11
|
define_attribute :ending_quantity, Integer
|
12
12
|
|
13
13
|
# @!attribute unit_amount
|
14
|
-
# @return [Float] Allows up to 2 decimal places. Optionally, override the tiers' default unit amount.
|
14
|
+
# @return [Float] Allows up to 2 decimal places. Optionally, override the tiers' default unit amount. If add-on's `add_on_type` is `usage` and `usage_type` is `percentage`, cannot be provided.
|
15
15
|
define_attribute :unit_amount, Float
|
16
16
|
|
17
17
|
# @!attribute unit_amount_decimal
|
18
|
-
# @return [String] Allows up to 9 decimal places. Optionally, override tiers' default unit amount. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
|
18
|
+
# @return [String] Allows up to 9 decimal places. Optionally, override tiers' default unit amount. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided. If add-on's `add_on_type` is `usage` and `usage_type` is `percentage`, cannot be provided.
|
19
19
|
define_attribute :unit_amount_decimal, String
|
20
|
+
|
21
|
+
# @!attribute usage_percentage
|
22
|
+
# @return [String] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string. A value between 0.0 and 100.0. Optionally, override tiers' default usage percentage. Required if add-on's `add_on_type` is `usage` and `usage_type` is `percentage`. Must be omitted otherwise.
|
23
|
+
define_attribute :usage_percentage, String
|
20
24
|
end
|
21
25
|
end
|
22
26
|
end
|
@@ -59,7 +59,7 @@ module Recurly
|
|
59
59
|
define_attribute :trial_ends_at, DateTime
|
60
60
|
|
61
61
|
# @!attribute unit_amount
|
62
|
-
# @return [Float] Override the unit amount of the subscription plan by setting this value
|
62
|
+
# @return [Float] Override the unit amount of the subscription plan by setting this value. If not provided, the subscription will inherit the price from the subscription plan for the provided currency.
|
63
63
|
define_attribute :unit_amount, Float
|
64
64
|
end
|
65
65
|
end
|
@@ -11,8 +11,12 @@ module Recurly
|
|
11
11
|
define_attribute :currencies, Array, { :item_type => :TierPricing }
|
12
12
|
|
13
13
|
# @!attribute ending_quantity
|
14
|
-
# @return [Integer] Ending quantity
|
14
|
+
# @return [Integer] Ending quantity for the tier. This represents a unit amount for unit-priced add ons, but for percentage type usage add ons, represents the site default currency in its minimum divisible unit.
|
15
15
|
define_attribute :ending_quantity, Integer
|
16
|
+
|
17
|
+
# @!attribute usage_percentage
|
18
|
+
# @return [String] Decimal usage percentage.
|
19
|
+
define_attribute :usage_percentage, String
|
16
20
|
end
|
17
21
|
end
|
18
22
|
end
|
@@ -14,6 +14,10 @@ module Recurly
|
|
14
14
|
# @return [Address]
|
15
15
|
define_attribute :address, :Address
|
16
16
|
|
17
|
+
# @!attribute backup_payment_method
|
18
|
+
# @return [Boolean] The `backup_payment_method` field is used to indicate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined.
|
19
|
+
define_attribute :backup_payment_method, :Boolean
|
20
|
+
|
17
21
|
# @!attribute company
|
18
22
|
# @return [String]
|
19
23
|
define_attribute :company, String
|
@@ -47,7 +51,7 @@ module Recurly
|
|
47
51
|
define_attribute :payment_method, :PaymentMethod
|
48
52
|
|
49
53
|
# @!attribute primary_payment_method
|
50
|
-
# @return [Boolean] The `primary_payment_method`
|
54
|
+
# @return [Boolean] The `primary_payment_method` field is used to indicate the primary billing info on the account. The first billing info created on an account will always become primary. This payment method will be used
|
51
55
|
define_attribute :primary_payment_method, :Boolean
|
52
56
|
|
53
57
|
# @!attribute updated_at
|
@@ -111,7 +111,7 @@ module Recurly
|
|
111
111
|
define_attribute :subscription_ids, Array, { :item_type => String }
|
112
112
|
|
113
113
|
# @!attribute subtotal
|
114
|
-
# @return [Float] The summation of charges
|
114
|
+
# @return [Float] The summation of charges and credits, before discounts and taxes.
|
115
115
|
define_attribute :subtotal, Float
|
116
116
|
|
117
117
|
# @!attribute tax
|
@@ -11,12 +11,16 @@ module Recurly
|
|
11
11
|
define_attribute :ending_quantity, Integer
|
12
12
|
|
13
13
|
# @!attribute unit_amount
|
14
|
-
# @return [Float] Allows up to 2 decimal places. Optionally, override the tiers' default unit amount.
|
14
|
+
# @return [Float] Allows up to 2 decimal places. Optionally, override the tiers' default unit amount. If add-on's `add_on_type` is `usage` and `usage_type` is `percentage`, cannot be provided.
|
15
15
|
define_attribute :unit_amount, Float
|
16
16
|
|
17
17
|
# @!attribute unit_amount_decimal
|
18
|
-
# @return [String] Allows up to 9 decimal places. Optionally, override tiers' default unit amount. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
|
18
|
+
# @return [String] Allows up to 9 decimal places. Optionally, override tiers' default unit amount. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided. If add-on's `add_on_type` is `usage` and `usage_type` is `percentage`, cannot be provided.
|
19
19
|
define_attribute :unit_amount_decimal, String
|
20
|
+
|
21
|
+
# @!attribute usage_percentage
|
22
|
+
# @return [String] The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string. A value between 0.0 and 100.0. Optionally, override tiers' default usage percentage. Required if add-on's `add_on_type` is `usage` and `usage_type` is `percentage`. Must be omitted otherwise.
|
23
|
+
define_attribute :usage_percentage, String
|
20
24
|
end
|
21
25
|
end
|
22
26
|
end
|
@@ -18,6 +18,10 @@ module Recurly
|
|
18
18
|
# @return [Array[SubscriptionAddOn]] These add-ons will be used when the subscription renews.
|
19
19
|
define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOn }
|
20
20
|
|
21
|
+
# @!attribute billing_info
|
22
|
+
# @return [SubscriptionChangeBillingInfo] Accept nested attributes for three_d_secure_action_result_token_id
|
23
|
+
define_attribute :billing_info, :SubscriptionChangeBillingInfo
|
24
|
+
|
21
25
|
# @!attribute created_at
|
22
26
|
# @return [DateTime] Created at
|
23
27
|
define_attribute :created_at, DateTime
|
@@ -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 SubscriptionChangeBillingInfo < Resource
|
8
|
+
|
9
|
+
# @!attribute three_d_secure_action_result_token_id
|
10
|
+
# @return [String] A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge.
|
11
|
+
define_attribute :three_d_secure_action_result_token_id, String
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -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 Resources
|
7
|
+
class TaxDetail < Resource
|
8
|
+
|
9
|
+
# @!attribute rate
|
10
|
+
# @return [Float] Provides the tax rate for the region.
|
11
|
+
define_attribute :rate, Float
|
12
|
+
|
13
|
+
# @!attribute region
|
14
|
+
# @return [String] Provides the tax region applied on an invoice. For Canadian Sales Tax, this will be either the 2 letter province code or country code.
|
15
|
+
define_attribute :region, String
|
16
|
+
|
17
|
+
# @!attribute tax
|
18
|
+
# @return [Float] The total tax applied for this tax type.
|
19
|
+
define_attribute :tax, Float
|
20
|
+
|
21
|
+
# @!attribute type
|
22
|
+
# @return [String] Provides the tax type for the region. For Canadian Sales Tax, this will be GST, HST, QST or PST.
|
23
|
+
define_attribute :type, String
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -14,6 +14,10 @@ module Recurly
|
|
14
14
|
# @return [String] Provides the tax region applied on an invoice. For U.S. Sales Tax, this will be the 2 letter state code. For EU VAT this will be the 2 letter country code. For all country level tax types, this will display the regional tax, like VAT, GST, or PST.
|
15
15
|
define_attribute :region, String
|
16
16
|
|
17
|
+
# @!attribute tax_details
|
18
|
+
# @return [Array[TaxDetail]]
|
19
|
+
define_attribute :tax_details, Array, { :item_type => :TaxDetail }
|
20
|
+
|
17
21
|
# @!attribute type
|
18
22
|
# @return [String] Provides the tax type as "vat" for EU VAT, "usst" for U.S. Sales Tax, or the 2 letter country code for country level tax types like Canada, Australia, New Zealand, Israel, and all non-EU European countries.
|
19
23
|
define_attribute :type, String
|
@@ -11,8 +11,12 @@ module Recurly
|
|
11
11
|
define_attribute :currencies, Array, { :item_type => :TierPricing }
|
12
12
|
|
13
13
|
# @!attribute ending_quantity
|
14
|
-
# @return [Integer] Ending quantity
|
14
|
+
# @return [Integer] Ending quantity for the tier. This represents a unit amount for unit-priced add ons, but for percentage type usage add ons, represents the site default currency in its minimum divisible unit.
|
15
15
|
define_attribute :ending_quantity, Integer
|
16
|
+
|
17
|
+
# @!attribute usage_percentage
|
18
|
+
# @return [String] Decimal usage percentage.
|
19
|
+
define_attribute :usage_percentage, String
|
16
20
|
end
|
17
21
|
end
|
18
22
|
end
|
@@ -18,6 +18,10 @@ module Recurly
|
|
18
18
|
# @return [String] When processed, result from checking the overall AVS on the transaction.
|
19
19
|
define_attribute :avs_check, String
|
20
20
|
|
21
|
+
# @!attribute backup_payment_method_used
|
22
|
+
# @return [Boolean] Indicates if the transaction was completed using a backup payment
|
23
|
+
define_attribute :backup_payment_method_used, :Boolean
|
24
|
+
|
21
25
|
# @!attribute billing_address
|
22
26
|
# @return [AddressWithName]
|
23
27
|
define_attribute :billing_address, :AddressWithName
|
data/lib/recurly/version.rb
CHANGED
data/openapi/api.yaml
CHANGED
@@ -24,6 +24,42 @@ info:
|
|
24
24
|
Recurly-Version: recurly.v2021-02-25
|
25
25
|
```
|
26
26
|
|
27
|
+
Recurly's client libraries correspond with API versions as listed below.
|
28
|
+
|
29
|
+
<table>
|
30
|
+
<tr>
|
31
|
+
<th>API Version</th>
|
32
|
+
<th>Client Library Version</th>
|
33
|
+
</tr>
|
34
|
+
<tr>
|
35
|
+
<td>v2021-02-25</td>
|
36
|
+
<td>4.x</td>
|
37
|
+
</tr>
|
38
|
+
<tr>
|
39
|
+
<td>v2019-10-10</td>
|
40
|
+
<td>3.x</td>
|
41
|
+
</tr>
|
42
|
+
</table>
|
43
|
+
|
44
|
+
Client library releases:
|
45
|
+
|
46
|
+
* [Node.js](https://github.com/recurly/recurly-client-node/releases)
|
47
|
+
* [Python](https://github.com/recurly/recurly-client-python/releases)
|
48
|
+
* [.NET](https://github.com/recurly/recurly-client-dotnet/releases)
|
49
|
+
* [Ruby](https://github.com/recurly/recurly-client-ruby/releases)
|
50
|
+
* [Java](https://github.com/recurly/recurly-client-java/releases)
|
51
|
+
* [PHP](https://github.com/recurly/recurly-client-php/releases)
|
52
|
+
* [Go](https://github.com/recurly/recurly-client-go/releases)
|
53
|
+
|
54
|
+
Client libraries follow semantic versioning. For example, [Ruby client library
|
55
|
+
version 3.18.1](https://github.com/recurly/recurly-client-ruby/releases/tag/3.18.1)
|
56
|
+
represents major version `3`, minor version `18` with patch `1`.
|
57
|
+
|
58
|
+
We encourage you to update to the latest version of the API and corresponding client library,
|
59
|
+
as most recent versions are more performant than their predecessors. See the
|
60
|
+
[changelog](https://developers.recurly.com/api/changelog.html) for a comprehensive list of changes
|
61
|
+
introduced in the latest API version.
|
62
|
+
|
27
63
|
### Default Versions
|
28
64
|
Specifying a version is required to get a successful response. If you wish to
|
29
65
|
receive the latest version and are willing to accept the risk of breaking changes,
|
@@ -75,9 +111,11 @@ info:
|
|
75
111
|
developers and those who are familiar with API technology. When using the
|
76
112
|
API and passing error messages to target systems, be mindful that
|
77
113
|
these messages may not make sense in the context of the target system.
|
78
|
-
Please consider changing these messages in target system to be better
|
114
|
+
Please consider changing these messages in the target system to be better
|
79
115
|
suited to the audience of the system.
|
80
116
|
|
117
|
+
Please see [transaction error codes](https://developers.recurly.com/pages/api-transaction-errors.html) for more details.
|
118
|
+
|
81
119
|
## Pagination
|
82
120
|
### Response Schema
|
83
121
|
Every GET listing endpoint returns a response with the same schema:
|
@@ -154,6 +192,7 @@ x-tagGroups:
|
|
154
192
|
- note
|
155
193
|
- account_acquisition
|
156
194
|
- billing_info
|
195
|
+
- billing_infos
|
157
196
|
- subscription
|
158
197
|
- subscription_change
|
159
198
|
- shipping_address
|
@@ -224,9 +263,15 @@ tags:
|
|
224
263
|
to match this data with revenue and billing data events in Recurly.
|
225
264
|
- name: billing_info
|
226
265
|
x-displayName: Billing Info
|
227
|
-
description:
|
228
|
-
a credit
|
229
|
-
the customer upon purchase or when they update their
|
266
|
+
description: Without the premium Wallet feature, an account can only have one stored
|
267
|
+
payment method at a time. Examples include credit cards, PayPal, or bank accounts.
|
268
|
+
Billing info is filled out by the customer upon purchase or when they update their
|
269
|
+
information.
|
270
|
+
- name: billing_infos
|
271
|
+
x-displayName: Billing Infos
|
272
|
+
description: If the premium Wallet feature is enabled, an account can have multiple
|
273
|
+
payment methods stored. Examples include credit cards, PayPal, or bank accounts.
|
274
|
+
Primary or backup billing infos can be designated from these endpoints.
|
230
275
|
- name: subscription
|
231
276
|
x-displayName: Subscription
|
232
277
|
description: Subscriptions are created when your customers subscribe to one of your
|
@@ -511,7 +556,6 @@ paths:
|
|
511
556
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
512
557
|
to use pagination in the API and Client Libraries.
|
513
558
|
parameters:
|
514
|
-
- "$ref": "#/components/parameters/site_id"
|
515
559
|
- "$ref": "#/components/parameters/ids"
|
516
560
|
- "$ref": "#/components/parameters/limit"
|
517
561
|
- "$ref": "#/components/parameters/order"
|
@@ -614,8 +658,6 @@ paths:
|
|
614
658
|
- account
|
615
659
|
operationId: create_account
|
616
660
|
summary: Create an account
|
617
|
-
parameters:
|
618
|
-
- "$ref": "#/components/parameters/site_id"
|
619
661
|
requestBody:
|
620
662
|
content:
|
621
663
|
application/json:
|
@@ -863,7 +905,6 @@ paths:
|
|
863
905
|
%s\", account.Id)"
|
864
906
|
"/accounts/{account_id}":
|
865
907
|
parameters:
|
866
|
-
- "$ref": "#/components/parameters/site_id"
|
867
908
|
- "$ref": "#/components/parameters/account_id"
|
868
909
|
get:
|
869
910
|
tags:
|
@@ -1252,11 +1293,9 @@ paths:
|
|
1252
1293
|
Account: %s\", account.Id)"
|
1253
1294
|
"/accounts/{account_id}/acquisition":
|
1254
1295
|
parameters:
|
1255
|
-
- "$ref": "#/components/parameters/site_id"
|
1256
1296
|
- "$ref": "#/components/parameters/account_id"
|
1257
1297
|
get:
|
1258
1298
|
tags:
|
1259
|
-
- account
|
1260
1299
|
- account_acquisition
|
1261
1300
|
operationId: get_account_acquisition
|
1262
1301
|
summary: Fetch an account's acquisition data
|
@@ -1365,7 +1404,6 @@ paths:
|
|
1365
1404
|
Acquisition: %v\", accountAcq.Id)"
|
1366
1405
|
put:
|
1367
1406
|
tags:
|
1368
|
-
- account
|
1369
1407
|
- account_acquisition
|
1370
1408
|
operationId: update_account_acquisition
|
1371
1409
|
summary: Update an account's acquisition data
|
@@ -1533,7 +1571,6 @@ paths:
|
|
1533
1571
|
Acquisition: %s\", account.Id)"
|
1534
1572
|
delete:
|
1535
1573
|
tags:
|
1536
|
-
- account
|
1537
1574
|
- account_acquisition
|
1538
1575
|
operationId: remove_account_acquisition
|
1539
1576
|
summary: Remove an account's acquisition data
|
@@ -1635,7 +1672,6 @@ paths:
|
|
1635
1672
|
Acquisition: %s\", accountAcquisition.Id)"
|
1636
1673
|
"/accounts/{account_id}/reactivate":
|
1637
1674
|
parameters:
|
1638
|
-
- "$ref": "#/components/parameters/site_id"
|
1639
1675
|
- "$ref": "#/components/parameters/account_id"
|
1640
1676
|
put:
|
1641
1677
|
tags:
|
@@ -1759,7 +1795,6 @@ paths:
|
|
1759
1795
|
Account: %s\", account.Id)"
|
1760
1796
|
"/accounts/{account_id}/balance":
|
1761
1797
|
parameters:
|
1762
|
-
- "$ref": "#/components/parameters/site_id"
|
1763
1798
|
- "$ref": "#/components/parameters/account_id"
|
1764
1799
|
get:
|
1765
1800
|
tags:
|
@@ -1877,12 +1912,10 @@ paths:
|
|
1877
1912
|
"/accounts/{account_id}/billing_info":
|
1878
1913
|
get:
|
1879
1914
|
tags:
|
1880
|
-
- account
|
1881
1915
|
- billing_info
|
1882
1916
|
operationId: get_billing_info
|
1883
1917
|
summary: Fetch an account's billing information
|
1884
1918
|
parameters:
|
1885
|
-
- "$ref": "#/components/parameters/site_id"
|
1886
1919
|
- "$ref": "#/components/parameters/account_id"
|
1887
1920
|
responses:
|
1888
1921
|
'200':
|
@@ -1995,14 +2028,13 @@ paths:
|
|
1995
2028
|
Info: %v\", billingInfo)"
|
1996
2029
|
put:
|
1997
2030
|
tags:
|
1998
|
-
- account
|
1999
2031
|
- billing_info
|
2000
2032
|
operationId: update_billing_info
|
2001
2033
|
summary: Set an account's billing information
|
2002
2034
|
description: |
|
2003
2035
|
If you're using Recurly.js to securely submit data from webforms without sending it through your server,
|
2004
2036
|
you can associate the billing information with an account by passing in the `token_id`. The only other
|
2005
|
-
|
2037
|
+
fields permitted with `token_id` are `primary_payment_method` and/or `backup_payment_method`.
|
2006
2038
|
|
2007
2039
|
For credit card payments you'll need the following required fields:
|
2008
2040
|
|
@@ -2019,7 +2051,6 @@ paths:
|
|
2019
2051
|
- gateway_token
|
2020
2052
|
- gateway_code
|
2021
2053
|
parameters:
|
2022
|
-
- "$ref": "#/components/parameters/site_id"
|
2023
2054
|
- "$ref": "#/components/parameters/account_id"
|
2024
2055
|
requestBody:
|
2025
2056
|
content:
|
@@ -2170,12 +2201,10 @@ paths:
|
|
2170
2201
|
Info: %s\", billingInfo)"
|
2171
2202
|
delete:
|
2172
2203
|
tags:
|
2173
|
-
- account
|
2174
2204
|
- billing_info
|
2175
2205
|
operationId: remove_billing_info
|
2176
2206
|
summary: Remove an account's billing information
|
2177
2207
|
parameters:
|
2178
|
-
- "$ref": "#/components/parameters/site_id"
|
2179
2208
|
- "$ref": "#/components/parameters/account_id"
|
2180
2209
|
description: You may remove any stored billing information for an account. If
|
2181
2210
|
the account has a subscription, the renewal will go into dunning unless the
|
@@ -2277,17 +2306,146 @@ paths:
|
|
2277
2306
|
{\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected
|
2278
2307
|
Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfmt.Printf(\"Removed Billing
|
2279
2308
|
Info: %v\", billingInfo)"
|
2309
|
+
"/accounts/{account_id}/billing_info/verify":
|
2310
|
+
post:
|
2311
|
+
tags:
|
2312
|
+
- billing_info
|
2313
|
+
operationId: verify_billing_info
|
2314
|
+
summary: Verify an account's credit card billing information
|
2315
|
+
parameters:
|
2316
|
+
- "$ref": "#/components/parameters/account_id"
|
2317
|
+
requestBody:
|
2318
|
+
content:
|
2319
|
+
application/json:
|
2320
|
+
schema:
|
2321
|
+
"$ref": "#/components/schemas/BillingInfoVerify"
|
2322
|
+
required: false
|
2323
|
+
responses:
|
2324
|
+
'200':
|
2325
|
+
description: Transaction information from verify.
|
2326
|
+
content:
|
2327
|
+
application/json:
|
2328
|
+
schema:
|
2329
|
+
"$ref": "#/components/schemas/Transaction"
|
2330
|
+
'404':
|
2331
|
+
description: Account has no billing information, or incorrect site or account
|
2332
|
+
ID.
|
2333
|
+
content:
|
2334
|
+
application/json:
|
2335
|
+
schema:
|
2336
|
+
"$ref": "#/components/schemas/Error"
|
2337
|
+
default:
|
2338
|
+
description: Unexpected error.
|
2339
|
+
content:
|
2340
|
+
application/json:
|
2341
|
+
schema:
|
2342
|
+
"$ref": "#/components/schemas/Error"
|
2343
|
+
'422':
|
2344
|
+
description: Invalid billing information, or error running the verification
|
2345
|
+
transaction.
|
2346
|
+
content:
|
2347
|
+
application/json:
|
2348
|
+
schema:
|
2349
|
+
"$ref": "#/components/schemas/ErrorMayHaveTransaction"
|
2350
|
+
x-code-samples:
|
2351
|
+
- lang: Node.js
|
2352
|
+
source: |
|
2353
|
+
try {
|
2354
|
+
const transaction = await client.verifyBillingInfo(accountId)
|
2355
|
+
console.log('Fetched Transaction: ', transaction.id)
|
2356
|
+
} catch (err) {
|
2357
|
+
if (err instanceof recurly.errors.NotFoundError) {
|
2358
|
+
// If the request was not found, you may want to alert the user or
|
2359
|
+
// just return null
|
2360
|
+
console.log('Resource Not Found')
|
2361
|
+
} else {
|
2362
|
+
// If we don't know what to do with the err, we should
|
2363
|
+
// probably re-raise and let our web framework and logger handle it
|
2364
|
+
console.log('Unknown Error: ', err)
|
2365
|
+
}
|
2366
|
+
}
|
2367
|
+
- lang: Python
|
2368
|
+
source: |
|
2369
|
+
try:
|
2370
|
+
transaction = client.verify_billing_info(account_id)
|
2371
|
+
print("Got Transaction %s" % transaction)
|
2372
|
+
except recurly.errors.NotFoundError:
|
2373
|
+
# If the resource was not found, you may want to alert the user or
|
2374
|
+
# just return nil
|
2375
|
+
print("Resource Not Found")
|
2376
|
+
- lang: ".NET"
|
2377
|
+
source: |
|
2378
|
+
try
|
2379
|
+
{
|
2380
|
+
Transaction transaction = client.VerifyBillingInfo(accountId);
|
2381
|
+
Console.WriteLine($"Fetched transaction {transaction.Id}");
|
2382
|
+
}
|
2383
|
+
catch (Recurly.Errors.NotFound ex)
|
2384
|
+
{
|
2385
|
+
// If the resource was not found
|
2386
|
+
// we may want to alert the user or just return null
|
2387
|
+
Console.WriteLine($"Resource Not Found: {ex.Error.Message}");
|
2388
|
+
}
|
2389
|
+
catch (Recurly.Errors.ApiError ex)
|
2390
|
+
{
|
2391
|
+
// Use ApiError to catch a generic error from the API
|
2392
|
+
Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}");
|
2393
|
+
}
|
2394
|
+
- lang: Ruby
|
2395
|
+
source: |
|
2396
|
+
begin
|
2397
|
+
transaction = @client.verify_billing_info(account_id: account_id)
|
2398
|
+
puts "Got Transaction #{transaction}"
|
2399
|
+
rescue Recurly::Errors::NotFoundError
|
2400
|
+
# If the resource was not found, you may want to alert the user or
|
2401
|
+
# just return nil
|
2402
|
+
puts "Resource Not Found"
|
2403
|
+
end
|
2404
|
+
- lang: Java
|
2405
|
+
source: |
|
2406
|
+
try {
|
2407
|
+
final Transaction transaction = client.verifyBillingInfo(accountId);
|
2408
|
+
System.out.println("Fetched transaction " + transaction.getId());
|
2409
|
+
} catch (NotFoundException e) {
|
2410
|
+
// If the resource was not found
|
2411
|
+
// we may want to alert the user or just return null
|
2412
|
+
System.out.println("Resource Not Found: " + e.getError().getMessage());
|
2413
|
+
} catch (ApiException e) {
|
2414
|
+
// Use ApiException to catch a generic error from the API
|
2415
|
+
System.out.println("Unexpected Recurly Error: " + e.getError().getMessage());
|
2416
|
+
}
|
2417
|
+
- lang: PHP
|
2418
|
+
source: |
|
2419
|
+
try {
|
2420
|
+
$transaction = $client->verifyBillingInfo($account_id);
|
2421
|
+
|
2422
|
+
echo 'Got Transaction:' . PHP_EOL;
|
2423
|
+
var_dump($transaction);
|
2424
|
+
} catch (\Recurly\Errors\NotFound $e) {
|
2425
|
+
// Could not find the resource, you may want to inform the user
|
2426
|
+
// or just return a NULL
|
2427
|
+
echo 'Could not find resource.' . PHP_EOL;
|
2428
|
+
var_dump($e);
|
2429
|
+
} catch (\Recurly\RecurlyError $e) {
|
2430
|
+
// Something bad happened... tell the user so that they can fix it?
|
2431
|
+
echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL;
|
2432
|
+
}
|
2433
|
+
- lang: Go
|
2434
|
+
source: "verifyBillingInfoParams := &recurly.VerifyBillingInfoParams{}\ntransaction,
|
2435
|
+
err := client.VerifyBillingInfo(accountID, verifyBillingInfoParams)\nif
|
2436
|
+
e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeNotFound
|
2437
|
+
{\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected
|
2438
|
+
Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfmt.Printf(\"Fetched Transaction:
|
2439
|
+
%v\", transaction)"
|
2280
2440
|
"/accounts/{account_id}/billing_infos":
|
2281
2441
|
get:
|
2282
2442
|
tags:
|
2283
|
-
-
|
2284
|
-
- billing_info
|
2443
|
+
- billing_infos
|
2285
2444
|
operationId: list_billing_infos
|
2286
2445
|
summary: Get the list of billing information associated with an account
|
2287
2446
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
2288
2447
|
to use pagination in the API and Client Libraries.
|
2289
2448
|
parameters:
|
2290
|
-
- "$ref": "#/components/parameters/site_id"
|
2291
2449
|
- "$ref": "#/components/parameters/account_id"
|
2292
2450
|
- "$ref": "#/components/parameters/ids"
|
2293
2451
|
- "$ref": "#/components/parameters/sort_dates"
|
@@ -2315,14 +2473,13 @@ paths:
|
|
2315
2473
|
x-code-samples: []
|
2316
2474
|
post:
|
2317
2475
|
tags:
|
2318
|
-
-
|
2319
|
-
- billing_info
|
2476
|
+
- billing_infos
|
2320
2477
|
operationId: create_billing_info
|
2321
|
-
summary:
|
2478
|
+
summary: Add new billing information on an account
|
2322
2479
|
description: |
|
2323
2480
|
If you're using Recurly.js to securely submit data from webforms without sending it through your server,
|
2324
2481
|
you can associate the billing information with an account by passing in the `token_id`. The only other
|
2325
|
-
|
2482
|
+
fields permitted with `token_id` are `primary_payment_method` and/or `backup_payment_method`.
|
2326
2483
|
|
2327
2484
|
For credit card payments you'll need the following required fields:
|
2328
2485
|
|
@@ -2339,7 +2496,6 @@ paths:
|
|
2339
2496
|
- gateway_token
|
2340
2497
|
- gateway_code
|
2341
2498
|
parameters:
|
2342
|
-
- "$ref": "#/components/parameters/site_id"
|
2343
2499
|
- "$ref": "#/components/parameters/account_id"
|
2344
2500
|
requestBody:
|
2345
2501
|
content:
|
@@ -2377,12 +2533,10 @@ paths:
|
|
2377
2533
|
"/accounts/{account_id}/billing_infos/{billing_info_id}":
|
2378
2534
|
get:
|
2379
2535
|
tags:
|
2380
|
-
-
|
2381
|
-
- billing_info
|
2536
|
+
- billing_infos
|
2382
2537
|
operationId: get_a_billing_info
|
2383
2538
|
summary: Fetch a billing info
|
2384
2539
|
parameters:
|
2385
|
-
- "$ref": "#/components/parameters/site_id"
|
2386
2540
|
- "$ref": "#/components/parameters/account_id"
|
2387
2541
|
- "$ref": "#/components/parameters/billing_info_id"
|
2388
2542
|
responses:
|
@@ -2401,14 +2555,13 @@ paths:
|
|
2401
2555
|
x-code-samples: []
|
2402
2556
|
put:
|
2403
2557
|
tags:
|
2404
|
-
-
|
2405
|
-
- billing_info
|
2558
|
+
- billing_infos
|
2406
2559
|
operationId: update_a_billing_info
|
2407
2560
|
summary: Update an account's billing information
|
2408
2561
|
description: |
|
2409
2562
|
If you're using Recurly.js to securely submit data from webforms without sending it through your server,
|
2410
2563
|
you can associate the billing information with an account by passing in the `token_id`. The only other
|
2411
|
-
|
2564
|
+
fields permitted with `token_id` are `primary_payment_method` and/or `backup_payment_method`.
|
2412
2565
|
|
2413
2566
|
For credit card payments you'll need the following required fields:
|
2414
2567
|
|
@@ -2425,7 +2578,6 @@ paths:
|
|
2425
2578
|
- gateway_token
|
2426
2579
|
- gateway_code
|
2427
2580
|
parameters:
|
2428
|
-
- "$ref": "#/components/parameters/site_id"
|
2429
2581
|
- "$ref": "#/components/parameters/account_id"
|
2430
2582
|
- "$ref": "#/components/parameters/billing_info_id"
|
2431
2583
|
requestBody:
|
@@ -2463,12 +2615,10 @@ paths:
|
|
2463
2615
|
x-code-samples: []
|
2464
2616
|
delete:
|
2465
2617
|
tags:
|
2466
|
-
-
|
2467
|
-
- billing_info
|
2618
|
+
- billing_infos
|
2468
2619
|
operationId: remove_a_billing_info
|
2469
2620
|
summary: Remove an account's billing information
|
2470
2621
|
parameters:
|
2471
|
-
- "$ref": "#/components/parameters/site_id"
|
2472
2622
|
- "$ref": "#/components/parameters/account_id"
|
2473
2623
|
- "$ref": "#/components/parameters/billing_info_id"
|
2474
2624
|
description: You may remove any stored billing information for an account. If
|
@@ -2495,14 +2645,12 @@ paths:
|
|
2495
2645
|
"/accounts/{account_id}/coupon_redemptions":
|
2496
2646
|
get:
|
2497
2647
|
tags:
|
2498
|
-
- account
|
2499
2648
|
- coupon_redemption
|
2500
2649
|
operationId: list_account_coupon_redemptions
|
2501
2650
|
summary: Show the coupon redemptions for an account
|
2502
2651
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
2503
2652
|
to use pagination in the API and Client Libraries.
|
2504
2653
|
parameters:
|
2505
|
-
- "$ref": "#/components/parameters/site_id"
|
2506
2654
|
- "$ref": "#/components/parameters/account_id"
|
2507
2655
|
- "$ref": "#/components/parameters/ids"
|
2508
2656
|
- "$ref": "#/components/parameters/sort_dates"
|
@@ -2594,14 +2742,12 @@ paths:
|
|
2594
2742
|
"/accounts/{account_id}/coupon_redemptions/active":
|
2595
2743
|
get:
|
2596
2744
|
tags:
|
2597
|
-
- account
|
2598
2745
|
- coupon_redemption
|
2599
2746
|
operationId: list_active_coupon_redemptions
|
2600
2747
|
summary: Show the coupon redemptions that are active on an account
|
2601
2748
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
2602
2749
|
to use pagination in the API and Client Libraries.
|
2603
2750
|
parameters:
|
2604
|
-
- "$ref": "#/components/parameters/site_id"
|
2605
2751
|
- "$ref": "#/components/parameters/account_id"
|
2606
2752
|
responses:
|
2607
2753
|
'200':
|
@@ -2680,12 +2826,10 @@ paths:
|
|
2680
2826
|
}
|
2681
2827
|
post:
|
2682
2828
|
tags:
|
2683
|
-
- account
|
2684
2829
|
- coupon_redemption
|
2685
2830
|
operationId: create_coupon_redemption
|
2686
2831
|
summary: Generate an active coupon redemption on an account or subscription
|
2687
2832
|
parameters:
|
2688
|
-
- "$ref": "#/components/parameters/site_id"
|
2689
2833
|
- "$ref": "#/components/parameters/account_id"
|
2690
2834
|
requestBody:
|
2691
2835
|
content:
|
@@ -2812,12 +2956,10 @@ paths:
|
|
2812
2956
|
Redemption: %v\", couponRedemption)"
|
2813
2957
|
delete:
|
2814
2958
|
tags:
|
2815
|
-
- account
|
2816
2959
|
- coupon_redemption
|
2817
2960
|
operationId: remove_coupon_redemption
|
2818
2961
|
summary: Delete the active coupon redemption from an account
|
2819
2962
|
parameters:
|
2820
|
-
- "$ref": "#/components/parameters/site_id"
|
2821
2963
|
- "$ref": "#/components/parameters/account_id"
|
2822
2964
|
responses:
|
2823
2965
|
'200':
|
@@ -2928,14 +3070,12 @@ paths:
|
|
2928
3070
|
"/accounts/{account_id}/credit_payments":
|
2929
3071
|
get:
|
2930
3072
|
tags:
|
2931
|
-
- account
|
2932
3073
|
- credit_payment
|
2933
3074
|
operationId: list_account_credit_payments
|
2934
3075
|
summary: List an account's credit payments
|
2935
3076
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
2936
3077
|
to use pagination in the API and Client Libraries.
|
2937
3078
|
parameters:
|
2938
|
-
- "$ref": "#/components/parameters/site_id"
|
2939
3079
|
- "$ref": "#/components/parameters/account_id"
|
2940
3080
|
- "$ref": "#/components/parameters/limit"
|
2941
3081
|
- "$ref": "#/components/parameters/order"
|
@@ -3038,13 +3178,11 @@ paths:
|
|
3038
3178
|
get:
|
3039
3179
|
tags:
|
3040
3180
|
- invoice
|
3041
|
-
- account
|
3042
3181
|
operationId: list_account_invoices
|
3043
3182
|
summary: List an account's invoices
|
3044
3183
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
3045
3184
|
to use pagination in the API and Client Libraries.
|
3046
3185
|
parameters:
|
3047
|
-
- "$ref": "#/components/parameters/site_id"
|
3048
3186
|
- "$ref": "#/components/parameters/account_id"
|
3049
3187
|
- "$ref": "#/components/parameters/ids"
|
3050
3188
|
- "$ref": "#/components/parameters/limit"
|
@@ -3143,11 +3281,9 @@ paths:
|
|
3143
3281
|
post:
|
3144
3282
|
tags:
|
3145
3283
|
- invoice
|
3146
|
-
- account
|
3147
3284
|
operationId: create_invoice
|
3148
3285
|
summary: Create an invoice for pending line items
|
3149
3286
|
parameters:
|
3150
|
-
- "$ref": "#/components/parameters/site_id"
|
3151
3287
|
- "$ref": "#/components/parameters/account_id"
|
3152
3288
|
requestBody:
|
3153
3289
|
content:
|
@@ -3315,11 +3451,9 @@ paths:
|
|
3315
3451
|
post:
|
3316
3452
|
tags:
|
3317
3453
|
- invoice
|
3318
|
-
- account
|
3319
3454
|
operationId: preview_invoice
|
3320
3455
|
summary: Preview new invoice for pending line items
|
3321
3456
|
parameters:
|
3322
|
-
- "$ref": "#/components/parameters/site_id"
|
3323
3457
|
- "$ref": "#/components/parameters/account_id"
|
3324
3458
|
requestBody:
|
3325
3459
|
content:
|
@@ -3485,14 +3619,12 @@ paths:
|
|
3485
3619
|
"/accounts/{account_id}/line_items":
|
3486
3620
|
get:
|
3487
3621
|
tags:
|
3488
|
-
- account
|
3489
3622
|
- line_item
|
3490
3623
|
operationId: list_account_line_items
|
3491
3624
|
summary: List an account's line items
|
3492
3625
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
3493
3626
|
to use pagination in the API and Client Libraries.
|
3494
3627
|
parameters:
|
3495
|
-
- "$ref": "#/components/parameters/site_id"
|
3496
3628
|
- "$ref": "#/components/parameters/account_id"
|
3497
3629
|
- "$ref": "#/components/parameters/ids"
|
3498
3630
|
- "$ref": "#/components/parameters/limit"
|
@@ -3593,12 +3725,10 @@ paths:
|
|
3593
3725
|
Line Item %3d: %s\\n\",\n\t\t\ti,\n\t\t\tlineItem.Id,\n\t\t)\n\t}\n}"
|
3594
3726
|
post:
|
3595
3727
|
tags:
|
3596
|
-
- account
|
3597
3728
|
- line_item
|
3598
3729
|
operationId: create_line_item
|
3599
3730
|
summary: Create a new line item for the account
|
3600
3731
|
parameters:
|
3601
|
-
- "$ref": "#/components/parameters/site_id"
|
3602
3732
|
- "$ref": "#/components/parameters/account_id"
|
3603
3733
|
requestBody:
|
3604
3734
|
content:
|
@@ -3763,14 +3893,12 @@ paths:
|
|
3763
3893
|
"/accounts/{account_id}/notes":
|
3764
3894
|
get:
|
3765
3895
|
tags:
|
3766
|
-
- account
|
3767
3896
|
- note
|
3768
3897
|
operationId: list_account_notes
|
3769
3898
|
summary: Fetch a list of an account's notes
|
3770
3899
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
3771
3900
|
to use pagination in the API and Client Libraries.
|
3772
3901
|
parameters:
|
3773
|
-
- "$ref": "#/components/parameters/site_id"
|
3774
3902
|
- "$ref": "#/components/parameters/account_id"
|
3775
3903
|
- "$ref": "#/components/parameters/ids"
|
3776
3904
|
responses:
|
@@ -3853,12 +3981,10 @@ paths:
|
|
3853
3981
|
"/accounts/{account_id}/notes/{account_note_id}":
|
3854
3982
|
get:
|
3855
3983
|
tags:
|
3856
|
-
- account
|
3857
3984
|
- note
|
3858
3985
|
operationId: get_account_note
|
3859
3986
|
summary: Fetch an account note
|
3860
3987
|
parameters:
|
3861
|
-
- "$ref": "#/components/parameters/site_id"
|
3862
3988
|
- "$ref": "#/components/parameters/account_id"
|
3863
3989
|
- name: account_note_id
|
3864
3990
|
in: path
|
@@ -3981,14 +4107,12 @@ paths:
|
|
3981
4107
|
"/accounts/{account_id}/shipping_addresses":
|
3982
4108
|
get:
|
3983
4109
|
tags:
|
3984
|
-
- account
|
3985
4110
|
- shipping_address
|
3986
4111
|
operationId: list_shipping_addresses
|
3987
4112
|
summary: Fetch a list of an account's shipping addresses
|
3988
4113
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
3989
4114
|
to use pagination in the API and Client Libraries.
|
3990
4115
|
parameters:
|
3991
|
-
- "$ref": "#/components/parameters/site_id"
|
3992
4116
|
- "$ref": "#/components/parameters/account_id"
|
3993
4117
|
- "$ref": "#/components/parameters/ids"
|
3994
4118
|
- "$ref": "#/components/parameters/limit"
|
@@ -4079,12 +4203,10 @@ paths:
|
|
4079
4203
|
Address %3d: %s, %s\\n\",\n\t\t\ti,\n\t\t\tshippingAddress.Id,\n\t\t\tshippingAddress.Street1,\n\t\t)\n\t}\n}"
|
4080
4204
|
post:
|
4081
4205
|
tags:
|
4082
|
-
- account
|
4083
4206
|
- shipping_address
|
4084
4207
|
operationId: create_shipping_address
|
4085
4208
|
summary: Create a new shipping address for the account
|
4086
4209
|
parameters:
|
4087
|
-
- "$ref": "#/components/parameters/site_id"
|
4088
4210
|
- "$ref": "#/components/parameters/account_id"
|
4089
4211
|
requestBody:
|
4090
4212
|
content:
|
@@ -4270,12 +4392,10 @@ paths:
|
|
4270
4392
|
"/accounts/{account_id}/shipping_addresses/{shipping_address_id}":
|
4271
4393
|
get:
|
4272
4394
|
tags:
|
4273
|
-
- account
|
4274
4395
|
- shipping_address
|
4275
4396
|
operationId: get_shipping_address
|
4276
4397
|
summary: Fetch an account's shipping address
|
4277
4398
|
parameters:
|
4278
|
-
- "$ref": "#/components/parameters/site_id"
|
4279
4399
|
- "$ref": "#/components/parameters/account_id"
|
4280
4400
|
- "$ref": "#/components/parameters/shipping_address_id"
|
4281
4401
|
responses:
|
@@ -4391,12 +4511,10 @@ paths:
|
|
4391
4511
|
Address: %v\", shippingAddress)"
|
4392
4512
|
put:
|
4393
4513
|
tags:
|
4394
|
-
- account
|
4395
4514
|
- shipping_address
|
4396
4515
|
operationId: update_shipping_address
|
4397
4516
|
summary: Update an account's shipping address
|
4398
4517
|
parameters:
|
4399
|
-
- "$ref": "#/components/parameters/site_id"
|
4400
4518
|
- "$ref": "#/components/parameters/account_id"
|
4401
4519
|
- "$ref": "#/components/parameters/shipping_address_id"
|
4402
4520
|
requestBody:
|
@@ -4563,12 +4681,10 @@ paths:
|
|
4563
4681
|
shippingAddress)"
|
4564
4682
|
delete:
|
4565
4683
|
tags:
|
4566
|
-
- account
|
4567
4684
|
- shipping_address
|
4568
4685
|
operationId: remove_shipping_address
|
4569
4686
|
summary: Remove an account's shipping address
|
4570
4687
|
parameters:
|
4571
|
-
- "$ref": "#/components/parameters/site_id"
|
4572
4688
|
- "$ref": "#/components/parameters/account_id"
|
4573
4689
|
- "$ref": "#/components/parameters/shipping_address_id"
|
4574
4690
|
responses:
|
@@ -4674,13 +4790,11 @@ paths:
|
|
4674
4790
|
get:
|
4675
4791
|
tags:
|
4676
4792
|
- subscription
|
4677
|
-
- account
|
4678
4793
|
operationId: list_account_subscriptions
|
4679
4794
|
summary: List an account's subscriptions
|
4680
4795
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
4681
4796
|
to use pagination in the API and Client Libraries.
|
4682
4797
|
parameters:
|
4683
|
-
- "$ref": "#/components/parameters/site_id"
|
4684
4798
|
- "$ref": "#/components/parameters/account_id"
|
4685
4799
|
- "$ref": "#/components/parameters/ids"
|
4686
4800
|
- "$ref": "#/components/parameters/limit"
|
@@ -4779,14 +4893,12 @@ paths:
|
|
4779
4893
|
"/accounts/{account_id}/transactions":
|
4780
4894
|
get:
|
4781
4895
|
tags:
|
4782
|
-
- account
|
4783
4896
|
- transaction
|
4784
4897
|
operationId: list_account_transactions
|
4785
4898
|
summary: List an account's transactions
|
4786
4899
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
4787
4900
|
to use pagination in the API and Client Libraries.
|
4788
4901
|
parameters:
|
4789
|
-
- "$ref": "#/components/parameters/site_id"
|
4790
4902
|
- "$ref": "#/components/parameters/account_id"
|
4791
4903
|
- "$ref": "#/components/parameters/ids"
|
4792
4904
|
- "$ref": "#/components/parameters/limit"
|
@@ -4893,7 +5005,6 @@ paths:
|
|
4893
5005
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
4894
5006
|
to use pagination in the API and Client Libraries.
|
4895
5007
|
parameters:
|
4896
|
-
- "$ref": "#/components/parameters/site_id"
|
4897
5008
|
- "$ref": "#/components/parameters/account_id"
|
4898
5009
|
- "$ref": "#/components/parameters/ids"
|
4899
5010
|
- "$ref": "#/components/parameters/limit"
|
@@ -4977,7 +5088,6 @@ paths:
|
|
4977
5088
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
4978
5089
|
to use pagination in the API and Client Libraries.
|
4979
5090
|
parameters:
|
4980
|
-
- "$ref": "#/components/parameters/site_id"
|
4981
5091
|
- "$ref": "#/components/parameters/ids"
|
4982
5092
|
- "$ref": "#/components/parameters/limit"
|
4983
5093
|
- "$ref": "#/components/parameters/order"
|
@@ -5077,7 +5187,6 @@ paths:
|
|
5077
5187
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
5078
5188
|
to use pagination in the API and Client Libraries.
|
5079
5189
|
parameters:
|
5080
|
-
- "$ref": "#/components/parameters/site_id"
|
5081
5190
|
- "$ref": "#/components/parameters/ids"
|
5082
5191
|
- "$ref": "#/components/parameters/limit"
|
5083
5192
|
- "$ref": "#/components/parameters/order"
|
@@ -5177,8 +5286,6 @@ paths:
|
|
5177
5286
|
- coupon
|
5178
5287
|
operationId: create_coupon
|
5179
5288
|
summary: Create a new coupon
|
5180
|
-
parameters:
|
5181
|
-
- "$ref": "#/components/parameters/site_id"
|
5182
5289
|
requestBody:
|
5183
5290
|
content:
|
5184
5291
|
application/json:
|
@@ -5378,7 +5485,6 @@ paths:
|
|
5378
5485
|
operationId: get_coupon
|
5379
5486
|
summary: Fetch a coupon
|
5380
5487
|
parameters:
|
5381
|
-
- "$ref": "#/components/parameters/site_id"
|
5382
5488
|
- "$ref": "#/components/parameters/coupon_id"
|
5383
5489
|
responses:
|
5384
5490
|
'200':
|
@@ -5494,7 +5600,6 @@ paths:
|
|
5494
5600
|
operationId: update_coupon
|
5495
5601
|
summary: Update an active coupon
|
5496
5602
|
parameters:
|
5497
|
-
- "$ref": "#/components/parameters/site_id"
|
5498
5603
|
- "$ref": "#/components/parameters/coupon_id"
|
5499
5604
|
requestBody:
|
5500
5605
|
content:
|
@@ -5648,7 +5753,6 @@ paths:
|
|
5648
5753
|
operationId: deactivate_coupon
|
5649
5754
|
summary: Expire a coupon
|
5650
5755
|
parameters:
|
5651
|
-
- "$ref": "#/components/parameters/site_id"
|
5652
5756
|
- "$ref": "#/components/parameters/coupon_id"
|
5653
5757
|
description: Mark an existing Coupon as expired
|
5654
5758
|
responses:
|
@@ -5750,12 +5854,10 @@ paths:
|
|
5750
5854
|
"/coupons/{coupon_id}/generate":
|
5751
5855
|
post:
|
5752
5856
|
tags:
|
5753
|
-
- coupon
|
5754
5857
|
- unique_coupon_code
|
5755
5858
|
operationId: generate_unique_coupon_codes
|
5756
5859
|
summary: Generate unique coupon codes
|
5757
5860
|
parameters:
|
5758
|
-
- "$ref": "#/components/parameters/site_id"
|
5759
5861
|
- "$ref": "#/components/parameters/coupon_id"
|
5760
5862
|
requestBody:
|
5761
5863
|
content:
|
@@ -5801,7 +5903,6 @@ paths:
|
|
5801
5903
|
description: Make an expired coupon redeemable again. You can change editable
|
5802
5904
|
fields in this call.
|
5803
5905
|
parameters:
|
5804
|
-
- "$ref": "#/components/parameters/site_id"
|
5805
5906
|
- "$ref": "#/components/parameters/coupon_id"
|
5806
5907
|
requestBody:
|
5807
5908
|
content:
|
@@ -5844,14 +5945,12 @@ paths:
|
|
5844
5945
|
"/coupons/{coupon_id}/unique_coupon_codes":
|
5845
5946
|
get:
|
5846
5947
|
tags:
|
5847
|
-
- coupon
|
5848
5948
|
- unique_coupon_code
|
5849
5949
|
operationId: list_unique_coupon_codes
|
5850
5950
|
summary: List unique coupon codes associated with a bulk coupon
|
5851
5951
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
5852
5952
|
to use pagination in the API and Client Libraries.
|
5853
5953
|
parameters:
|
5854
|
-
- "$ref": "#/components/parameters/site_id"
|
5855
5954
|
- "$ref": "#/components/parameters/coupon_id"
|
5856
5955
|
- "$ref": "#/components/parameters/ids"
|
5857
5956
|
- "$ref": "#/components/parameters/limit"
|
@@ -5888,7 +5987,6 @@ paths:
|
|
5888
5987
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
5889
5988
|
to use pagination in the API and Client Libraries.
|
5890
5989
|
parameters:
|
5891
|
-
- "$ref": "#/components/parameters/site_id"
|
5892
5990
|
- "$ref": "#/components/parameters/limit"
|
5893
5991
|
- "$ref": "#/components/parameters/order"
|
5894
5992
|
- "$ref": "#/components/parameters/sort_dates"
|
@@ -5989,7 +6087,6 @@ paths:
|
|
5989
6087
|
operationId: get_credit_payment
|
5990
6088
|
summary: Fetch a credit payment
|
5991
6089
|
parameters:
|
5992
|
-
- "$ref": "#/components/parameters/site_id"
|
5993
6090
|
- "$ref": "#/components/parameters/credit_payment_id"
|
5994
6091
|
responses:
|
5995
6092
|
'200':
|
@@ -6020,7 +6117,6 @@ paths:
|
|
6020
6117
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
6021
6118
|
to use pagination in the API and Client Libraries.
|
6022
6119
|
parameters:
|
6023
|
-
- "$ref": "#/components/parameters/site_id"
|
6024
6120
|
- "$ref": "#/components/parameters/ids"
|
6025
6121
|
- "$ref": "#/components/parameters/limit"
|
6026
6122
|
- "$ref": "#/components/parameters/order"
|
@@ -6128,7 +6224,6 @@ paths:
|
|
6128
6224
|
operationId: get_custom_field_definition
|
6129
6225
|
summary: Fetch an custom field definition
|
6130
6226
|
parameters:
|
6131
|
-
- "$ref": "#/components/parameters/site_id"
|
6132
6227
|
- "$ref": "#/components/parameters/custom_field_definition_id"
|
6133
6228
|
responses:
|
6134
6229
|
'200':
|
@@ -6247,7 +6342,6 @@ paths:
|
|
6247
6342
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
6248
6343
|
to use pagination in the API and Client Libraries.
|
6249
6344
|
parameters:
|
6250
|
-
- "$ref": "#/components/parameters/site_id"
|
6251
6345
|
- "$ref": "#/components/parameters/ids"
|
6252
6346
|
- "$ref": "#/components/parameters/limit"
|
6253
6347
|
- "$ref": "#/components/parameters/order"
|
@@ -6348,8 +6442,6 @@ paths:
|
|
6348
6442
|
- item
|
6349
6443
|
operationId: create_item
|
6350
6444
|
summary: Create a new item
|
6351
|
-
parameters:
|
6352
|
-
- "$ref": "#/components/parameters/site_id"
|
6353
6445
|
requestBody:
|
6354
6446
|
content:
|
6355
6447
|
application/json:
|
@@ -6562,7 +6654,6 @@ paths:
|
|
6562
6654
|
operationId: get_item
|
6563
6655
|
summary: Fetch an item
|
6564
6656
|
parameters:
|
6565
|
-
- "$ref": "#/components/parameters/site_id"
|
6566
6657
|
- "$ref": "#/components/parameters/item_id"
|
6567
6658
|
responses:
|
6568
6659
|
'200':
|
@@ -6678,7 +6769,6 @@ paths:
|
|
6678
6769
|
operationId: update_item
|
6679
6770
|
summary: Update an active item
|
6680
6771
|
parameters:
|
6681
|
-
- "$ref": "#/components/parameters/site_id"
|
6682
6772
|
- "$ref": "#/components/parameters/item_id"
|
6683
6773
|
requestBody:
|
6684
6774
|
content:
|
@@ -6845,7 +6935,6 @@ paths:
|
|
6845
6935
|
operationId: deactivate_item
|
6846
6936
|
summary: Deactivate an item
|
6847
6937
|
parameters:
|
6848
|
-
- "$ref": "#/components/parameters/site_id"
|
6849
6938
|
- "$ref": "#/components/parameters/item_id"
|
6850
6939
|
description: Deactivating an item makes it unavailable for new purchases. It
|
6851
6940
|
will not affect existing line items.
|
@@ -6958,7 +7047,6 @@ paths:
|
|
6958
7047
|
%s\", deactivatedItem.Code)"
|
6959
7048
|
"/items/{item_id}/reactivate":
|
6960
7049
|
parameters:
|
6961
|
-
- "$ref": "#/components/parameters/site_id"
|
6962
7050
|
- "$ref": "#/components/parameters/item_id"
|
6963
7051
|
put:
|
6964
7052
|
tags:
|
@@ -7089,7 +7177,6 @@ paths:
|
|
7089
7177
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
7090
7178
|
to use pagination in the API and Client Libraries.
|
7091
7179
|
parameters:
|
7092
|
-
- "$ref": "#/components/parameters/site_id"
|
7093
7180
|
- "$ref": "#/components/parameters/ids"
|
7094
7181
|
- "$ref": "#/components/parameters/limit"
|
7095
7182
|
- "$ref": "#/components/parameters/order"
|
@@ -7122,8 +7209,6 @@ paths:
|
|
7122
7209
|
- measured_unit
|
7123
7210
|
operationId: create_measured_unit
|
7124
7211
|
summary: Create a new measured unit
|
7125
|
-
parameters:
|
7126
|
-
- "$ref": "#/components/parameters/site_id"
|
7127
7212
|
requestBody:
|
7128
7213
|
content:
|
7129
7214
|
application/json:
|
@@ -7169,7 +7254,6 @@ paths:
|
|
7169
7254
|
operationId: get_measured_unit
|
7170
7255
|
summary: Fetch a measured unit
|
7171
7256
|
parameters:
|
7172
|
-
- "$ref": "#/components/parameters/site_id"
|
7173
7257
|
- "$ref": "#/components/parameters/measured_unit_id"
|
7174
7258
|
responses:
|
7175
7259
|
'200':
|
@@ -7197,7 +7281,6 @@ paths:
|
|
7197
7281
|
operationId: update_measured_unit
|
7198
7282
|
summary: Update a measured unit
|
7199
7283
|
parameters:
|
7200
|
-
- "$ref": "#/components/parameters/site_id"
|
7201
7284
|
- "$ref": "#/components/parameters/measured_unit_id"
|
7202
7285
|
requestBody:
|
7203
7286
|
content:
|
@@ -7244,7 +7327,6 @@ paths:
|
|
7244
7327
|
summary: Remove a measured unit
|
7245
7328
|
description: A mesured unit cannot be deleted if it is used by an active plan.
|
7246
7329
|
parameters:
|
7247
|
-
- "$ref": "#/components/parameters/site_id"
|
7248
7330
|
- "$ref": "#/components/parameters/measured_unit_id"
|
7249
7331
|
responses:
|
7250
7332
|
'200':
|
@@ -7275,7 +7357,6 @@ paths:
|
|
7275
7357
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
7276
7358
|
to use pagination in the API and Client Libraries.
|
7277
7359
|
parameters:
|
7278
|
-
- "$ref": "#/components/parameters/site_id"
|
7279
7360
|
- "$ref": "#/components/parameters/ids"
|
7280
7361
|
- "$ref": "#/components/parameters/limit"
|
7281
7362
|
- "$ref": "#/components/parameters/order"
|
@@ -7378,7 +7459,6 @@ paths:
|
|
7378
7459
|
operationId: get_invoice
|
7379
7460
|
summary: Fetch an invoice
|
7380
7461
|
parameters:
|
7381
|
-
- "$ref": "#/components/parameters/site_id"
|
7382
7462
|
- "$ref": "#/components/parameters/invoice_id"
|
7383
7463
|
responses:
|
7384
7464
|
'200':
|
@@ -7494,7 +7574,6 @@ paths:
|
|
7494
7574
|
operationId: update_invoice
|
7495
7575
|
summary: Update an invoice
|
7496
7576
|
parameters:
|
7497
|
-
- "$ref": "#/components/parameters/site_id"
|
7498
7577
|
- "$ref": "#/components/parameters/invoice_id"
|
7499
7578
|
requestBody:
|
7500
7579
|
content:
|
@@ -7646,7 +7725,6 @@ paths:
|
|
7646
7725
|
operationId: get_invoice_pdf
|
7647
7726
|
summary: Fetch an invoice as a PDF
|
7648
7727
|
parameters:
|
7649
|
-
- "$ref": "#/components/parameters/site_id"
|
7650
7728
|
- "$ref": "#/components/parameters/invoice_id"
|
7651
7729
|
responses:
|
7652
7730
|
'200':
|
@@ -7786,7 +7864,6 @@ paths:
|
|
7786
7864
|
description: Force a collection attempt using the stored billing information.
|
7787
7865
|
This will trigger a transaction outside of Recurly's normal retry logic.
|
7788
7866
|
parameters:
|
7789
|
-
- "$ref": "#/components/parameters/site_id"
|
7790
7867
|
- "$ref": "#/components/parameters/invoice_id"
|
7791
7868
|
requestBody:
|
7792
7869
|
content:
|
@@ -7919,7 +7996,6 @@ paths:
|
|
7919
7996
|
|
7920
7997
|
Only invoices with the `pending`, `processing` or `past_due` states can be marked as failed.
|
7921
7998
|
parameters:
|
7922
|
-
- "$ref": "#/components/parameters/site_id"
|
7923
7999
|
- "$ref": "#/components/parameters/invoice_id"
|
7924
8000
|
responses:
|
7925
8001
|
'200':
|
@@ -8046,7 +8122,6 @@ paths:
|
|
8046
8122
|
|
8047
8123
|
Only invoices with the `pending`, `processing`, `past_due` or `failed` states can be marked as paid.
|
8048
8124
|
parameters:
|
8049
|
-
- "$ref": "#/components/parameters/site_id"
|
8050
8125
|
- "$ref": "#/components/parameters/invoice_id"
|
8051
8126
|
responses:
|
8052
8127
|
'200':
|
@@ -8172,7 +8247,6 @@ paths:
|
|
8172
8247
|
operationId: reopen_invoice
|
8173
8248
|
summary: Reopen a closed, manual invoice
|
8174
8249
|
parameters:
|
8175
|
-
- "$ref": "#/components/parameters/site_id"
|
8176
8250
|
- "$ref": "#/components/parameters/invoice_id"
|
8177
8251
|
responses:
|
8178
8252
|
'200':
|
@@ -8298,7 +8372,6 @@ paths:
|
|
8298
8372
|
description: Invoice must be a credit invoice (`type=credit`) and cannot be
|
8299
8373
|
closed (`state=closed`), processing (`state=processing`), or already voided.
|
8300
8374
|
parameters:
|
8301
|
-
- "$ref": "#/components/parameters/site_id"
|
8302
8375
|
- "$ref": "#/components/parameters/invoice_id"
|
8303
8376
|
responses:
|
8304
8377
|
'200':
|
@@ -8406,7 +8479,6 @@ paths:
|
|
8406
8479
|
not captured through your gateway. It will throw an error for an auto-collecting
|
8407
8480
|
invoice.
|
8408
8481
|
parameters:
|
8409
|
-
- "$ref": "#/components/parameters/site_id"
|
8410
8482
|
- "$ref": "#/components/parameters/invoice_id"
|
8411
8483
|
requestBody:
|
8412
8484
|
content:
|
@@ -8464,14 +8536,12 @@ paths:
|
|
8464
8536
|
"/invoices/{invoice_id}/line_items":
|
8465
8537
|
get:
|
8466
8538
|
tags:
|
8467
|
-
- invoice
|
8468
8539
|
- line_item
|
8469
8540
|
operationId: list_invoice_line_items
|
8470
8541
|
summary: List an invoice's line items
|
8471
8542
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
8472
8543
|
to use pagination in the API and Client Libraries.
|
8473
8544
|
parameters:
|
8474
|
-
- "$ref": "#/components/parameters/site_id"
|
8475
8545
|
- "$ref": "#/components/parameters/invoice_id"
|
8476
8546
|
- "$ref": "#/components/parameters/ids"
|
8477
8547
|
- "$ref": "#/components/parameters/limit"
|
@@ -8576,14 +8646,12 @@ paths:
|
|
8576
8646
|
"/invoices/{invoice_id}/coupon_redemptions":
|
8577
8647
|
get:
|
8578
8648
|
tags:
|
8579
|
-
- invoice
|
8580
8649
|
- coupon_redemption
|
8581
8650
|
operationId: list_invoice_coupon_redemptions
|
8582
8651
|
summary: Show the coupon redemptions applied to an invoice
|
8583
8652
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
8584
8653
|
to use pagination in the API and Client Libraries.
|
8585
8654
|
parameters:
|
8586
|
-
- "$ref": "#/components/parameters/site_id"
|
8587
8655
|
- "$ref": "#/components/parameters/invoice_id"
|
8588
8656
|
- "$ref": "#/components/parameters/ids"
|
8589
8657
|
- "$ref": "#/components/parameters/sort_dates"
|
@@ -8683,7 +8751,6 @@ paths:
|
|
8683
8751
|
|
8684
8752
|
See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries.
|
8685
8753
|
parameters:
|
8686
|
-
- "$ref": "#/components/parameters/site_id"
|
8687
8754
|
- "$ref": "#/components/parameters/invoice_id"
|
8688
8755
|
responses:
|
8689
8756
|
'200':
|
@@ -8777,7 +8844,6 @@ paths:
|
|
8777
8844
|
If you want to refund the entire refundable amount on the invoice, the
|
8778
8845
|
simplest way is to do `type=amount` without specifiying an `amount`.
|
8779
8846
|
parameters:
|
8780
|
-
- "$ref": "#/components/parameters/site_id"
|
8781
8847
|
- "$ref": "#/components/parameters/invoice_id"
|
8782
8848
|
requestBody:
|
8783
8849
|
content:
|
@@ -8940,7 +9006,6 @@ paths:
|
|
8940
9006
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
8941
9007
|
to use pagination in the API and Client Libraries.
|
8942
9008
|
parameters:
|
8943
|
-
- "$ref": "#/components/parameters/site_id"
|
8944
9009
|
- "$ref": "#/components/parameters/ids"
|
8945
9010
|
- "$ref": "#/components/parameters/limit"
|
8946
9011
|
- "$ref": "#/components/parameters/order"
|
@@ -9047,7 +9112,6 @@ paths:
|
|
9047
9112
|
operationId: get_line_item
|
9048
9113
|
summary: Fetch a line item
|
9049
9114
|
parameters:
|
9050
|
-
- "$ref": "#/components/parameters/site_id"
|
9051
9115
|
- "$ref": "#/components/parameters/line_item_id"
|
9052
9116
|
responses:
|
9053
9117
|
'200':
|
@@ -9163,7 +9227,6 @@ paths:
|
|
9163
9227
|
operationId: remove_line_item
|
9164
9228
|
summary: Delete an uninvoiced line item
|
9165
9229
|
parameters:
|
9166
|
-
- "$ref": "#/components/parameters/site_id"
|
9167
9230
|
- "$ref": "#/components/parameters/line_item_id"
|
9168
9231
|
responses:
|
9169
9232
|
'204':
|
@@ -9284,7 +9347,6 @@ paths:
|
|
9284
9347
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
9285
9348
|
to use pagination in the API and Client Libraries.
|
9286
9349
|
parameters:
|
9287
|
-
- "$ref": "#/components/parameters/site_id"
|
9288
9350
|
- "$ref": "#/components/parameters/ids"
|
9289
9351
|
- "$ref": "#/components/parameters/limit"
|
9290
9352
|
- "$ref": "#/components/parameters/order"
|
@@ -9385,8 +9447,6 @@ paths:
|
|
9385
9447
|
- plan
|
9386
9448
|
operationId: create_plan
|
9387
9449
|
summary: Create a plan
|
9388
|
-
parameters:
|
9389
|
-
- "$ref": "#/components/parameters/site_id"
|
9390
9450
|
requestBody:
|
9391
9451
|
content:
|
9392
9452
|
application/json:
|
@@ -9585,7 +9645,6 @@ paths:
|
|
9585
9645
|
operationId: get_plan
|
9586
9646
|
summary: Fetch a plan
|
9587
9647
|
parameters:
|
9588
|
-
- "$ref": "#/components/parameters/site_id"
|
9589
9648
|
- "$ref": "#/components/parameters/plan_id"
|
9590
9649
|
responses:
|
9591
9650
|
'200':
|
@@ -9701,7 +9760,6 @@ paths:
|
|
9701
9760
|
operationId: update_plan
|
9702
9761
|
summary: Update a plan
|
9703
9762
|
parameters:
|
9704
|
-
- "$ref": "#/components/parameters/site_id"
|
9705
9763
|
- "$ref": "#/components/parameters/plan_id"
|
9706
9764
|
requestBody:
|
9707
9765
|
content:
|
@@ -9848,7 +9906,6 @@ paths:
|
|
9848
9906
|
operationId: remove_plan
|
9849
9907
|
summary: Remove a plan
|
9850
9908
|
parameters:
|
9851
|
-
- "$ref": "#/components/parameters/site_id"
|
9852
9909
|
- "$ref": "#/components/parameters/plan_id"
|
9853
9910
|
responses:
|
9854
9911
|
'200':
|
@@ -9954,13 +10011,11 @@ paths:
|
|
9954
10011
|
get:
|
9955
10012
|
tags:
|
9956
10013
|
- add-on
|
9957
|
-
- plan
|
9958
10014
|
operationId: list_plan_add_ons
|
9959
10015
|
summary: List a plan's add-ons
|
9960
10016
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
9961
10017
|
to use pagination in the API and Client Libraries.
|
9962
10018
|
parameters:
|
9963
|
-
- "$ref": "#/components/parameters/site_id"
|
9964
10019
|
- "$ref": "#/components/parameters/plan_id"
|
9965
10020
|
- "$ref": "#/components/parameters/ids"
|
9966
10021
|
- "$ref": "#/components/parameters/limit"
|
@@ -10059,11 +10114,9 @@ paths:
|
|
10059
10114
|
post:
|
10060
10115
|
tags:
|
10061
10116
|
- add-on
|
10062
|
-
- plan
|
10063
10117
|
operationId: create_plan_add_on
|
10064
10118
|
summary: Create an add-on
|
10065
10119
|
parameters:
|
10066
|
-
- "$ref": "#/components/parameters/site_id"
|
10067
10120
|
- "$ref": "#/components/parameters/plan_id"
|
10068
10121
|
requestBody:
|
10069
10122
|
content:
|
@@ -10257,12 +10310,10 @@ paths:
|
|
10257
10310
|
"/plans/{plan_id}/add_ons/{add_on_id}":
|
10258
10311
|
get:
|
10259
10312
|
tags:
|
10260
|
-
- plan
|
10261
10313
|
- add-on
|
10262
10314
|
operationId: get_plan_add_on
|
10263
10315
|
summary: Fetch a plan's add-on
|
10264
10316
|
parameters:
|
10265
|
-
- "$ref": "#/components/parameters/site_id"
|
10266
10317
|
- "$ref": "#/components/parameters/plan_id"
|
10267
10318
|
- "$ref": "#/components/parameters/add_on_id"
|
10268
10319
|
responses:
|
@@ -10377,12 +10428,10 @@ paths:
|
|
10377
10428
|
Add-On: %v\", planAddOn)"
|
10378
10429
|
put:
|
10379
10430
|
tags:
|
10380
|
-
- plan
|
10381
10431
|
- add-on
|
10382
10432
|
operationId: update_plan_add_on
|
10383
10433
|
summary: Update an add-on
|
10384
10434
|
parameters:
|
10385
|
-
- "$ref": "#/components/parameters/site_id"
|
10386
10435
|
- "$ref": "#/components/parameters/plan_id"
|
10387
10436
|
- "$ref": "#/components/parameters/add_on_id"
|
10388
10437
|
requestBody:
|
@@ -10521,12 +10570,10 @@ paths:
|
|
10521
10570
|
Add-On: %v\", planAddOn)"
|
10522
10571
|
delete:
|
10523
10572
|
tags:
|
10524
|
-
- plan
|
10525
10573
|
- add-on
|
10526
10574
|
operationId: remove_plan_add_on
|
10527
10575
|
summary: Remove an add-on
|
10528
10576
|
parameters:
|
10529
|
-
- "$ref": "#/components/parameters/site_id"
|
10530
10577
|
- "$ref": "#/components/parameters/plan_id"
|
10531
10578
|
- "$ref": "#/components/parameters/add_on_id"
|
10532
10579
|
responses:
|
@@ -10635,7 +10682,6 @@ paths:
|
|
10635
10682
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
10636
10683
|
to use pagination in the API and Client Libraries.
|
10637
10684
|
parameters:
|
10638
|
-
- "$ref": "#/components/parameters/site_id"
|
10639
10685
|
- "$ref": "#/components/parameters/ids"
|
10640
10686
|
- "$ref": "#/components/parameters/limit"
|
10641
10687
|
- "$ref": "#/components/parameters/order"
|
@@ -10736,7 +10782,6 @@ paths:
|
|
10736
10782
|
operationId: get_add_on
|
10737
10783
|
summary: Fetch an add-on
|
10738
10784
|
parameters:
|
10739
|
-
- "$ref": "#/components/parameters/site_id"
|
10740
10785
|
- "$ref": "#/components/parameters/add_on_id"
|
10741
10786
|
responses:
|
10742
10787
|
'200':
|
@@ -10855,7 +10900,6 @@ paths:
|
|
10855
10900
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
10856
10901
|
to use pagination in the API and Client Libraries.
|
10857
10902
|
parameters:
|
10858
|
-
- "$ref": "#/components/parameters/site_id"
|
10859
10903
|
- "$ref": "#/components/parameters/ids"
|
10860
10904
|
- "$ref": "#/components/parameters/limit"
|
10861
10905
|
- "$ref": "#/components/parameters/order"
|
@@ -10953,8 +10997,6 @@ paths:
|
|
10953
10997
|
- shipping_method
|
10954
10998
|
operationId: create_shipping_method
|
10955
10999
|
summary: Create a new shipping method
|
10956
|
-
parameters:
|
10957
|
-
- "$ref": "#/components/parameters/site_id"
|
10958
11000
|
requestBody:
|
10959
11001
|
content:
|
10960
11002
|
application/json:
|
@@ -11000,7 +11042,6 @@ paths:
|
|
11000
11042
|
operationId: get_shipping_method
|
11001
11043
|
summary: Fetch a shipping method
|
11002
11044
|
parameters:
|
11003
|
-
- "$ref": "#/components/parameters/site_id"
|
11004
11045
|
- "$ref": "#/components/parameters/shipping_method_id"
|
11005
11046
|
responses:
|
11006
11047
|
'200':
|
@@ -11028,7 +11069,6 @@ paths:
|
|
11028
11069
|
operationId: update_shipping_method
|
11029
11070
|
summary: Update an active Shipping Method
|
11030
11071
|
parameters:
|
11031
|
-
- "$ref": "#/components/parameters/site_id"
|
11032
11072
|
- "$ref": "#/components/parameters/shipping_method_id"
|
11033
11073
|
requestBody:
|
11034
11074
|
content:
|
@@ -11074,7 +11114,6 @@ paths:
|
|
11074
11114
|
operationId: deactivate_shipping_method
|
11075
11115
|
summary: Deactivate a shipping method
|
11076
11116
|
parameters:
|
11077
|
-
- "$ref": "#/components/parameters/site_id"
|
11078
11117
|
- "$ref": "#/components/parameters/shipping_method_id"
|
11079
11118
|
description: Deactivating a shipping method makes it unavailable for new subscriptions
|
11080
11119
|
or purchases. It will not affect existing subscriptions.
|
@@ -11107,7 +11146,6 @@ paths:
|
|
11107
11146
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
11108
11147
|
to use pagination in the API and Client Libraries.
|
11109
11148
|
parameters:
|
11110
|
-
- "$ref": "#/components/parameters/site_id"
|
11111
11149
|
- "$ref": "#/components/parameters/ids"
|
11112
11150
|
- "$ref": "#/components/parameters/limit"
|
11113
11151
|
- "$ref": "#/components/parameters/order"
|
@@ -11208,8 +11246,6 @@ paths:
|
|
11208
11246
|
- subscription
|
11209
11247
|
operationId: create_subscription
|
11210
11248
|
summary: Create a new subscription
|
11211
|
-
parameters:
|
11212
|
-
- "$ref": "#/components/parameters/site_id"
|
11213
11249
|
requestBody:
|
11214
11250
|
content:
|
11215
11251
|
application/json:
|
@@ -11314,8 +11350,7 @@ paths:
|
|
11314
11350
|
subscription_create = {
|
11315
11351
|
plan_code: plan_code,
|
11316
11352
|
currency: "USD",
|
11317
|
-
# This can be an existing account or
|
11318
|
-
# a new acocunt
|
11353
|
+
# This can be an existing account or a new account
|
11319
11354
|
account: {
|
11320
11355
|
code: account_code,
|
11321
11356
|
}
|
@@ -11389,7 +11424,6 @@ paths:
|
|
11389
11424
|
operationId: get_subscription
|
11390
11425
|
summary: Fetch a subscription
|
11391
11426
|
parameters:
|
11392
|
-
- "$ref": "#/components/parameters/site_id"
|
11393
11427
|
- "$ref": "#/components/parameters/subscription_id"
|
11394
11428
|
responses:
|
11395
11429
|
'200':
|
@@ -11510,7 +11544,6 @@ paths:
|
|
11510
11544
|
impact on the billed amount. Use the [Create Subscription Change](#operation/create_subscription_change)
|
11511
11545
|
endpoint to make those changes.
|
11512
11546
|
parameters:
|
11513
|
-
- "$ref": "#/components/parameters/site_id"
|
11514
11547
|
- "$ref": "#/components/parameters/subscription_id"
|
11515
11548
|
requestBody:
|
11516
11549
|
content:
|
@@ -11659,7 +11692,6 @@ paths:
|
|
11659
11692
|
|
11660
11693
|
If the subscription has a paid invoice you may choose to refund all, part or none of last invoice's amount.
|
11661
11694
|
parameters:
|
11662
|
-
- "$ref": "#/components/parameters/site_id"
|
11663
11695
|
- "$ref": "#/components/parameters/subscription_id"
|
11664
11696
|
- name: refund
|
11665
11697
|
in: query
|
@@ -11822,7 +11854,6 @@ paths:
|
|
11822
11854
|
until the end of the billing cycle. When a future subscription (`state=future`)
|
11823
11855
|
is canceled it becomes failed `state=failed` and cannot be reactivated.
|
11824
11856
|
parameters:
|
11825
|
-
- "$ref": "#/components/parameters/site_id"
|
11826
11857
|
- "$ref": "#/components/parameters/subscription_id"
|
11827
11858
|
requestBody:
|
11828
11859
|
content:
|
@@ -11959,7 +11990,6 @@ paths:
|
|
11959
11990
|
|
11960
11991
|
Expired or failed subscriptions cannot be reactivated; instead a new subscription plan will need to be applied to the account.
|
11961
11992
|
parameters:
|
11962
|
-
- "$ref": "#/components/parameters/site_id"
|
11963
11993
|
- "$ref": "#/components/parameters/subscription_id"
|
11964
11994
|
responses:
|
11965
11995
|
'200':
|
@@ -12093,7 +12123,6 @@ paths:
|
|
12093
12123
|
|
12094
12124
|
Expired, cancelled, or failed subscriptions cannot be paused.
|
12095
12125
|
parameters:
|
12096
|
-
- "$ref": "#/components/parameters/site_id"
|
12097
12126
|
- "$ref": "#/components/parameters/subscription_id"
|
12098
12127
|
requestBody:
|
12099
12128
|
content:
|
@@ -12247,7 +12276,6 @@ paths:
|
|
12247
12276
|
The subscription must be in the paused state. Active, expired, cancelled,
|
12248
12277
|
or failed subscriptions cannot be resumed.
|
12249
12278
|
parameters:
|
12250
|
-
- "$ref": "#/components/parameters/site_id"
|
12251
12279
|
- "$ref": "#/components/parameters/subscription_id"
|
12252
12280
|
responses:
|
12253
12281
|
'200':
|
@@ -12378,7 +12406,6 @@ paths:
|
|
12378
12406
|
in trial. The subscription must be in a trial. Active, paused, expired, cancelled,
|
12379
12407
|
or failed subscriptions cannot be converted.
|
12380
12408
|
parameters:
|
12381
|
-
- "$ref": "#/components/parameters/site_id"
|
12382
12409
|
- "$ref": "#/components/parameters/subscription_id"
|
12383
12410
|
responses:
|
12384
12411
|
'200':
|
@@ -12410,12 +12437,10 @@ paths:
|
|
12410
12437
|
"/subscriptions/{subscription_id}/change":
|
12411
12438
|
get:
|
12412
12439
|
tags:
|
12413
|
-
- subscription
|
12414
12440
|
- subscription_change
|
12415
12441
|
operationId: get_subscription_change
|
12416
12442
|
summary: Fetch a subscription's pending change
|
12417
12443
|
parameters:
|
12418
|
-
- "$ref": "#/components/parameters/site_id"
|
12419
12444
|
- "$ref": "#/components/parameters/subscription_id"
|
12420
12445
|
responses:
|
12421
12446
|
'200':
|
@@ -12542,13 +12567,11 @@ paths:
|
|
12542
12567
|
change: %s\", subscriptionChange.Id)"
|
12543
12568
|
post:
|
12544
12569
|
tags:
|
12545
|
-
- subscription
|
12546
12570
|
- subscription_change
|
12547
12571
|
operationId: create_subscription_change
|
12548
12572
|
summary: Create a new subscription change
|
12549
12573
|
description: Calling this will overwrite an existing, pending subscription change.
|
12550
12574
|
parameters:
|
12551
|
-
- "$ref": "#/components/parameters/site_id"
|
12552
12575
|
- "$ref": "#/components/parameters/subscription_id"
|
12553
12576
|
requestBody:
|
12554
12577
|
content:
|
@@ -12702,12 +12725,10 @@ paths:
|
|
12702
12725
|
changed: %s\", subscriptionChange.Id)"
|
12703
12726
|
delete:
|
12704
12727
|
tags:
|
12705
|
-
- subscription
|
12706
12728
|
- subscription_change
|
12707
12729
|
operationId: remove_subscription_change
|
12708
12730
|
summary: Delete the pending subscription change
|
12709
12731
|
parameters:
|
12710
|
-
- "$ref": "#/components/parameters/site_id"
|
12711
12732
|
- "$ref": "#/components/parameters/subscription_id"
|
12712
12733
|
description: Deleting the pending subscription change will cause the current
|
12713
12734
|
subscription settings to be used on the next renewal.
|
@@ -12818,14 +12839,12 @@ paths:
|
|
12818
12839
|
"/subscriptions/{subscription_id}/change/preview":
|
12819
12840
|
post:
|
12820
12841
|
tags:
|
12821
|
-
- subscription
|
12822
12842
|
- subscription_change
|
12823
12843
|
operationId: preview_subscription_change
|
12824
12844
|
summary: Preview a new subscription change
|
12825
12845
|
description: Calling this will not save the subscription change or overwrite
|
12826
12846
|
an existing change.
|
12827
12847
|
parameters:
|
12828
|
-
- "$ref": "#/components/parameters/site_id"
|
12829
12848
|
- "$ref": "#/components/parameters/subscription_id"
|
12830
12849
|
requestBody:
|
12831
12850
|
content:
|
@@ -12864,13 +12883,11 @@ paths:
|
|
12864
12883
|
get:
|
12865
12884
|
tags:
|
12866
12885
|
- invoice
|
12867
|
-
- subscription
|
12868
12886
|
operationId: list_subscription_invoices
|
12869
12887
|
summary: List a subscription's invoices
|
12870
12888
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
12871
12889
|
to use pagination in the API and Client Libraries.
|
12872
12890
|
parameters:
|
12873
|
-
- "$ref": "#/components/parameters/site_id"
|
12874
12891
|
- "$ref": "#/components/parameters/subscription_id"
|
12875
12892
|
- "$ref": "#/components/parameters/ids"
|
12876
12893
|
- "$ref": "#/components/parameters/limit"
|
@@ -12969,13 +12986,12 @@ paths:
|
|
12969
12986
|
"/subscriptions/{subscription_id}/line_items":
|
12970
12987
|
get:
|
12971
12988
|
tags:
|
12972
|
-
-
|
12989
|
+
- line_item
|
12973
12990
|
operationId: list_subscription_line_items
|
12974
12991
|
summary: List a subscription's line items
|
12975
12992
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
12976
12993
|
to use pagination in the API and Client Libraries.
|
12977
12994
|
parameters:
|
12978
|
-
- "$ref": "#/components/parameters/site_id"
|
12979
12995
|
- "$ref": "#/components/parameters/subscription_id"
|
12980
12996
|
- "$ref": "#/components/parameters/ids"
|
12981
12997
|
- "$ref": "#/components/parameters/limit"
|
@@ -13077,14 +13093,12 @@ paths:
|
|
13077
13093
|
"/subscriptions/{subscription_id}/coupon_redemptions":
|
13078
13094
|
get:
|
13079
13095
|
tags:
|
13080
|
-
- subscription
|
13081
13096
|
- coupon_redemption
|
13082
13097
|
operationId: list_subscription_coupon_redemptions
|
13083
13098
|
summary: Show the coupon redemptions for a subscription
|
13084
13099
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
13085
13100
|
to use pagination in the API and Client Libraries.
|
13086
13101
|
parameters:
|
13087
|
-
- "$ref": "#/components/parameters/site_id"
|
13088
13102
|
- "$ref": "#/components/parameters/subscription_id"
|
13089
13103
|
- "$ref": "#/components/parameters/ids"
|
13090
13104
|
- "$ref": "#/components/parameters/sort_dates"
|
@@ -13176,13 +13190,10 @@ paths:
|
|
13176
13190
|
"/subscriptions/{subscription_id}/add_ons/{add_on_id}/usage":
|
13177
13191
|
get:
|
13178
13192
|
tags:
|
13179
|
-
- invoice
|
13180
|
-
- subscription
|
13181
13193
|
- usage
|
13182
13194
|
operationId: list_usage
|
13183
13195
|
summary: List a subscription add-on's usage records
|
13184
13196
|
parameters:
|
13185
|
-
- "$ref": "#/components/parameters/site_id"
|
13186
13197
|
- "$ref": "#/components/parameters/subscription_id"
|
13187
13198
|
- "$ref": "#/components/parameters/add_on_id"
|
13188
13199
|
- "$ref": "#/components/parameters/ids"
|
@@ -13220,13 +13231,10 @@ paths:
|
|
13220
13231
|
x-code-samples: []
|
13221
13232
|
post:
|
13222
13233
|
tags:
|
13223
|
-
- invoice
|
13224
|
-
- subscription
|
13225
13234
|
- usage
|
13226
13235
|
operationId: create_usage
|
13227
13236
|
summary: Log a usage record on this subscription add-on
|
13228
13237
|
parameters:
|
13229
|
-
- "$ref": "#/components/parameters/site_id"
|
13230
13238
|
- "$ref": "#/components/parameters/subscription_id"
|
13231
13239
|
- "$ref": "#/components/parameters/add_on_id"
|
13232
13240
|
requestBody:
|
@@ -13270,13 +13278,10 @@ paths:
|
|
13270
13278
|
"/usage/{usage_id}":
|
13271
13279
|
get:
|
13272
13280
|
tags:
|
13273
|
-
- invoice
|
13274
|
-
- subscription
|
13275
13281
|
- usage
|
13276
13282
|
operationId: get_usage
|
13277
13283
|
summary: Get a usage record
|
13278
13284
|
parameters:
|
13279
|
-
- "$ref": "#/components/parameters/site_id"
|
13280
13285
|
- "$ref": "#/components/parameters/usage_id"
|
13281
13286
|
responses:
|
13282
13287
|
'200':
|
@@ -13306,13 +13311,10 @@ paths:
|
|
13306
13311
|
x-code-samples: []
|
13307
13312
|
put:
|
13308
13313
|
tags:
|
13309
|
-
- invoice
|
13310
|
-
- subscription
|
13311
13314
|
- usage
|
13312
13315
|
operationId: update_usage
|
13313
13316
|
summary: Update a usage record
|
13314
13317
|
parameters:
|
13315
|
-
- "$ref": "#/components/parameters/site_id"
|
13316
13318
|
- "$ref": "#/components/parameters/usage_id"
|
13317
13319
|
requestBody:
|
13318
13320
|
content:
|
@@ -13354,13 +13356,10 @@ paths:
|
|
13354
13356
|
x-code-samples: []
|
13355
13357
|
delete:
|
13356
13358
|
tags:
|
13357
|
-
- invoice
|
13358
|
-
- subscription
|
13359
13359
|
- usage
|
13360
13360
|
operationId: remove_usage
|
13361
13361
|
summary: Delete a usage record.
|
13362
13362
|
parameters:
|
13363
|
-
- "$ref": "#/components/parameters/site_id"
|
13364
13363
|
- "$ref": "#/components/parameters/usage_id"
|
13365
13364
|
responses:
|
13366
13365
|
'204':
|
@@ -13399,7 +13398,6 @@ paths:
|
|
13399
13398
|
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
13400
13399
|
to use pagination in the API and Client Libraries.
|
13401
13400
|
parameters:
|
13402
|
-
- "$ref": "#/components/parameters/site_id"
|
13403
13401
|
- "$ref": "#/components/parameters/ids"
|
13404
13402
|
- "$ref": "#/components/parameters/limit"
|
13405
13403
|
- "$ref": "#/components/parameters/order"
|
@@ -13503,7 +13501,6 @@ paths:
|
|
13503
13501
|
operationId: get_transaction
|
13504
13502
|
summary: Fetch a transaction
|
13505
13503
|
parameters:
|
13506
|
-
- "$ref": "#/components/parameters/site_id"
|
13507
13504
|
- "$ref": "#/components/parameters/transaction_id"
|
13508
13505
|
responses:
|
13509
13506
|
'200':
|
@@ -13615,7 +13612,6 @@ paths:
|
|
13615
13612
|
%v\", transaction.Id)"
|
13616
13613
|
"/unique_coupon_codes/{unique_coupon_code_id}":
|
13617
13614
|
parameters:
|
13618
|
-
- "$ref": "#/components/parameters/site_id"
|
13619
13615
|
- "$ref": "#/components/parameters/unique_coupon_code_id"
|
13620
13616
|
get:
|
13621
13617
|
tags:
|
@@ -13677,7 +13673,6 @@ paths:
|
|
13677
13673
|
x-code-samples: []
|
13678
13674
|
"/unique_coupon_codes/{unique_coupon_code_id}/restore":
|
13679
13675
|
parameters:
|
13680
|
-
- "$ref": "#/components/parameters/site_id"
|
13681
13676
|
- "$ref": "#/components/parameters/unique_coupon_code_id"
|
13682
13677
|
put:
|
13683
13678
|
tags:
|
@@ -13719,8 +13714,6 @@ paths:
|
|
13719
13714
|
description: A purchase is a checkout containing at least one or more subscriptions
|
13720
13715
|
or one-time charges (line items) and supports both coupon and gift card redemptions.
|
13721
13716
|
All items purchased will be on one invoice and paid for with one transaction.
|
13722
|
-
parameters:
|
13723
|
-
- "$ref": "#/components/parameters/site_id"
|
13724
13717
|
requestBody:
|
13725
13718
|
content:
|
13726
13719
|
application/json:
|
@@ -13953,8 +13946,6 @@ paths:
|
|
13953
13946
|
description: A purchase is a checkout containing at least one or more subscriptions
|
13954
13947
|
or one-time charges (line items) and supports both coupon and gift card redemptions.
|
13955
13948
|
All items purchased will be on one invoice and paid for with one transaction.
|
13956
|
-
parameters:
|
13957
|
-
- "$ref": "#/components/parameters/site_id"
|
13958
13949
|
requestBody:
|
13959
13950
|
content:
|
13960
13951
|
application/json:
|
@@ -14176,8 +14167,6 @@ paths:
|
|
14176
14167
|
Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Preview Charge
|
14177
14168
|
Invoice %v\", collection.ChargeInvoice)"
|
14178
14169
|
"/export_dates":
|
14179
|
-
parameters:
|
14180
|
-
- "$ref": "#/components/parameters/site_id"
|
14181
14170
|
get:
|
14182
14171
|
tags:
|
14183
14172
|
- automated_exports
|
@@ -14289,7 +14278,6 @@ paths:
|
|
14289
14278
|
for: \", date)\n}"
|
14290
14279
|
"/export_dates/{export_date}/export_files":
|
14291
14280
|
parameters:
|
14292
|
-
- "$ref": "#/components/parameters/site_id"
|
14293
14281
|
- "$ref": "#/components/parameters/export_date"
|
14294
14282
|
get:
|
14295
14283
|
tags:
|
@@ -15755,8 +15743,8 @@ components:
|
|
15755
15743
|
title: Usage Percentage
|
15756
15744
|
description: The percentage taken of the monetary amount of usage tracked.
|
15757
15745
|
This can be up to 4 decimal places. A value between 0.0 and 100.0. Required
|
15758
|
-
if `add_on_type` is usage and `usage_type` is percentage.
|
15759
|
-
|
15746
|
+
if `add_on_type` is usage, `tier_type` is `flat` and `usage_type` is percentage.
|
15747
|
+
Must be omitted otherwise.
|
15760
15748
|
measured_unit_id:
|
15761
15749
|
type: string
|
15762
15750
|
title: Measured Unit ID
|
@@ -15862,7 +15850,7 @@ components:
|
|
15862
15850
|
description: |
|
15863
15851
|
If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object
|
15864
15852
|
must include one to many tiers with `ending_quantity` and `unit_amount` for
|
15865
|
-
the desired `currencies
|
15853
|
+
the desired `currencies`, or alternatively, `usage_percentage` for usage percentage type usage add ons. There must be one tier with an `ending_quantity`
|
15866
15854
|
of 999999999 which is the default if not provided.
|
15867
15855
|
required:
|
15868
15856
|
- code
|
@@ -15895,8 +15883,8 @@ components:
|
|
15895
15883
|
title: Usage Percentage
|
15896
15884
|
description: The percentage taken of the monetary amount of usage tracked.
|
15897
15885
|
This can be up to 4 decimal places. A value between 0.0 and 100.0. Required
|
15898
|
-
if `add_on_type` is usage and `usage_type` is percentage.
|
15899
|
-
|
15886
|
+
if `add_on_type` is usage, `tier_type` is `flat` and `usage_type` is percentage.
|
15887
|
+
Must be omitted otherwise.
|
15900
15888
|
measured_unit_id:
|
15901
15889
|
type: string
|
15902
15890
|
title: Measured Unit ID
|
@@ -15991,7 +15979,7 @@ components:
|
|
15991
15979
|
description: |
|
15992
15980
|
If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object
|
15993
15981
|
must include one to many tiers with `ending_quantity` and `unit_amount` for
|
15994
|
-
the desired `currencies
|
15982
|
+
the desired `currencies`, or alternatively, `usage_percentage` for usage percentage type usage add ons. There must be one tier with an `ending_quantity`
|
15995
15983
|
of 999999999 which is the default if not provided.
|
15996
15984
|
BillingInfo:
|
15997
15985
|
type: object
|
@@ -16049,14 +16037,14 @@ components:
|
|
16049
16037
|
title: Kount rules
|
16050
16038
|
primary_payment_method:
|
16051
16039
|
type: boolean
|
16052
|
-
description: The `primary_payment_method`
|
16053
|
-
|
16054
|
-
|
16055
|
-
|
16056
|
-
|
16057
|
-
|
16058
|
-
the
|
16059
|
-
|
16040
|
+
description: The `primary_payment_method` field is used to indicate the
|
16041
|
+
primary billing info on the account. The first billing info created on
|
16042
|
+
an account will always become primary. This payment method will be used
|
16043
|
+
backup_payment_method:
|
16044
|
+
type: boolean
|
16045
|
+
description: The `backup_payment_method` field is used to indicate a billing
|
16046
|
+
info as a backup on the account that will be tried if the initial billing
|
16047
|
+
info used for an invoice is declined.
|
16060
16048
|
created_at:
|
16061
16049
|
type: string
|
16062
16050
|
format: date-time
|
@@ -16171,22 +16159,35 @@ components:
|
|
16171
16159
|
a consumer card in Brazil. This would be the customer's CPF, CPF is a
|
16172
16160
|
Brazilian tax identifier for all tax paying residents.
|
16173
16161
|
tax_identifier_type:
|
16174
|
-
type: string
|
16175
|
-
enum:
|
16176
|
-
"$ref": "#/components/schemas/TaxIdentifierTypeEnum"
|
16177
16162
|
description: this field and a value of 'cpf' are required if adding a billing
|
16178
16163
|
info that is an elo or hipercard type in Brazil.
|
16164
|
+
"$ref": "#/components/schemas/TaxIdentifierTypeEnum"
|
16179
16165
|
primary_payment_method:
|
16180
16166
|
type: boolean
|
16181
16167
|
title: Primary Payment Method
|
16182
|
-
description: The `primary_payment_method`
|
16183
|
-
|
16184
|
-
|
16168
|
+
description: The `primary_payment_method` field is used to designate the
|
16169
|
+
primary billing info on the account. The first billing info created on
|
16170
|
+
an account will always become primary. Adding additional billing infos
|
16185
16171
|
provides the flexibility to mark another billing info as primary, or adding
|
16186
16172
|
additional non-primary billing infos. This can be accomplished by passing
|
16187
|
-
the `primary_payment_method`
|
16188
|
-
the billing_info and /accounts endpoints, this value is not
|
16189
|
-
and will return an error if provided.
|
16173
|
+
the `primary_payment_method` with a value of `true`. When adding billing
|
16174
|
+
infos via the billing_info and /accounts endpoints, this value is not
|
16175
|
+
permitted, and will return an error if provided.
|
16176
|
+
backup_payment_method:
|
16177
|
+
type: boolean
|
16178
|
+
description: The `backup_payment_method` field is used to designate a billing
|
16179
|
+
info as a backup on the account that will be tried if the initial billing
|
16180
|
+
info used for an invoice is declined. All payment methods, including the
|
16181
|
+
billing info marked `primary_payment_method` can be set as a backup. An
|
16182
|
+
account can have a maximum of 1 backup, if a user sets a different payment
|
16183
|
+
method as a backup, the existing backup will no longer be marked as such.
|
16184
|
+
BillingInfoVerify:
|
16185
|
+
type: object
|
16186
|
+
properties:
|
16187
|
+
gateway_code:
|
16188
|
+
type: string
|
16189
|
+
description: An identifier for a specific payment gateway.
|
16190
|
+
maxLength: 13
|
16190
16191
|
Coupon:
|
16191
16192
|
type: object
|
16192
16193
|
properties:
|
@@ -17228,7 +17229,8 @@ components:
|
|
17228
17229
|
type: number
|
17229
17230
|
format: float
|
17230
17231
|
title: Subtotal
|
17231
|
-
description: The summation of charges
|
17232
|
+
description: The summation of charges and credits, before discounts and
|
17233
|
+
taxes.
|
17232
17234
|
tax:
|
17233
17235
|
type: number
|
17234
17236
|
format: float
|
@@ -18646,17 +18648,22 @@ components:
|
|
18646
18648
|
ending_quantity:
|
18647
18649
|
type: integer
|
18648
18650
|
title: Ending quantity
|
18651
|
+
description: Ending quantity for the tier. This represents a unit amount
|
18652
|
+
for unit-priced add ons, but for percentage type usage add ons, represents
|
18653
|
+
the site default currency in its minimum divisible unit.
|
18649
18654
|
minimum: 1
|
18650
18655
|
maximum: 999999999
|
18651
18656
|
default: 999999999
|
18657
|
+
usage_percentage:
|
18658
|
+
type: string
|
18659
|
+
title: Usage Percentage
|
18660
|
+
description: Decimal usage percentage.
|
18652
18661
|
currencies:
|
18653
18662
|
type: array
|
18654
18663
|
title: Tier pricing
|
18655
18664
|
items:
|
18656
18665
|
"$ref": "#/components/schemas/TierPricing"
|
18657
18666
|
minItems: 1
|
18658
|
-
required:
|
18659
|
-
- currencies
|
18660
18667
|
Settings:
|
18661
18668
|
type: object
|
18662
18669
|
properties:
|
@@ -19496,13 +19503,23 @@ components:
|
|
19496
19503
|
minimum: 0
|
19497
19504
|
maximum: 1000000
|
19498
19505
|
description: Allows up to 2 decimal places. Optionally, override the tiers'
|
19499
|
-
default unit amount.
|
19506
|
+
default unit amount. If add-on's `add_on_type` is `usage` and `usage_type`
|
19507
|
+
is `percentage`, cannot be provided.
|
19500
19508
|
unit_amount_decimal:
|
19501
19509
|
type: string
|
19502
19510
|
title: Unit amount decimal
|
19503
19511
|
description: |
|
19504
19512
|
Allows up to 9 decimal places. Optionally, override tiers' default unit amount.
|
19505
19513
|
If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
|
19514
|
+
If add-on's `add_on_type` is `usage` and `usage_type` is `percentage`, cannot be provided.
|
19515
|
+
usage_percentage:
|
19516
|
+
type: string
|
19517
|
+
title: Usage Percentage
|
19518
|
+
description: The percentage taken of the monetary amount of usage tracked.
|
19519
|
+
This can be up to 4 decimal places represented as a string. A value between
|
19520
|
+
0.0 and 100.0. Optionally, override tiers' default usage percentage. Required
|
19521
|
+
if add-on's `add_on_type` is `usage` and `usage_type` is `percentage`.
|
19522
|
+
Must be omitted otherwise.
|
19506
19523
|
SubscriptionCancel:
|
19507
19524
|
type: object
|
19508
19525
|
properties:
|
@@ -19580,6 +19597,18 @@ components:
|
|
19580
19597
|
format: date-time
|
19581
19598
|
title: Deleted at
|
19582
19599
|
readOnly: true
|
19600
|
+
billing_info:
|
19601
|
+
"$ref": "#/components/schemas/SubscriptionChangeBillingInfo"
|
19602
|
+
SubscriptionChangeBillingInfo:
|
19603
|
+
type: object
|
19604
|
+
description: Accept nested attributes for three_d_secure_action_result_token_id
|
19605
|
+
properties:
|
19606
|
+
three_d_secure_action_result_token_id:
|
19607
|
+
type: string
|
19608
|
+
title: 3-D Secure action result token ID
|
19609
|
+
description: A token generated by Recurly.js after completing a 3-D Secure
|
19610
|
+
device fingerprinting or authentication challenge.
|
19611
|
+
maxLength: 22
|
19583
19612
|
SubscriptionChangeCreate:
|
19584
19613
|
type: object
|
19585
19614
|
properties:
|
@@ -19880,8 +19909,8 @@ components:
|
|
19880
19909
|
format: float
|
19881
19910
|
title: Custom subscription pricing
|
19882
19911
|
description: Override the unit amount of the subscription plan by setting
|
19883
|
-
this value
|
19884
|
-
|
19912
|
+
this value. If not provided, the subscription will inherit the price from
|
19913
|
+
the subscription plan for the provided currency.
|
19885
19914
|
minimum: 0
|
19886
19915
|
maximum: 1000000
|
19887
19916
|
quantity:
|
@@ -20135,6 +20164,38 @@ components:
|
|
20135
20164
|
type: number
|
20136
20165
|
format: float
|
20137
20166
|
title: Rate
|
20167
|
+
tax_details:
|
20168
|
+
type: array
|
20169
|
+
items:
|
20170
|
+
"$ref": "#/components/schemas/TaxDetail"
|
20171
|
+
TaxDetail:
|
20172
|
+
type: object
|
20173
|
+
title: Tax info
|
20174
|
+
description: Provides additional tax details for Canadian Sales Tax when there
|
20175
|
+
is tax applied at both the country and province levels. This will only be
|
20176
|
+
populated for the Invoice response when fetching a single invoice and not
|
20177
|
+
for the InvoiceList or LineItem.
|
20178
|
+
properties:
|
20179
|
+
type:
|
20180
|
+
type: string
|
20181
|
+
title: Type
|
20182
|
+
description: Provides the tax type for the region. For Canadian Sales Tax,
|
20183
|
+
this will be GST, HST, QST or PST.
|
20184
|
+
region:
|
20185
|
+
type: string
|
20186
|
+
title: Region
|
20187
|
+
description: Provides the tax region applied on an invoice. For Canadian
|
20188
|
+
Sales Tax, this will be either the 2 letter province code or country code.
|
20189
|
+
rate:
|
20190
|
+
type: number
|
20191
|
+
format: float
|
20192
|
+
title: Rate
|
20193
|
+
description: Provides the tax rate for the region.
|
20194
|
+
tax:
|
20195
|
+
type: number
|
20196
|
+
format: float
|
20197
|
+
title: Tax
|
20198
|
+
description: The total tax applied for this tax type.
|
20138
20199
|
Transaction:
|
20139
20200
|
type: object
|
20140
20201
|
properties:
|
@@ -20205,6 +20266,10 @@ components:
|
|
20205
20266
|
type: boolean
|
20206
20267
|
title: Success?
|
20207
20268
|
description: Did this transaction complete successfully?
|
20269
|
+
backup_payment_method_used:
|
20270
|
+
type: boolean
|
20271
|
+
title: Backup Payment Method Used?
|
20272
|
+
description: Indicates if the transaction was completed using a backup payment
|
20208
20273
|
refunded:
|
20209
20274
|
type: boolean
|
20210
20275
|
title: Refunded?
|