recurly 4.12.0 → 4.15.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.md +34 -0
- data/GETTING_STARTED.md +9 -1
- data/lib/recurly/client/operations.rb +209 -136
- data/lib/recurly/client.rb +14 -2
- data/lib/recurly/errors/api_errors.rb +2 -0
- data/lib/recurly/requests/account_create.rb +1 -1
- data/lib/recurly/requests/account_purchase.rb +1 -1
- data/lib/recurly/requests/account_update.rb +1 -1
- data/lib/recurly/requests/add_on_create.rb +5 -1
- data/lib/recurly/requests/add_on_update.rb +5 -1
- data/lib/recurly/requests/billing_info_create.rb +8 -0
- data/lib/recurly/requests/percentage_tier.rb +18 -0
- data/lib/recurly/requests/percentage_tiers_by_currency.rb +18 -0
- data/lib/recurly/requests/plan_create.rb +1 -1
- data/lib/recurly/requests/plan_update.rb +1 -1
- data/lib/recurly/requests/subscription_add_on_create.rb +5 -1
- data/lib/recurly/requests/subscription_add_on_percentage_tier.rb +18 -0
- data/lib/recurly/requests/subscription_add_on_tier.rb +1 -1
- data/lib/recurly/requests/subscription_update.rb +1 -1
- data/lib/recurly/requests/tier.rb +2 -2
- data/lib/recurly/resources/account.rb +4 -4
- data/lib/recurly/resources/account_mini.rb +1 -1
- data/lib/recurly/resources/add_on.rb +4 -0
- data/lib/recurly/resources/invoice.rb +5 -1
- data/lib/recurly/resources/invoice_template.rb +34 -0
- data/lib/recurly/resources/percentage_tier.rb +18 -0
- data/lib/recurly/resources/{account_invoice_template.rb → percentage_tiers_by_currency.rb} +7 -7
- data/lib/recurly/resources/plan.rb +1 -1
- data/lib/recurly/resources/subscription_add_on.rb +5 -1
- data/lib/recurly/resources/subscription_add_on_percentage_tier.rb +18 -0
- data/lib/recurly/resources/subscription_add_on_tier.rb +1 -1
- data/lib/recurly/resources/tier.rb +2 -2
- data/lib/recurly/resources/usage.rb +5 -1
- data/lib/recurly/version.rb +1 -1
- data/openapi/api.yaml +552 -71
- metadata +10 -4
data/openapi/api.yaml
CHANGED
@@ -14265,11 +14265,286 @@ paths:
|
|
14265
14265
|
var_dump($e);
|
14266
14266
|
}
|
14267
14267
|
- lang: Go
|
14268
|
-
source: "
|
14269
|
-
|
14270
|
-
{\n\t\
|
14268
|
+
source: "purchaseReq := &recurly.PurchaseCreate{\n\tCurrency: recurly.String(\"USD\"),\n\tAccount:
|
14269
|
+
&recurly.AccountPurchase{\n\t\tCode: recurly.String(account.Code),\n\t},\n\tSubscriptions:
|
14270
|
+
[]recurly.SubscriptionPurchase{\n\t\t{\n\t\t\tPlanCode: recurly.String(plan.Code),\n\t\t\tNextBillDate:
|
14271
|
+
recurly.Time(time.Date(2078, time.November, 10, 23, 0, 0, 0, time.UTC)),\n\t\t},\n\t},\n\tShipping:
|
14272
|
+
&recurly.ShippingPurchase{\n\t\tAddressId: recurly.String(shippingAddressID),\n\t},\n}\ncollection,
|
14273
|
+
err := client.PreviewPurchase(purchaseReq)\nif e, ok := err.(*recurly.Error);
|
14274
|
+
ok {\n\tif e.Type == recurly.ErrorTypeValidation {\n\t\tfmt.Printf(\"Failed
|
14275
|
+
validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected
|
14271
14276
|
Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Preview Charge
|
14272
14277
|
Invoice %v\", collection.ChargeInvoice)"
|
14278
|
+
"/purchases/pending":
|
14279
|
+
post:
|
14280
|
+
tags:
|
14281
|
+
- purchase
|
14282
|
+
operationId: create_pending_purchase
|
14283
|
+
summary: Create a pending purchase
|
14284
|
+
description: |-
|
14285
|
+
A purchase is a hybrid checkout containing at least one or more subscriptions or one-time charges (adjustments) and supports both coupon and gift card redemptions. All items purchased will be on one invoice and paid for with one transaction. A purchase is only a request data type and is not persistent in Recurly and an invoice collection will be the returned type.
|
14286
|
+
|
14287
|
+
Use for **Adyen HPP** and **Online Banking** transaction requests.
|
14288
|
+
This runs the validations but not the transactions.
|
14289
|
+
The API request allows the inclusion of one of the following fields: **external_hpp_type** with `'adyen'` and **online_banking_payment_type** with `'ideal'` or `'sofort'` in the **billing_info** object.
|
14290
|
+
|
14291
|
+
For additional information regarding shipping fees, please see https://docs.recurly.com/docs/shipping
|
14292
|
+
requestBody:
|
14293
|
+
content:
|
14294
|
+
application/json:
|
14295
|
+
schema:
|
14296
|
+
"$ref": "#/components/schemas/PurchaseCreate"
|
14297
|
+
required: true
|
14298
|
+
responses:
|
14299
|
+
'200':
|
14300
|
+
description: Returns the pending invoice
|
14301
|
+
content:
|
14302
|
+
application/json:
|
14303
|
+
schema:
|
14304
|
+
"$ref": "#/components/schemas/InvoiceCollection"
|
14305
|
+
'400':
|
14306
|
+
description: Bad request; perhaps missing or invalid parameters.
|
14307
|
+
content:
|
14308
|
+
application/json:
|
14309
|
+
schema:
|
14310
|
+
"$ref": "#/components/schemas/Error"
|
14311
|
+
'422':
|
14312
|
+
description: Pending purchase cannot be completed for the specified reason.
|
14313
|
+
content:
|
14314
|
+
application/json:
|
14315
|
+
schema:
|
14316
|
+
"$ref": "#/components/schemas/Error"
|
14317
|
+
default:
|
14318
|
+
description: Unexpected error.
|
14319
|
+
content:
|
14320
|
+
application/json:
|
14321
|
+
schema:
|
14322
|
+
"$ref": "#/components/schemas/Error"
|
14323
|
+
x-code-samples:
|
14324
|
+
- lang: Node.js
|
14325
|
+
source: |
|
14326
|
+
try {
|
14327
|
+
const purchaseReq = {
|
14328
|
+
currency: 'EUR',
|
14329
|
+
account: {
|
14330
|
+
code: accountCode,
|
14331
|
+
email: 'example@recurly.com',
|
14332
|
+
billingInfo: {
|
14333
|
+
firstName: 'Benjamin',
|
14334
|
+
lastName: 'Du Monde',
|
14335
|
+
onlineBankingPaymentType: 'ideal'
|
14336
|
+
},
|
14337
|
+
},
|
14338
|
+
lineItems: [
|
14339
|
+
{
|
14340
|
+
currency: 'EUR',
|
14341
|
+
unitAmount: 1000,
|
14342
|
+
type: 'charge'
|
14343
|
+
}
|
14344
|
+
]
|
14345
|
+
};
|
14346
|
+
const invoiceCollection = await client.createPendingPurchase(purchaseReq)
|
14347
|
+
console.log('Created ChargeInvoice with UUID: ', invoiceCollection.chargeInvoice.uuid)
|
14348
|
+
} catch (err) {
|
14349
|
+
if (err instanceof recurly.errors.ValidationError) {
|
14350
|
+
// If the request was not valid, you may want to tell your user
|
14351
|
+
// why. You can find the invalid params and reasons in err.params
|
14352
|
+
console.log('Failed validation', err.params)
|
14353
|
+
} else {
|
14354
|
+
// If we don't know what to do with the err, we should
|
14355
|
+
// probably re-raise and let our web framework and logger handle it
|
14356
|
+
console.log('Unknown Error: ', err)
|
14357
|
+
}
|
14358
|
+
}
|
14359
|
+
- lang: Python
|
14360
|
+
source: |
|
14361
|
+
try:
|
14362
|
+
purchase = {
|
14363
|
+
"currency": "EUR",
|
14364
|
+
"account": {
|
14365
|
+
"code": account_code,
|
14366
|
+
"email": "benjamin@example.com",
|
14367
|
+
"billing_info": {
|
14368
|
+
"first_name": "Benjamin",
|
14369
|
+
"last_name": "Du Monde",
|
14370
|
+
"online_banking_payment_type": "ideal"
|
14371
|
+
}
|
14372
|
+
},
|
14373
|
+
"line_items": [
|
14374
|
+
{
|
14375
|
+
"currency": "EUR",
|
14376
|
+
"unit_amount": 1000,
|
14377
|
+
"type": "charge"
|
14378
|
+
}
|
14379
|
+
],
|
14380
|
+
}
|
14381
|
+
invoice_collection = client.create_pending_purchase(purchase)
|
14382
|
+
print("Created ChargeInvoice with UUID %s" % invoice_collection.charge_invoice.uuid)
|
14383
|
+
except recurly.errors.ValidationError as e:
|
14384
|
+
# If the request was invalid, you may want to tell your user
|
14385
|
+
# why. You can find the invalid params and reasons in e.error.params
|
14386
|
+
print("ValidationError: %s" % e.error.message)
|
14387
|
+
print(e.error.params)
|
14388
|
+
- lang: ".NET"
|
14389
|
+
source: |
|
14390
|
+
try
|
14391
|
+
{
|
14392
|
+
var purchaseReq = new PurchaseCreate()
|
14393
|
+
{
|
14394
|
+
Currency = "EUR",
|
14395
|
+
Account = new AccountPurchase()
|
14396
|
+
{
|
14397
|
+
Code = accountCode,
|
14398
|
+
Email = "benjamin@example.com",
|
14399
|
+
BillingInfo = new BillingInfoCreate()
|
14400
|
+
{
|
14401
|
+
FirstName = "Benjamin",
|
14402
|
+
LastName = "Du Monde",
|
14403
|
+
OnlineBankingPaymentType = OnlineBankingPaymentType.Ideal
|
14404
|
+
}
|
14405
|
+
},
|
14406
|
+
LineItems = new List<LineItemCreate>()
|
14407
|
+
{
|
14408
|
+
new LineItemCreate()
|
14409
|
+
{
|
14410
|
+
Currency = "EUR",
|
14411
|
+
UnitAmount = 1000,
|
14412
|
+
Type = LineItemType.Charge
|
14413
|
+
}
|
14414
|
+
}
|
14415
|
+
};
|
14416
|
+
InvoiceCollection collection = client.CreatePendingPurchase(purchaseReq);
|
14417
|
+
Console.WriteLine($"Created ChargeInvoice with UUID: {collection.ChargeInvoice.Uuid}");
|
14418
|
+
}
|
14419
|
+
catch (Recurly.Errors.Validation ex)
|
14420
|
+
{
|
14421
|
+
// If the request was not valid, you may want to tell your user
|
14422
|
+
// why. You can find the invalid params and reasons in ex.Error.Params
|
14423
|
+
Console.WriteLine($"Failed validation: {ex.Error.Message}");
|
14424
|
+
}
|
14425
|
+
catch (Recurly.Errors.ApiError ex)
|
14426
|
+
{
|
14427
|
+
// Use ApiError to catch a generic error from the API
|
14428
|
+
Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}");
|
14429
|
+
}
|
14430
|
+
- lang: Ruby
|
14431
|
+
source: |
|
14432
|
+
begin
|
14433
|
+
purchase = {
|
14434
|
+
currency: 'EUR',
|
14435
|
+
account: {
|
14436
|
+
code: account_code,
|
14437
|
+
email: 'benjamin@example.com',
|
14438
|
+
billing_info: {
|
14439
|
+
first_name: 'Benjamin',
|
14440
|
+
last_name: 'Du Monde',
|
14441
|
+
online_banking_payment_type: 'ideal'
|
14442
|
+
},
|
14443
|
+
},
|
14444
|
+
line_items: [
|
14445
|
+
{
|
14446
|
+
currency: 'EUR',
|
14447
|
+
unit_amount: 1000,
|
14448
|
+
type: 'charge'
|
14449
|
+
}
|
14450
|
+
]
|
14451
|
+
}
|
14452
|
+
invoice_collection = @client.create_pending_purchase(body: purchase)
|
14453
|
+
puts "Created ChargeInvoice with UUID: #{invoice_collection.charge_invoice.uuid}"
|
14454
|
+
rescue Recurly::Errors::ValidationError => e
|
14455
|
+
# If the request was invalid, you may want to tell your user
|
14456
|
+
# why. You can find the invalid params and reasons in e.recurly_error.params
|
14457
|
+
puts "ValidationError: #{e.recurly_error.params}"
|
14458
|
+
end
|
14459
|
+
- lang: Java
|
14460
|
+
source: |
|
14461
|
+
try {
|
14462
|
+
AccountPurchase account = new AccountPurchase();
|
14463
|
+
account.setCode(accountCode);
|
14464
|
+
account.setEmail("benjamin@example.com");
|
14465
|
+
|
14466
|
+
BillingInfoCreate billingInfo = new BillingInfoCreate();
|
14467
|
+
billingInfo.setFirstName("Benjamin");
|
14468
|
+
billingInfo.setLastName("Du Monde");
|
14469
|
+
billingInfo.setOnlineBankingPaymentType(Constants.OnlineBankingPaymentType.IDEAL);
|
14470
|
+
account.setBillingInfo(billingInfo);
|
14471
|
+
|
14472
|
+
List<LineItemCreate> lineItems = new ArrayList<LineItemCreate>();
|
14473
|
+
LineItemCreate lineItem = new LineItemCreate();
|
14474
|
+
lineItem.setCurrency("EUR");
|
14475
|
+
lineItem.setUnitAmount(new BigDecimal("1000.0"));
|
14476
|
+
lineItem.setType(Constants.LineItemType.CHARGE);
|
14477
|
+
lineItems.add(lineItem);
|
14478
|
+
|
14479
|
+
PurchaseCreate purchase = new PurchaseCreate();
|
14480
|
+
purchase.setCurrency("EUR");
|
14481
|
+
purchase.setAccount(account);
|
14482
|
+
purchase.setLineItems(lineItems);
|
14483
|
+
|
14484
|
+
InvoiceCollection collection = client.createPendingPurchase(purchase);
|
14485
|
+
System.out.println("Created ChargeInvoice with UUID: " + collection.getChargeInvoice().getUuid());
|
14486
|
+
} catch (ValidationException e) {
|
14487
|
+
// If the request was not valid, you may want to tell your user
|
14488
|
+
// why. You can find the invalid params and reasons in e.getError().getParams()
|
14489
|
+
System.out.println("Failed validation: " + e.getError().getMessage());
|
14490
|
+
System.out.println("Params: " + e.getError().getParams());
|
14491
|
+
} catch (TransactionException e) {
|
14492
|
+
TransactionError tError = e.getError().getTransactionError();
|
14493
|
+
if (tError.getCategory() == Constants.ErrorCategory.THREE_D_SECURE_ACTION_REQUIRED) {
|
14494
|
+
String actionTokenId = tError.getThreeDSecureActionTokenId();
|
14495
|
+
System.out.println("Got 3DSecure TransactionError token: " + actionTokenId);
|
14496
|
+
}
|
14497
|
+
}
|
14498
|
+
catch (ApiException e) {
|
14499
|
+
// Use ApiException to catch a generic error from the API
|
14500
|
+
System.out.println("Unexpected Recurly Error: " + e.getError().getMessage());
|
14501
|
+
}
|
14502
|
+
- lang: PHP
|
14503
|
+
source: |
|
14504
|
+
try {
|
14505
|
+
$purchase_create = [
|
14506
|
+
"currency" => "EUR",
|
14507
|
+
"account" => [
|
14508
|
+
"code" => $account_code,
|
14509
|
+
"email" => "benjamin@example.com",
|
14510
|
+
"billing_info" => [
|
14511
|
+
"first_name" => "Benjamin",
|
14512
|
+
"last_name" => "Du Monde",
|
14513
|
+
"online_banking_payment_type" => "ideal"
|
14514
|
+
],
|
14515
|
+
],
|
14516
|
+
"line_items" => [
|
14517
|
+
[
|
14518
|
+
"currency" => "EUR",
|
14519
|
+
"unit_amount" => 1000,
|
14520
|
+
"type" => "charge",
|
14521
|
+
]
|
14522
|
+
]
|
14523
|
+
];
|
14524
|
+
$invoice_collection = $client->createPendingPurchase($purchase_create);
|
14525
|
+
echo 'Created ChargeInvoice with UUID' . $invoice_collection->getChargeInvoice()->getUuid() . PHP_EOL;
|
14526
|
+
} catch (\Recurly\Errors\Validation $e) {
|
14527
|
+
// If the request was not valid, you may want to tell your user
|
14528
|
+
// why. You can find the invalid params and reasons in err.params
|
14529
|
+
var_dump($e);
|
14530
|
+
} catch (\Recurly\RecurlyError $e) {
|
14531
|
+
// If we don't know what to do with the err, we should
|
14532
|
+
// probably re-raise and let our web framework and logger handle it
|
14533
|
+
var_dump($e);
|
14534
|
+
}
|
14535
|
+
- lang: Go
|
14536
|
+
source: "purchaseReq := &recurly.PurchaseCreate{\n\tCurrency: recurly.String(\"EUR\"),\n\tAccount:
|
14537
|
+
&recurly.AccountPurchase{\n\t\tCode: recurly.String(accountCode),\n\t\tEmail:
|
14538
|
+
recurly.String(\"benjamin@example.com\"),\n\t\tBillingInfo: &recurly.BillingInfoCreate{\n\t\t\tFirstName:
|
14539
|
+
\ recurly.String(\"Benjamin\"),\n\t\t\tLastName: recurly.String(\"Du
|
14540
|
+
Monde\"),\n\t\t\tOnlineBankingPaymentType: recurly.String(\"ideal\"),\n\t\t},\n\t},\n\tLineItems:
|
14541
|
+
[]recurly.LineItemCreate{\n\t\t{\n\t\t\tCurrency: recurly.String(\"EUR\"),\n\t\t\tUnitAmount:
|
14542
|
+
recurly.Float(1000),\n\t\t\tType: recurly.String(\"charge\"),\n\t\t},\n\t},\n}\ncollection,
|
14543
|
+
err := client.CreatePendingPurchase(purchaseReq)\nif e, ok := err.(*recurly.Error);
|
14544
|
+
ok {\n\tif e.Type == recurly.ErrorTypeValidation {\n\t\tfmt.Printf(\"Failed
|
14545
|
+
validation: %v\", e)\n\t\treturn nil, err\n\t}\n\n\tfmt.Printf(\"Unexpected
|
14546
|
+
Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfmt.Printf(\"Created ChargeInvoice
|
14547
|
+
with UUID: %s.\\n\", collection.ChargeInvoice.Uuid)\n"
|
14273
14548
|
"/export_dates":
|
14274
14549
|
get:
|
14275
14550
|
tags:
|
@@ -14593,8 +14868,73 @@ paths:
|
|
14593
14868
|
schema:
|
14594
14869
|
"$ref": "#/components/schemas/Error"
|
14595
14870
|
x-code-samples: []
|
14871
|
+
"/invoice_templates":
|
14872
|
+
get:
|
14873
|
+
tags:
|
14874
|
+
- invoice_templates
|
14875
|
+
operationId: list_invoice_templates
|
14876
|
+
summary: Show the invoice templates for a site
|
14877
|
+
description: See the [Pagination Guide](/guides/pagination.html) to learn how
|
14878
|
+
to use pagination in the API and Client Libraries.
|
14879
|
+
parameters:
|
14880
|
+
- "$ref": "#/components/parameters/sort_dates"
|
14881
|
+
responses:
|
14882
|
+
'200':
|
14883
|
+
description: A list of the the invoice templates on a site.
|
14884
|
+
content:
|
14885
|
+
application/json:
|
14886
|
+
schema:
|
14887
|
+
"$ref": "#/components/schemas/InvoiceTemplateList"
|
14888
|
+
'404':
|
14889
|
+
description: Incorrect site.
|
14890
|
+
content:
|
14891
|
+
application/json:
|
14892
|
+
schema:
|
14893
|
+
"$ref": "#/components/schemas/Error"
|
14894
|
+
default:
|
14895
|
+
description: Unexpected error.
|
14896
|
+
content:
|
14897
|
+
application/json:
|
14898
|
+
schema:
|
14899
|
+
"$ref": "#/components/schemas/Error"
|
14900
|
+
x-code-samples: []
|
14901
|
+
"/invoice_templates/{invoice_template_id}":
|
14902
|
+
parameters:
|
14903
|
+
- "$ref": "#/components/parameters/invoice_template_id"
|
14904
|
+
get:
|
14905
|
+
tags:
|
14906
|
+
- invoice_templates
|
14907
|
+
operationId: get_invoice_template
|
14908
|
+
summary: Show the settings for an invoice template
|
14909
|
+
responses:
|
14910
|
+
'200':
|
14911
|
+
description: Settings for an invoice template.
|
14912
|
+
content:
|
14913
|
+
application/json:
|
14914
|
+
schema:
|
14915
|
+
"$ref": "#/components/schemas/InvoiceTemplate"
|
14916
|
+
'400':
|
14917
|
+
description: Bad request; perhaps missing or invalid parameters.
|
14918
|
+
content:
|
14919
|
+
application/json:
|
14920
|
+
schema:
|
14921
|
+
"$ref": "#/components/schemas/Error"
|
14922
|
+
'404':
|
14923
|
+
description: Incorrect site or invoice template ID.
|
14924
|
+
content:
|
14925
|
+
application/json:
|
14926
|
+
schema:
|
14927
|
+
"$ref": "#/components/schemas/Error"
|
14928
|
+
default:
|
14929
|
+
description: Unexpected error.
|
14930
|
+
content:
|
14931
|
+
application/json:
|
14932
|
+
schema:
|
14933
|
+
"$ref": "#/components/schemas/Error"
|
14934
|
+
x-code-samples: []
|
14596
14935
|
servers:
|
14597
14936
|
- url: https://v3.recurly.com
|
14937
|
+
- url: https://v3.eu.recurly.com
|
14598
14938
|
components:
|
14599
14939
|
parameters:
|
14600
14940
|
site_id:
|
@@ -14662,7 +15002,8 @@ components:
|
|
14662
15002
|
invoice_template_id:
|
14663
15003
|
name: invoice_template_id
|
14664
15004
|
in: path
|
14665
|
-
description: Invoice template ID.
|
15005
|
+
description: Invoice template ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`.
|
15006
|
+
For code use prefix `code-`, e.g. `code-bob`.
|
14666
15007
|
required: true
|
14667
15008
|
schema:
|
14668
15009
|
type: string
|
@@ -15503,11 +15844,10 @@ components:
|
|
15503
15844
|
dunning_campaign_id:
|
15504
15845
|
type: string
|
15505
15846
|
title: Dunning Campaign ID
|
15506
|
-
description: Unique ID to identify a dunning campaign.
|
15507
|
-
|
15508
|
-
|
15509
|
-
|
15510
|
-
always be used.
|
15847
|
+
description: Unique ID to identify a dunning campaign. Used to specify if
|
15848
|
+
a non-default dunning campaign should be assigned to this account. For
|
15849
|
+
sites without multiple dunning campaigns enabled, the default dunning
|
15850
|
+
campaign will always be used.
|
15511
15851
|
invoice_template_id:
|
15512
15852
|
type: string
|
15513
15853
|
title: Invoice Template ID
|
@@ -15587,19 +15927,24 @@ components:
|
|
15587
15927
|
dunning_campaign_id:
|
15588
15928
|
type: string
|
15589
15929
|
title: Dunning Campaign ID
|
15590
|
-
description: Unique ID to identify a dunning campaign.
|
15591
|
-
|
15592
|
-
|
15593
|
-
|
15594
|
-
|
15930
|
+
description: Unique ID to identify a dunning campaign. Used to specify if
|
15931
|
+
a non-default dunning campaign should be assigned to this account. For
|
15932
|
+
sites without multiple dunning campaigns enabled, the default dunning
|
15933
|
+
campaign will always be used.
|
15934
|
+
invoice_template_id:
|
15935
|
+
type: string
|
15936
|
+
title: Invoice Template ID
|
15937
|
+
description: Unique ID to identify an invoice template. Available when the
|
15938
|
+
Invoice Customization feature is enabled. Used to specify if a non-default
|
15939
|
+
invoice template will be used to generate invoices for the account. For
|
15940
|
+
sites without multiple invoice templates enabled, the default template
|
15941
|
+
will always be used.
|
15595
15942
|
address:
|
15596
15943
|
"$ref": "#/components/schemas/Address"
|
15597
15944
|
billing_info:
|
15598
15945
|
"$ref": "#/components/schemas/BillingInfo"
|
15599
15946
|
custom_fields:
|
15600
15947
|
"$ref": "#/components/schemas/CustomFields"
|
15601
|
-
invoice_template:
|
15602
|
-
"$ref": "#/components/schemas/AccountInvoiceTemplate"
|
15603
15948
|
AccountNote:
|
15604
15949
|
type: object
|
15605
15950
|
required:
|
@@ -15662,11 +16007,10 @@ components:
|
|
15662
16007
|
dunning_campaign_id:
|
15663
16008
|
type: string
|
15664
16009
|
title: Dunning Campaign ID
|
15665
|
-
description: Unique ID to identify a dunning campaign.
|
15666
|
-
|
15667
|
-
|
15668
|
-
|
15669
|
-
always be used.
|
16010
|
+
description: Unique ID to identify a dunning campaign. Used to specify if
|
16011
|
+
a non-default dunning campaign should be assigned to this account. For
|
16012
|
+
sites without multiple dunning campaigns enabled, the default dunning
|
16013
|
+
campaign will always be used.
|
15670
16014
|
AccountBalance:
|
15671
16015
|
type: object
|
15672
16016
|
properties:
|
@@ -15696,20 +16040,6 @@ components:
|
|
15696
16040
|
format: float
|
15697
16041
|
title: Amount
|
15698
16042
|
description: Total amount the account is past due.
|
15699
|
-
AccountInvoiceTemplate:
|
15700
|
-
type: object
|
15701
|
-
title: Invoice Template
|
15702
|
-
description: Invoice template associated to the account. Available when invoice
|
15703
|
-
customization flag is enabled.
|
15704
|
-
properties:
|
15705
|
-
id:
|
15706
|
-
type: string
|
15707
|
-
title: ID
|
15708
|
-
description: Unique ID to identify the invoice template.
|
15709
|
-
name:
|
15710
|
-
type: string
|
15711
|
-
title: Name
|
15712
|
-
description: Template name
|
15713
16043
|
InvoiceAddress:
|
15714
16044
|
allOf:
|
15715
16045
|
- "$ref": "#/components/schemas/Address"
|
@@ -15940,6 +16270,11 @@ components:
|
|
15940
16270
|
title: Tiers
|
15941
16271
|
items:
|
15942
16272
|
"$ref": "#/components/schemas/Tier"
|
16273
|
+
percentage_tiers:
|
16274
|
+
type: array
|
16275
|
+
title: Percentage Tiers
|
16276
|
+
items:
|
16277
|
+
"$ref": "#/components/schemas/PercentageTiersByCurrency"
|
15943
16278
|
external_sku:
|
15944
16279
|
type: string
|
15945
16280
|
title: External SKU
|
@@ -16116,8 +16451,17 @@ components:
|
|
16116
16451
|
description: |
|
16117
16452
|
If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object
|
16118
16453
|
must include one to many tiers with `ending_quantity` and `unit_amount` for
|
16119
|
-
the desired `currencies
|
16454
|
+
the desired `currencies`. There must be one tier with an `ending_quantity`
|
16120
16455
|
of 999999999 which is the default if not provided.
|
16456
|
+
percentage_tiers:
|
16457
|
+
type: array
|
16458
|
+
title: Percentage Tiers By Currency
|
16459
|
+
items:
|
16460
|
+
"$ref": "#/components/schemas/PercentageTiersByCurrency"
|
16461
|
+
description: |
|
16462
|
+
Array of objects which must have at least one set of tiers
|
16463
|
+
per currency and the currency code. The tier_type must be `volume` or `tiered`,
|
16464
|
+
if not, it must be absent. There must be one tier without ending_amount value.
|
16121
16465
|
required:
|
16122
16466
|
- code
|
16123
16467
|
- name
|
@@ -16245,8 +16589,17 @@ components:
|
|
16245
16589
|
description: |
|
16246
16590
|
If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object
|
16247
16591
|
must include one to many tiers with `ending_quantity` and `unit_amount` for
|
16248
|
-
the desired `currencies
|
16249
|
-
|
16592
|
+
the desired `currencies`. There must be one tier without an `ending_quantity` value
|
16593
|
+
that represents the final tier.
|
16594
|
+
percentage_tiers:
|
16595
|
+
type: array
|
16596
|
+
title: Percentage Tiers By Currency
|
16597
|
+
items:
|
16598
|
+
"$ref": "#/components/schemas/PercentageTiersByCurrency"
|
16599
|
+
description: |
|
16600
|
+
`percentage_tiers` is an array of objects, which must have the set of tiers
|
16601
|
+
per currency and the currency code. The tier_type must be `volume` or `tiered`,
|
16602
|
+
if not, it must be absent.
|
16250
16603
|
BillingInfo:
|
16251
16604
|
type: object
|
16252
16605
|
properties:
|
@@ -16471,6 +16824,10 @@ components:
|
|
16471
16824
|
billing info marked `primary_payment_method` can be set as a backup. An
|
16472
16825
|
account can have a maximum of 1 backup, if a user sets a different payment
|
16473
16826
|
method as a backup, the existing backup will no longer be marked as such.
|
16827
|
+
external_hpp_type:
|
16828
|
+
"$ref": "#/components/schemas/ExternalHppTypeEnum"
|
16829
|
+
online_banking_payment_type:
|
16830
|
+
"$ref": "#/components/schemas/OnlineBankingPaymentTypeEnum"
|
16474
16831
|
BillingInfoVerify:
|
16475
16832
|
type: object
|
16476
16833
|
properties:
|
@@ -17429,6 +17786,10 @@ components:
|
|
17429
17786
|
type: string
|
17430
17787
|
title: Invoice ID
|
17431
17788
|
readOnly: true
|
17789
|
+
uuid:
|
17790
|
+
type: string
|
17791
|
+
title: Invoice UUID
|
17792
|
+
readOnly: true
|
17432
17793
|
object:
|
17433
17794
|
type: string
|
17434
17795
|
title: Object type
|
@@ -17624,9 +17985,8 @@ components:
|
|
17624
17985
|
type: string
|
17625
17986
|
title: Dunning Campaign ID
|
17626
17987
|
description: Unique ID to identify the dunning campaign used when dunning
|
17627
|
-
the invoice.
|
17628
|
-
|
17629
|
-
be the default dunning campaign.
|
17988
|
+
the invoice. For sites without multiple dunning campaigns enabled, this
|
17989
|
+
will always be the default dunning campaign.
|
17630
17990
|
InvoiceCreate:
|
17631
17991
|
type: object
|
17632
17992
|
properties:
|
@@ -18556,11 +18916,10 @@ components:
|
|
18556
18916
|
dunning_campaign_id:
|
18557
18917
|
type: string
|
18558
18918
|
title: Dunning Campaign ID
|
18559
|
-
description: Unique ID to identify a dunning campaign.
|
18560
|
-
|
18561
|
-
|
18562
|
-
|
18563
|
-
used.
|
18919
|
+
description: Unique ID to identify a dunning campaign. Used to specify if
|
18920
|
+
a non-default dunning campaign should be assigned to this plan. For sites
|
18921
|
+
without multiple dunning campaigns enabled, the default dunning campaign
|
18922
|
+
will always be used.
|
18564
18923
|
created_at:
|
18565
18924
|
type: string
|
18566
18925
|
format: date-time
|
@@ -18720,11 +19079,10 @@ components:
|
|
18720
19079
|
dunning_campaign_id:
|
18721
19080
|
type: string
|
18722
19081
|
title: Dunning Campaign ID
|
18723
|
-
description: Unique ID to identify a dunning campaign.
|
18724
|
-
|
18725
|
-
|
18726
|
-
|
18727
|
-
used.
|
19082
|
+
description: Unique ID to identify a dunning campaign. Used to specify if
|
19083
|
+
a non-default dunning campaign should be assigned to this plan. For sites
|
19084
|
+
without multiple dunning campaigns enabled, the default dunning campaign
|
19085
|
+
will always be used.
|
18728
19086
|
required:
|
18729
19087
|
- code
|
18730
19088
|
- name
|
@@ -18911,11 +19269,10 @@ components:
|
|
18911
19269
|
dunning_campaign_id:
|
18912
19270
|
type: string
|
18913
19271
|
title: Dunning Campaign ID
|
18914
|
-
description: Unique ID to identify a dunning campaign.
|
18915
|
-
|
18916
|
-
|
18917
|
-
|
18918
|
-
used.
|
19272
|
+
description: Unique ID to identify a dunning campaign. Used to specify if
|
19273
|
+
a non-default dunning campaign should be assigned to this plan. For sites
|
19274
|
+
without multiple dunning campaigns enabled, the default dunning campaign
|
19275
|
+
will always be used.
|
18919
19276
|
AddOnPricing:
|
18920
19277
|
type: object
|
18921
19278
|
properties:
|
@@ -19006,21 +19363,50 @@ components:
|
|
19006
19363
|
type: integer
|
19007
19364
|
title: Ending quantity
|
19008
19365
|
description: Ending quantity for the tier. This represents a unit amount
|
19009
|
-
for unit-priced add ons
|
19010
|
-
the site default currency in its minimum divisible unit.
|
19366
|
+
for unit-priced add ons.
|
19011
19367
|
minimum: 1
|
19012
19368
|
maximum: 999999999
|
19013
19369
|
default: 999999999
|
19014
19370
|
usage_percentage:
|
19015
19371
|
type: string
|
19016
19372
|
title: Usage Percentage
|
19017
|
-
description:
|
19373
|
+
description: "(deprecated) -- Use the percentage_tiers object instead."
|
19374
|
+
deprecated: true
|
19018
19375
|
currencies:
|
19019
19376
|
type: array
|
19020
19377
|
title: Tier pricing
|
19021
19378
|
items:
|
19022
19379
|
"$ref": "#/components/schemas/TierPricing"
|
19023
19380
|
minItems: 1
|
19381
|
+
PercentageTiersByCurrency:
|
19382
|
+
type: object
|
19383
|
+
properties:
|
19384
|
+
currency:
|
19385
|
+
type: string
|
19386
|
+
title: Currency
|
19387
|
+
description: 3-letter ISO 4217 currency code.
|
19388
|
+
maxLength: 3
|
19389
|
+
tiers:
|
19390
|
+
type: array
|
19391
|
+
title: Tiers
|
19392
|
+
items:
|
19393
|
+
"$ref": "#/components/schemas/PercentageTier"
|
19394
|
+
minItems: 1
|
19395
|
+
PercentageTier:
|
19396
|
+
type: object
|
19397
|
+
properties:
|
19398
|
+
ending_amount:
|
19399
|
+
type: number
|
19400
|
+
format: float
|
19401
|
+
title: Ending amount
|
19402
|
+
minimum: 0.1
|
19403
|
+
maximum: 9999999999999
|
19404
|
+
description: Ending amount for the tier. Allows up to 2 decimal places.
|
19405
|
+
The last tier ending_amount is null.
|
19406
|
+
usage_percentage:
|
19407
|
+
type: string
|
19408
|
+
title: Usage Percentage
|
19409
|
+
description: Decimal usage percentage.
|
19024
19410
|
Settings:
|
19025
19411
|
type: object
|
19026
19412
|
properties:
|
@@ -19713,7 +20099,18 @@ components:
|
|
19713
20099
|
minItems: 1
|
19714
20100
|
description: |
|
19715
20101
|
If tiers are provided in the request, all existing tiers on the Subscription Add-on will be
|
19716
|
-
removed and replaced by the tiers in the request.
|
20102
|
+
removed and replaced by the tiers in the request. If add_on.tier_type is tiered or volume and
|
20103
|
+
add_on.usage_type is percentage use percentage_tiers instead.
|
20104
|
+
percentage_tiers:
|
20105
|
+
type: array
|
20106
|
+
title: Percentage Tiers
|
20107
|
+
items:
|
20108
|
+
"$ref": "#/components/schemas/SubscriptionAddOnPercentageTier"
|
20109
|
+
minItems: 1
|
20110
|
+
description: |
|
20111
|
+
If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be
|
20112
|
+
removed and replaced by the percentage tiers in the request. Use only if add_on.tier_type is tiered or volume and
|
20113
|
+
add_on.usage_type is percentage
|
19717
20114
|
usage_percentage:
|
19718
20115
|
type: number
|
19719
20116
|
format: float
|
@@ -19779,9 +20176,19 @@ components:
|
|
19779
20176
|
description: |
|
19780
20177
|
If the plan add-on's `tier_type` is `flat`, then `tiers` must be absent. The `tiers` object
|
19781
20178
|
must include one to many tiers with `ending_quantity` and `unit_amount`.
|
19782
|
-
There must be one tier
|
19783
|
-
|
20179
|
+
There must be one tier without ending_quantity value.
|
20180
|
+
See our [Guide](https://developers.recurly.com/guides/item-addon-guide.html)
|
19784
20181
|
for an overview of how to configure quantity-based pricing models.
|
20182
|
+
percentage_tiers:
|
20183
|
+
type: array
|
20184
|
+
title: Percentage Tiers
|
20185
|
+
items:
|
20186
|
+
"$ref": "#/components/schemas/SubscriptionAddOnPercentageTier"
|
20187
|
+
minItems: 1
|
20188
|
+
description: |
|
20189
|
+
If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be
|
20190
|
+
removed and replaced by the percentage tiers in the request. There must be one tier without ending_amount value.
|
20191
|
+
Use only if add_on.tier_type is tiered or volume and add_on.usage_type is percentage.
|
19785
20192
|
usage_percentage:
|
19786
20193
|
type: number
|
19787
20194
|
format: float
|
@@ -19868,7 +20275,7 @@ components:
|
|
19868
20275
|
title: Ending quantity
|
19869
20276
|
minimum: 1
|
19870
20277
|
maximum: 999999999
|
19871
|
-
default:
|
20278
|
+
default:
|
19872
20279
|
unit_amount:
|
19873
20280
|
type: number
|
19874
20281
|
format: float
|
@@ -19888,11 +20295,25 @@ components:
|
|
19888
20295
|
usage_percentage:
|
19889
20296
|
type: string
|
19890
20297
|
title: Usage Percentage
|
19891
|
-
description:
|
20298
|
+
description: "(deprecated) -- Use the percentage_tiers object instead."
|
20299
|
+
deprecated: true
|
20300
|
+
SubscriptionAddOnPercentageTier:
|
20301
|
+
type: object
|
20302
|
+
properties:
|
20303
|
+
ending_amount:
|
20304
|
+
type: number
|
20305
|
+
format: float
|
20306
|
+
title: Ending amount
|
20307
|
+
minimum: 1
|
20308
|
+
maximum: 9999999999999.99
|
20309
|
+
default:
|
20310
|
+
usage_percentage:
|
20311
|
+
type: string
|
20312
|
+
title: Usage Percentage
|
20313
|
+
description: |
|
20314
|
+
The percentage taken of the monetary amount of usage tracked.
|
19892
20315
|
This can be up to 4 decimal places represented as a string. A value between
|
19893
|
-
0.0 and 100.0.
|
19894
|
-
if add-on's `add_on_type` is `usage` and `usage_type` is `percentage`.
|
19895
|
-
Must be omitted otherwise.
|
20316
|
+
0.0 and 100.0.
|
19896
20317
|
SubscriptionCancel:
|
19897
20318
|
type: object
|
19898
20319
|
properties:
|
@@ -20472,9 +20893,10 @@ components:
|
|
20472
20893
|
type: boolean
|
20473
20894
|
title: Tax Inclusive?
|
20474
20895
|
default: false
|
20475
|
-
description:
|
20476
|
-
|
20477
|
-
|
20896
|
+
description: This field is deprecated. Do not use it anymore to update a
|
20897
|
+
subscription's tax inclusivity. Use the POST subscription change route
|
20898
|
+
instead.
|
20899
|
+
deprecated: true
|
20478
20900
|
shipping:
|
20479
20901
|
"$ref": "#/components/schemas/SubscriptionShippingUpdate"
|
20480
20902
|
billing_info_id:
|
@@ -20955,7 +21377,14 @@ components:
|
|
20955
21377
|
items:
|
20956
21378
|
"$ref": "#/components/schemas/SubscriptionAddOnTier"
|
20957
21379
|
description: The tiers and prices of the subscription based on the usage_timestamp.
|
20958
|
-
If tier_type = flat, tiers =
|
21380
|
+
If tier_type = flat, tiers = []
|
21381
|
+
percentage_tiers:
|
21382
|
+
type: array
|
21383
|
+
title: Percentage Tiers
|
21384
|
+
items:
|
21385
|
+
"$ref": "#/components/schemas/SubscriptionAddOnPercentageTier"
|
21386
|
+
description: The percentage tiers of the subscription based on the usage_timestamp.
|
21387
|
+
If tier_type = flat, percentage_tiers = []
|
20959
21388
|
measured_unit_id:
|
20960
21389
|
type: string
|
20961
21390
|
description: The ID of the measured unit associated with the add-on the
|
@@ -21327,6 +21756,46 @@ components:
|
|
21327
21756
|
maxItems: 200
|
21328
21757
|
items:
|
21329
21758
|
"$ref": "#/components/schemas/Plan"
|
21759
|
+
InvoiceTemplateList:
|
21760
|
+
type: object
|
21761
|
+
properties:
|
21762
|
+
object:
|
21763
|
+
type: string
|
21764
|
+
title: Object type
|
21765
|
+
description: Will always be List.
|
21766
|
+
has_more:
|
21767
|
+
type: boolean
|
21768
|
+
description: Indicates there are more results on subsequent pages.
|
21769
|
+
next:
|
21770
|
+
type: string
|
21771
|
+
description: Path to subsequent page of results.
|
21772
|
+
data:
|
21773
|
+
type: array
|
21774
|
+
items:
|
21775
|
+
"$ref": "#/components/schemas/InvoiceTemplate"
|
21776
|
+
InvoiceTemplate:
|
21777
|
+
type: object
|
21778
|
+
description: Settings for an invoice template.
|
21779
|
+
properties:
|
21780
|
+
id:
|
21781
|
+
type: string
|
21782
|
+
code:
|
21783
|
+
type: string
|
21784
|
+
description: Invoice template code.
|
21785
|
+
name:
|
21786
|
+
type: string
|
21787
|
+
description: Invoice template name.
|
21788
|
+
description:
|
21789
|
+
type: string
|
21790
|
+
description: Invoice template description.
|
21791
|
+
created_at:
|
21792
|
+
type: string
|
21793
|
+
format: date-time
|
21794
|
+
description: When the invoice template was created in Recurly.
|
21795
|
+
updated_at:
|
21796
|
+
type: string
|
21797
|
+
format: date-time
|
21798
|
+
description: When the invoice template was updated in Recurly.
|
21330
21799
|
PaymentMethod:
|
21331
21800
|
properties:
|
21332
21801
|
object:
|
@@ -22001,6 +22470,7 @@ components:
|
|
22001
22470
|
- rate_limited
|
22002
22471
|
- service_not_available
|
22003
22472
|
- simultaneous_request
|
22473
|
+
- tax_service_error
|
22004
22474
|
- transaction
|
22005
22475
|
- unauthorized
|
22006
22476
|
- unavailable_in_api_version
|
@@ -22244,3 +22714,14 @@ components:
|
|
22244
22714
|
enum:
|
22245
22715
|
- checking
|
22246
22716
|
- savings
|
22717
|
+
ExternalHppTypeEnum:
|
22718
|
+
type: string
|
22719
|
+
description: Use for Adyen HPP billing info.
|
22720
|
+
enum:
|
22721
|
+
- adyen
|
22722
|
+
OnlineBankingPaymentTypeEnum:
|
22723
|
+
type: string
|
22724
|
+
description: Use for Online Banking billing info.
|
22725
|
+
enum:
|
22726
|
+
- ideal
|
22727
|
+
- sofort
|