recurly 4.13.0 → 4.14.0

Sign up to get free protection for your applications and to get access to all the features.
data/openapi/api.yaml CHANGED
@@ -14265,11 +14265,286 @@ paths:
14265
14265
  var_dump($e);
14266
14266
  }
14267
14267
  - lang: Go
14268
- source: "collection, err := client.PreviewPurchase(purchaseReq)\nif e, ok
14269
- := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeValidation
14270
- {\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected
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. Available when the
15507
- Dunning Campaigns feature is enabled. Used to specify if a non-default
15508
- dunning campaign should be assigned to this account. For sites without
15509
- multiple dunning campaigns enabled, the default dunning campaign will
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. Available when the
15591
- Dunning Campaigns feature is enabled. Used to specify if a non-default
15592
- dunning campaign should be assigned to this account. For sites without
15593
- multiple dunning campaigns enabled, the default dunning campaign will
15594
- always be used.
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. Available when the
15666
- Dunning Campaigns feature is enabled. Used to specify if a non-default
15667
- dunning campaign should be assigned to this account. For sites without
15668
- multiple dunning campaigns enabled, the default dunning campaign will
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
@@ -16471,6 +16806,10 @@ components:
16471
16806
  billing info marked `primary_payment_method` can be set as a backup. An
16472
16807
  account can have a maximum of 1 backup, if a user sets a different payment
16473
16808
  method as a backup, the existing backup will no longer be marked as such.
16809
+ external_hpp_type:
16810
+ "$ref": "#/components/schemas/ExternalHppTypeEnum"
16811
+ online_banking_payment_type:
16812
+ "$ref": "#/components/schemas/OnlineBankingPaymentTypeEnum"
16474
16813
  BillingInfoVerify:
16475
16814
  type: object
16476
16815
  properties:
@@ -17429,6 +17768,10 @@ components:
17429
17768
  type: string
17430
17769
  title: Invoice ID
17431
17770
  readOnly: true
17771
+ uuid:
17772
+ type: string
17773
+ title: Invoice UUID
17774
+ readOnly: true
17432
17775
  object:
17433
17776
  type: string
17434
17777
  title: Object type
@@ -17624,9 +17967,8 @@ components:
17624
17967
  type: string
17625
17968
  title: Dunning Campaign ID
17626
17969
  description: Unique ID to identify the dunning campaign used when dunning
17627
- the invoice. Available when the Dunning Campaigns feature is enabled.
17628
- For sites without multiple dunning campaigns enabled, this will always
17629
- be the default dunning campaign.
17970
+ the invoice. For sites without multiple dunning campaigns enabled, this
17971
+ will always be the default dunning campaign.
17630
17972
  InvoiceCreate:
17631
17973
  type: object
17632
17974
  properties:
@@ -18556,11 +18898,10 @@ components:
18556
18898
  dunning_campaign_id:
18557
18899
  type: string
18558
18900
  title: Dunning Campaign ID
18559
- description: Unique ID to identify a dunning campaign. Available when the
18560
- Dunning Campaigns feature is enabled. Used to specify if a non-default
18561
- dunning campaign should be assigned to this plan. For sites without multiple
18562
- dunning campaigns enabled, the default dunning campaign will always be
18563
- used.
18901
+ description: Unique ID to identify a dunning campaign. Used to specify if
18902
+ a non-default dunning campaign should be assigned to this plan. For sites
18903
+ without multiple dunning campaigns enabled, the default dunning campaign
18904
+ will always be used.
18564
18905
  created_at:
18565
18906
  type: string
18566
18907
  format: date-time
@@ -18720,11 +19061,10 @@ components:
18720
19061
  dunning_campaign_id:
18721
19062
  type: string
18722
19063
  title: Dunning Campaign ID
18723
- description: Unique ID to identify a dunning campaign. Available when the
18724
- Dunning Campaigns feature is enabled. Used to specify if a non-default
18725
- dunning campaign should be assigned to this plan. For sites without multiple
18726
- dunning campaigns enabled, the default dunning campaign will always be
18727
- used.
19064
+ description: Unique ID to identify a dunning campaign. Used to specify if
19065
+ a non-default dunning campaign should be assigned to this plan. For sites
19066
+ without multiple dunning campaigns enabled, the default dunning campaign
19067
+ will always be used.
18728
19068
  required:
18729
19069
  - code
18730
19070
  - name
@@ -18911,11 +19251,10 @@ components:
18911
19251
  dunning_campaign_id:
18912
19252
  type: string
18913
19253
  title: Dunning Campaign ID
18914
- description: Unique ID to identify a dunning campaign. Available when the
18915
- Dunning Campaigns feature is enabled. Used to specify if a non-default
18916
- dunning campaign should be assigned to this plan. For sites without multiple
18917
- dunning campaigns enabled, the default dunning campaign will always be
18918
- used.
19254
+ description: Unique ID to identify a dunning campaign. Used to specify if
19255
+ a non-default dunning campaign should be assigned to this plan. For sites
19256
+ without multiple dunning campaigns enabled, the default dunning campaign
19257
+ will always be used.
18919
19258
  AddOnPricing:
18920
19259
  type: object
18921
19260
  properties:
@@ -19014,13 +19353,44 @@ components:
19014
19353
  usage_percentage:
19015
19354
  type: string
19016
19355
  title: Usage Percentage
19017
- description: Decimal usage percentage.
19356
+ description: This field is deprecated. Do not used it anymore for percentage
19357
+ tiers add ons. Use the percentage_tiers object instead.
19358
+ deprecated: true
19018
19359
  currencies:
19019
19360
  type: array
19020
19361
  title: Tier pricing
19021
19362
  items:
19022
19363
  "$ref": "#/components/schemas/TierPricing"
19023
19364
  minItems: 1
19365
+ PercentageTiersByCurrency:
19366
+ type: object
19367
+ properties:
19368
+ currency:
19369
+ type: string
19370
+ title: Currency
19371
+ description: 3-letter ISO 4217 currency code.
19372
+ maxLength: 3
19373
+ tiers:
19374
+ type: array
19375
+ title: Tiers
19376
+ items:
19377
+ "$ref": "#/components/schemas/PercentageTier"
19378
+ minItems: 1
19379
+ PercentageTier:
19380
+ type: object
19381
+ properties:
19382
+ ending_amount:
19383
+ type: number
19384
+ format: float
19385
+ title: Ending amount
19386
+ minimum: 0.1
19387
+ maximum: 9999999999999
19388
+ description: Ending amount for the tier. Allows up to 2 decimal places.
19389
+ The last tier ending_amount is null.
19390
+ usage_percentage:
19391
+ type: string
19392
+ title: Usage Percentage
19393
+ description: Decimal usage percentage.
19024
19394
  Settings:
19025
19395
  type: object
19026
19396
  properties:
@@ -19714,6 +20084,15 @@ components:
19714
20084
  description: |
19715
20085
  If tiers are provided in the request, all existing tiers on the Subscription Add-on will be
19716
20086
  removed and replaced by the tiers in the request.
20087
+ percentage_tiers:
20088
+ type: array
20089
+ title: Percentage Tiers
20090
+ items:
20091
+ "$ref": "#/components/schemas/SubscriptionAddOnPercentageTier"
20092
+ minItems: 1
20093
+ description: |
20094
+ If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be
20095
+ removed and replaced by the percentage tiers in the request.
19717
20096
  usage_percentage:
19718
20097
  type: number
19719
20098
  format: float
@@ -19888,11 +20267,26 @@ components:
19888
20267
  usage_percentage:
19889
20268
  type: string
19890
20269
  title: Usage Percentage
19891
- description: The percentage taken of the monetary amount of usage tracked.
20270
+ description: This field is deprecated. Do not used it anymore for percentage
20271
+ tiers subscription add ons. Use the percentage_tiers object instead.
20272
+ deprecated: true
20273
+ SubscriptionAddOnPercentageTier:
20274
+ type: object
20275
+ properties:
20276
+ ending_amount:
20277
+ type: number
20278
+ format: float
20279
+ title: Ending amount
20280
+ minimum: 1
20281
+ maximum: 9999999999999.99
20282
+ default:
20283
+ usage_percentage:
20284
+ type: string
20285
+ title: Usage Percentage
20286
+ description: |
20287
+ The percentage taken of the monetary amount of usage tracked.
19892
20288
  This can be up to 4 decimal places represented as a string. A value between
19893
- 0.0 and 100.0. Optionally, override tiers' default usage percentage. Required
19894
- if add-on's `add_on_type` is `usage` and `usage_type` is `percentage`.
19895
- Must be omitted otherwise.
20289
+ 0.0 and 100.0.
19896
20290
  SubscriptionCancel:
19897
20291
  type: object
19898
20292
  properties:
@@ -21327,6 +21721,46 @@ components:
21327
21721
  maxItems: 200
21328
21722
  items:
21329
21723
  "$ref": "#/components/schemas/Plan"
21724
+ InvoiceTemplateList:
21725
+ type: object
21726
+ properties:
21727
+ object:
21728
+ type: string
21729
+ title: Object type
21730
+ description: Will always be List.
21731
+ has_more:
21732
+ type: boolean
21733
+ description: Indicates there are more results on subsequent pages.
21734
+ next:
21735
+ type: string
21736
+ description: Path to subsequent page of results.
21737
+ data:
21738
+ type: array
21739
+ items:
21740
+ "$ref": "#/components/schemas/InvoiceTemplate"
21741
+ InvoiceTemplate:
21742
+ type: object
21743
+ description: Settings for an invoice template.
21744
+ properties:
21745
+ id:
21746
+ type: string
21747
+ code:
21748
+ type: string
21749
+ description: Invoice template code.
21750
+ name:
21751
+ type: string
21752
+ description: Invoice template name.
21753
+ description:
21754
+ type: string
21755
+ description: Invoice template description.
21756
+ created_at:
21757
+ type: string
21758
+ format: date-time
21759
+ description: When the invoice template was created in Recurly.
21760
+ updated_at:
21761
+ type: string
21762
+ format: date-time
21763
+ description: When the invoice template was updated in Recurly.
21330
21764
  PaymentMethod:
21331
21765
  properties:
21332
21766
  object:
@@ -22245,3 +22679,14 @@ components:
22245
22679
  enum:
22246
22680
  - checking
22247
22681
  - savings
22682
+ ExternalHppTypeEnum:
22683
+ type: string
22684
+ description: Use for Adyen HPP billing info.
22685
+ enum:
22686
+ - adyen
22687
+ OnlineBankingPaymentTypeEnum:
22688
+ type: string
22689
+ description: Use for Online Banking billing info.
22690
+ enum:
22691
+ - ideal
22692
+ - sofort