mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-23 00:56:33 +03:00
568ce74077
Fixes #546
27364 lines
838 KiB
JSON
27364 lines
838 KiB
JSON
{
|
|
"openapi": "3.0.0",
|
|
"servers": [
|
|
{
|
|
"url": "//api.rebilly.com/v2.1",
|
|
"description": "Live Server"
|
|
},
|
|
{
|
|
"url": "//api-sandbox.rebilly.com/v2.1",
|
|
"description": "Sandbox Server"
|
|
}
|
|
],
|
|
"info": {
|
|
"version": "2.1",
|
|
"title": "Rebilly REST API",
|
|
"contact": {
|
|
"name": "Rebilly API Support",
|
|
"url": "https://www.rebilly.com/contact/",
|
|
"email": "integrations@rebilly.com"
|
|
},
|
|
"license": {
|
|
"name": "Rebilly",
|
|
"url": "https://my.rebilly.com/api/license/"
|
|
},
|
|
"termsOfService": "https://www.rebilly.com/terms/",
|
|
"x-logo": {
|
|
"url": "https://rebilly.github.io/RebillyAPI/rb_apiLogo.svg",
|
|
"backgroundColor": "#0033A0",
|
|
"altText": "Rebilly API logo"
|
|
},
|
|
"description": "# Introduction\nThe Rebilly API is built on HTTP. Our API is RESTful. It has predictable\nresource URLs. It returns HTTP response codes to indicate errors. It also\naccepts and returns JSON in the HTTP body. You can use your favorite\nHTTP/REST library for your programming language to use Rebilly's API, or\nyou can use one of our SDKs (currently available in [PHP](https://github.com/Rebilly/rebilly-php)\nand [C#](https://github.com/Rebilly/rebilly-dotnet-client)).\n\n# Authentication\nWhen you sign up for an account, you are given your first API key.\nYou can generate additional API keys, and delete API keys (as you may\nneed to rotate your keys in the future). You authenticate to the\nRebilly API by providing your secret key in the request header.\n\nRebilly offers three forms of authentication: private key, JSON Web Tokens, and\npublic key.\n- private key: authenticates each request by searching for the presence\nof an HTTP header: REB-APIKEY.\n- JWT: authenticates each request by the HTTP header: Authorization.\n- public key: authenticates by the HTTP header: REB-AUTH (read more on this below).\n\nRebilly also offers JSON Web Tokens (JWT) authentication, where you can control\nthe specific granular permissions and expiration for that JWT. We call our resource\nfor generating JWT [Sessions](#tag/Sessions).\n\nRebilly also has a client-side authentication scheme that uses an\napiUser and HMAC-SHA1 signature (only for the Tokens resource), so\nthat you may safely create tokens from the client-side without compromising\nyour secret keys.\n\nNever share your secret keys. Keep them guarded and secure.\nThe client-side authentication scheme uses one HTTP header named REB-AUTH.\n\n\n\n# PHP SDK\nFor all PHP SDK examples provided in this spec you will need to configure `$client`.\nYou may do it like this:\n\n```php\n$client = new Rebilly\\Client([\n 'apiKey' => 'YourApiKeyHere',\n 'baseUrl' => 'https://api.rebilly.com',\n]);\n```\n"
|
|
},
|
|
"tags": [
|
|
{
|
|
"name": "3D Secure",
|
|
"description": "3D Secure is a way to authenticate and protect transactions. Typically,\nit's only possible to protect the initial transaction in a subscription\nwith 3D Secure.\n"
|
|
},
|
|
{
|
|
"name": "API Keys",
|
|
"description": "Always keep your API Keys private. In addition to your API Keys, you may use\nJSON Web Tokens (JWT) to authenticate to the API. See\nour [Sessions](#tag/Sessions) resource for more information.\n"
|
|
},
|
|
{
|
|
"name": "Bank Accounts",
|
|
"description": "Bank Accounts are a type of payment instrument used to collect\nACH (echeck) payments, similar to how a payment\ncard would be used to for a credit card payment.\n"
|
|
},
|
|
{
|
|
"name": "Blacklists",
|
|
"description": "Your blacklists contains values of customerIds, email addresses,\nipAddresses, bank identification numbers, countries or payment cards that\nyou do NOT want to do business with. They are a good tool for managing\nrisk. A blacklist entry that expires after a period of time we call a\ngreylist.\n"
|
|
},
|
|
{
|
|
"name": "Checkout Pages",
|
|
"description": "Hosted checkout pages.\n"
|
|
},
|
|
{
|
|
"name": "Contacts",
|
|
"description": "Contacts are Customer's address book.\nAll contact information used in Invoices, Subscriptions, Transacions, etc is enlisted here. Hovewer, changing a Contact won't change corresponding contact information in related resources\n"
|
|
},
|
|
{
|
|
"name": "Coupons",
|
|
"description": "Coupons allows to apply different types of discounts to Invoices, Subscriptions and Plans. Redeemed Coupons will be applied only to Invoices with the same currency.\n"
|
|
},
|
|
{
|
|
"name": "Customers",
|
|
"description": "Customers are your customers, sometimes known as accounts, clients,\nmembers, patrons, or players in other systems.\n"
|
|
},
|
|
{
|
|
"name": "Customer Authentication",
|
|
"description": "Create authentication credentials, login, logout, and verify your customers.\n"
|
|
},
|
|
{
|
|
"name": "Custom Events",
|
|
"description": "If system events can't solve your problems, you are able to create a custom event\nthat can fit your requirements, and use it to solve your own business logic.\n"
|
|
},
|
|
{
|
|
"name": "Custom Rules",
|
|
"description": "\"Don't conform to the rules. Create the rules.\"\nRather than adapt your workflow and business, Rebilly can align with your business\nobjectives by giving you the power to automate certain behaviors when key events happen.\nYou can use this to your advantage to mitigate risk, maximize conversions and minimize costs.\nYou have the controls at your fingertips here. If you need more control,\nor help dialing in on a strategy, feel free to contact us.\n\nWhen an event happens, it triggers the evaluation of conditions (that you set up),\nin order from top to bottom. If the condition is met, the corresponding actions are executed.\nThe conditions continue to be checked until either all of the conditions have been executed,\nor a special \"stop\" action is executed.\n"
|
|
},
|
|
{
|
|
"name": "Custom Fields",
|
|
"description": "Create additional custom fields for particular resources. You may name,\ndescribe, and determine the type of the schema.\n"
|
|
},
|
|
{
|
|
"name": "Credential Hashes",
|
|
"description": "Get and create SMTP and Webhook credential hashes.\n"
|
|
},
|
|
{
|
|
"name": "Disputes",
|
|
"description": "Handle disputes (chargebacks and retrievals).\n"
|
|
},
|
|
{
|
|
"name": "Email Credentials",
|
|
"description": "Send automated emails through our system by connecting to your third party\nSMTP server (or your third party email service provider's SMTP server).\n"
|
|
},
|
|
{
|
|
"name": "Files",
|
|
"description": "A File is an entity that can store a phyiscal file and some metadata. It also provides an easy access to\nits size, mime-type, user-defined tags and description thus allowing easy sorting and searching among stored\nfiles.\nThere are several methods of file uploading available: multipart/form-data encoded form, RAW POST (by sending\nfile contents as POST body), fetching from URL (by providing the file URL via 'url' param)\nAttachment is an entity that is used to link a File to one or multiple objects like Customer, Dispute, Payment,\nTransaction, Subscription, Plan, Product, Invoice, Note. That allows to quickly find and use files related to\nthose specific entities.\n"
|
|
},
|
|
{
|
|
"name": "Gateway Accounts",
|
|
"description": "Gateway accounts connect payment request to third party networks and platforms.\n"
|
|
},
|
|
{
|
|
"name": "Invoices",
|
|
"description": "Invoices leave a record for both you and your customer of the products sold.\n"
|
|
},
|
|
{
|
|
"name": "Layouts",
|
|
"description": "Layouts are used to hold collections of plans. A layout can be used to\npower a pricing page. You can make multiple layouts, and use rules to\ntarget them to different audiences.\n"
|
|
},
|
|
{
|
|
"name": "Lists",
|
|
"description": "Lists contain sets of values and may be referenced within Rules criteria.\n\nYou may grant permissions to edit Lists to different people than those who can edit Rules.\nIt may be useful if your workflow involves frequent updates to value sets used in criteria.\n"
|
|
},
|
|
{
|
|
"name": "Migrate payment cards",
|
|
"description": "Migrate payment cards from one gateway to another.\n"
|
|
},
|
|
{
|
|
"name": "Notes",
|
|
"description": "Leave notes on a customer record to have a handy location to share with\nothers who may interface with the customer. It's great for customer service.\n"
|
|
},
|
|
{
|
|
"name": "Organizations",
|
|
"description": "Organizations include the name and address of the entities related to your\naccount. An account may be multi-national, and support multiple\norganizations. Note: Organizations are share between \"Live\" and \"Sandbox\"\n"
|
|
},
|
|
{
|
|
"name": "Payments",
|
|
"description": "Collect money from your customers with payments. You can schedule a payment\nto occur in the future. You can assign a dunning schedule to a payment to collect\nin the case of a decline.\n\nSome payments may be, what we term, suspended payments. These types of payments\nrequire user interaction. For example, an initial PayPal purchase, a 3D Secure\npurchase, China Union Pay, and more require the customer's interaction to\ncomplete the payment. We call these a \"suspended\" payment flow.\n"
|
|
},
|
|
{
|
|
"name": "Payment Cards",
|
|
"description": "Payment cards are a type of payment instrument used for credit and debit card\nsales. Rebilly securely vaults the full payment card number, and can pass it\nonward securely to any gateway account to transact business.\n"
|
|
},
|
|
{
|
|
"name": "Payment Tokens",
|
|
"description": "Payment tokens are used to reduce the scope of PCI DSS compliance. A payment\ntoken can be made using a different authentication scheme (refer to the public key\nauthentication scheme in the Authentication section), which allows you to\ncreate a payment token directly from the browser, bypassing the need to send\nsensitive cardholder info to your servers. We recommend using this with our\nRebilly.js library, which helps you wire a form into this API resource and create\npayment tokens.\n"
|
|
},
|
|
{
|
|
"name": "Plans",
|
|
"description": "Plans are a template for making a subscription. For example, you may have a plan\nthat has a 30-day free trial followed by a recurring charge of $19.95 per month\nuntil canceled. The combination of the plan and a request to make a subscription\nwill apply those instructions to create the invoices according to the plan's\nschedule.\n"
|
|
},
|
|
{
|
|
"name": "Products",
|
|
"description": "Proposed: Your product includes digital goods, services, and physical goods.\n"
|
|
},
|
|
{
|
|
"name": "Reports",
|
|
"description": "The Rebilly Reporting API is currently experimental. You may see\nthe [Reports API Documentation here](https://rebilly.github.io/RebillyReportsAPI/).\n"
|
|
},
|
|
{
|
|
"name": "Rules",
|
|
"description": "\"Don't conform to the rules. Create the rules.\"\nRather than adapt your workflow and business, Rebilly can align with your business\nobjectives by giving you the power to automate certain behaviors when key events happen.\nYou can use this to your advantage to mitigate risk, maximize conversions and minimize costs.\nYou have the controls at your fingertips here. If you need more control,\nor help dialing in on a strategy, feel free to contact us.\n\nWhen an event happens, it triggers the evaluation of conditions (that you set up),\nin order from top to bottom. If the condition is met, the corresponding actions are executed.\nThe conditions continue to be checked until either all of the conditions have been executed,\nor a special \"stop\" action is executed.\n"
|
|
},
|
|
{
|
|
"name": "Sessions",
|
|
"description": "A session contains a token, which is a JSON Web Token. The token is created\nwith a user's signin credentials.\n\nThis token can be used to authenticate to the API. In addition, the session can be set to\nexpire at a particular time, and has very granular control over permissions.\nUse the token to then authenticate for further requests to the Rebilly API.\n\nThe token should be kept private, but could be stored on the user's browser\nclient to simulate a \"session.\"\n"
|
|
},
|
|
{
|
|
"name": "Shipping Zones",
|
|
"description": "A shipping zone contains regions and countries that you ship to. Each shipping zone has its own shipping rates.\n"
|
|
},
|
|
{
|
|
"name": "Status",
|
|
"description": "Check the status of the Rebilly API (no authentication required).\n"
|
|
},
|
|
{
|
|
"name": "Subscriptions",
|
|
"description": "A subscription applies a plan's template to create invoices for a customer at the\nappropriate scheduled intervals. A subscription may also determine if the payment\nis collected automatically (with autopay set true).\n"
|
|
},
|
|
{
|
|
"name": "Taxes",
|
|
"description": "Proposed: You can map a product to a tax category. The tax category is used by\ntax providers to calculate taxes for invoices.\n"
|
|
},
|
|
{
|
|
"name": "Tracking",
|
|
"description": "Tracking is a layer for accessing all the activity (API requests,\nsubscriptions, webhooks, events, etc.), thus providing easier\ndebugging and issues auditing.\n"
|
|
},
|
|
{
|
|
"name": "Transactions",
|
|
"description": "Get and refund transactions.\n"
|
|
},
|
|
{
|
|
"name": "Users",
|
|
"description": "A User represents a person who can login to Rebilly, and take actions subject to\ntheir granted permissions.\n"
|
|
},
|
|
{
|
|
"name": "Websites",
|
|
"description": "A Website represents the website/brand that customers interact with... You\ncould think of it like a brand. For example, Nestle owns Perrier and Purina\nand PowerBar.\n\nWe recognize that some enterprises have more than one website (or brand). The\nwebsite is related to each invoice and each payment gateway account. This feature\nwould allow you to have gateway accounts that are related to multiple websites, or\nexclusive to particular websites. And gives you more control over your business.\n"
|
|
},
|
|
{
|
|
"name": "Webhooks",
|
|
"description": "Webhooks are designed to notify your systems when certain/all registered events happen in near real-time.\nThey allow you to collect information about those events. Rebilly can send these information via\nPOST to an URL of your choice.\n"
|
|
}
|
|
],
|
|
"security": [
|
|
{
|
|
"ApiKey": []
|
|
}
|
|
],
|
|
"paths": {
|
|
"/3dsecure": {
|
|
"get": {
|
|
"tags": [
|
|
"3D Secure"
|
|
],
|
|
"summary": "Retrieve a list of ThreeDSecure entries",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ThreeDSecure"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"3D Secure"
|
|
],
|
|
"summary": "Create a ThreeDSecure entry",
|
|
"description": "Create a ThreeDSecure entry\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "ThreeDSecure entry was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ThreeDSecure"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ThreeDSecure"
|
|
}
|
|
}
|
|
},
|
|
"description": "ThreeDSecure resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/3dsecure/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"3D Secure"
|
|
],
|
|
"summary": "Retrieve a ThreeDSecure entry",
|
|
"description": "Retrieve a ThreeDSecure entry with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "ThreeDSecure entry was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ThreeDSecure"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/activation/{token}": {
|
|
"parameters": [
|
|
{
|
|
"name": "token",
|
|
"in": "path",
|
|
"description": "The token string",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Sends a token to activate user account",
|
|
"description": "Sends a token to activate user account\n",
|
|
"security": [
|
|
{
|
|
"RebAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "User account was activated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Invalid token was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "try {\n $client->users()->activate('token');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api-keys": {
|
|
"get": {
|
|
"tags": [
|
|
"API Keys"
|
|
],
|
|
"summary": "Retrieve a list of api keys",
|
|
"description": "Retrieve a list of api keys\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of api keys was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ApiKey"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$apiKeys = $client->apiKeys()->search([\n 'filter' => 'description:Test',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"API Keys"
|
|
],
|
|
"summary": "Create an api key",
|
|
"description": "Create an api key\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Api Key was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiKey"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$apiKeyForm = new Rebilly\\Entities\\ApiKey();\n$apiKeyForm->setDescription('Test');\n$apiKeyForm->setDatetimeFormat($apiKeyForm::DATETIME_FORMAT_MYSQL);\n\ntry {\n $apiKey = $client->apiKeys()->create($apiKeyForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/ApiKey"
|
|
}
|
|
}
|
|
},
|
|
"/api-keys/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"API Keys"
|
|
],
|
|
"summary": "Retrieve api key",
|
|
"description": "Retrieve api key with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Api key was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiKey"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$apiKeys = $client->apiKeys()->load('apiKeyID');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"API Keys"
|
|
],
|
|
"summary": "Create or update api key with predefined ID",
|
|
"description": "Create or update api key with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "ApiKey was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiKey"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "ApiKey was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiKey"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$apiKeyForm = new Rebilly\\Entities\\ApiKey();\n$apiKeyForm->setDescription('TestPut');\n$apiKeyForm->setDatetimeFormat($apiKeyForm::DATETIME_FORMAT_MYSQL);\n\ntry {\n $apiKey = $client->apiKeys()->update('apiKeyID', $apiKeyForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/ApiKey"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"API Keys"
|
|
],
|
|
"summary": "Delete api key",
|
|
"description": "Delete api key with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "ApiKey was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$client->apiKeys()->delete('apiKeyID');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/attachments": {
|
|
"get": {
|
|
"tags": [
|
|
"Files"
|
|
],
|
|
"summary": "Retrieve a list of Attachments",
|
|
"description": "Retrieve a list of Attachments\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionFilter"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionQuery"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionExpand"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionFields"
|
|
},
|
|
{
|
|
"name": "sort",
|
|
"in": "query",
|
|
"description": "The collection items sort field and order (prefix with \"-\" for descending sort).",
|
|
"style": "form",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"id",
|
|
"-id",
|
|
"name",
|
|
"-name",
|
|
"relatedId",
|
|
"-relatedId",
|
|
"relatedType",
|
|
"-relatedType",
|
|
"fileId",
|
|
"-fileId",
|
|
"createdTime",
|
|
"-createdTime",
|
|
"updatedTime",
|
|
"-updatedTime"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of Attachments was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Attachment"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$attachments = $client->attachments()->search([\n 'filter' => 'relatedType:customer',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Files"
|
|
],
|
|
"summary": "Create an Attachment",
|
|
"description": "Create an Attachment\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Attachment was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Attachment"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$attachmentForm = new Rebilly\\Entities\\Attachment();\n$attachmentForm->setFileId('fileId');\n$attachmentForm->setRelatedType($attachmentForm::TYPE_CUSTOMER);\n$attachmentForm->setRelatedId('customerId');\n\ntry {\n $attachment = $client->attachments()->create($attachmentForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Attachment"
|
|
}
|
|
}
|
|
},
|
|
"/attachments/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Files"
|
|
],
|
|
"summary": "Retrieve an Attachment",
|
|
"description": "Retrieve a Attachment with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Attachment was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Attachment"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$attachment = $client->attachments()->load('attachmentId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Files"
|
|
],
|
|
"summary": "Update the Attachment with predefined ID",
|
|
"description": "Update the Attachment with predefined ID\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Attachment was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Attachment"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Attachment was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Attachment"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$attachmentForm = new Rebilly\\Entities\\Attachment();\n$attachmentForm->setFileId('fileId');\n$attachmentForm->setRelatedType($attachmentForm::TYPE_CUSTOMER);\n$attachmentForm->setRelatedId('customerId');\n\ntry {\n $attachment = $client->attachments()->update('attachmentId', $attachmentForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Attachment"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Files"
|
|
],
|
|
"summary": "Delete an Attachment",
|
|
"description": "Delete the Attachment with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Attachment was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$client->attachments()->delete('attachmentId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/authentication-options": {
|
|
"get": {
|
|
"tags": [
|
|
"Customer Authentication"
|
|
],
|
|
"summary": "Read current authentication options",
|
|
"description": "Read current authentication options\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Current authentication options was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/AuthenticationOptions"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$authenticationOptions = $client->authenticationOptions()->load();\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Customer Authentication"
|
|
],
|
|
"summary": "Change authentication options",
|
|
"description": "Change options\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Authentication Options were updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AuthenticationOptions"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$authenticationOptionsForm = new Rebilly\\Entities\\AuthenticationOptions();\n// Regular expression below matches any password with 6+ length that contains alphabet symbols and/or numbers.\n$authenticationOptionsForm->setPasswordPattern('/^[a-zA-Z0-9]{6,}$/');\n\ntry {\n $authenticationOptions = $client->authenticationOptions()->update($authenticationOptionsForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AuthenticationOptions"
|
|
}
|
|
}
|
|
},
|
|
"description": "Authentication Options resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/authentication-tokens": {
|
|
"get": {
|
|
"tags": [
|
|
"Customer Authentication"
|
|
],
|
|
"summary": "Retrieve a list of auth tokens",
|
|
"description": "Retrieve a list of auth tokens\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of auth tokens was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/AuthenticationToken"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$authenticationTokens = $client->authenticationTokens()->search([\n 'filter' => 'customerId:testCustomer',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Customer Authentication"
|
|
],
|
|
"summary": "Login",
|
|
"description": "Login a user (customer)\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Login successful",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AuthenticationToken"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$authenticationForm = new Rebilly\\Entities\\AuthenticationToken();\n$authenticationForm->setUsername('username');\n$authenticationForm->setPassword('test123');\n\ntry {\n $authenticationToken = $client->authenticationTokens()->login($authenticationForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AuthenticationToken"
|
|
}
|
|
}
|
|
},
|
|
"description": "AuthenticationToken resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/authentication-tokens/{token}": {
|
|
"parameters": [
|
|
{
|
|
"name": "token",
|
|
"in": "path",
|
|
"description": "The token identifier string",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Customer Authentication"
|
|
],
|
|
"summary": "Verify",
|
|
"description": "Verify an authentication token\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Authentication Token was verified",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AuthenticationToken"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$isVerified = $client->authenticationTokens()->verify('token');\n"
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Customer Authentication"
|
|
],
|
|
"summary": "Logout a user",
|
|
"description": "Logout a user\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "User was logged out",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$client->authenticationTokens()->logout('token');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/bank-accounts": {
|
|
"get": {
|
|
"tags": [
|
|
"Bank Accounts"
|
|
],
|
|
"summary": "Retrieve a list of bank accounts",
|
|
"description": "Retrieve a list of Bank Accounts\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of Bank Accounts was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/BankAccount"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$bankAccounts = $client->bankAccounts()->search([\n 'filter' => 'customerId:testId',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Bank Accounts"
|
|
],
|
|
"summary": "Create a Bank Account",
|
|
"description": "Create a Bank Account\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Bank Account was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BankAccount"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$bankAccountForm = new Rebilly\\Entities\\BankAccount();\n$bankAccountForm->setCustomerId('customerId');\n$bankAccountForm->setContactId('contactId');\n$bankAccountForm->setRoutingNumber('0123456');\n$bankAccountForm->setAccountNumber('0123456');\n$bankAccountForm->setAccountType('checking');\n\ntry {\n $bankAccount = $client->bankAccounts()->create($bankAccountForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/BankAccount"
|
|
}
|
|
}
|
|
},
|
|
"/bank-accounts/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Bank Accounts"
|
|
],
|
|
"summary": "Retrieve a Bank Account",
|
|
"description": "Retrieve a Bank Account with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "BankAccount was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BankAccount"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$bankAccount = $client->bankAccounts()->load('bankAccountId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Bank Accounts"
|
|
],
|
|
"summary": "Create a BankAccount with predefined ID",
|
|
"description": "Create or update a BankAccount with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "BankAccount was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BankAccount"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "BankAccount was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BankAccount"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$bankAccountForm = new Rebilly\\Entities\\BankAccount();\n$bankAccountForm->setCustomerId('customerId');\n$bankAccountForm->setContactId('contactId');\n$bankAccountForm->setRoutingNumber('0123456');\n$bankAccountForm->setAccountNumber('0123456');\n$bankAccountForm->setAccountType('checking');\n\ntry {\n $bankAccount = $client->customers()->create($bankAccountForm, 'bankAccountId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/BankAccount"
|
|
}
|
|
}
|
|
},
|
|
"/bank-accounts/{id}/deactivation": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Bank Accounts"
|
|
],
|
|
"summary": "Deactivate a Bank Account",
|
|
"description": "Deactivate a Bank Account\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Deactivated successful",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BankAccount"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$bankAccount = $client->bankAccounts()->deactivate('bankAccountId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/blacklists": {
|
|
"get": {
|
|
"tags": [
|
|
"Blacklists"
|
|
],
|
|
"summary": "Retrieve a list of blacklists",
|
|
"description": "Retrieve a list of blacklists\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of Blacklists was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Blacklist"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$blacklists = $client->blacklists()->search([\n 'filter' => 'value:testValue',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Blacklists"
|
|
],
|
|
"summary": "Create a blacklist",
|
|
"description": "Create a blacklist\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Blacklist was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Blacklist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$blacklistForm = new Rebilly\\Entities\\Blacklist();\n$blacklistForm->setType($blacklistForm::TYPE_EMAIL);\n$blacklistForm->setValue('test@test.com');\n$blacklistForm->setExpiredTime('2025-01-01 05:00:00');\n\ntry {\n $blacklist = $client->blacklists()->create($blacklistForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Blacklist"
|
|
}
|
|
}
|
|
},
|
|
"/blacklists/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Blacklists"
|
|
],
|
|
"summary": "Retrieve a blacklist",
|
|
"description": "Retrieve a blacklist with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Blacklist was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Blacklist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$blacklist = $client->blacklists()->load('blacklistId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Blacklists"
|
|
],
|
|
"summary": "Create a blacklist with predefined ID",
|
|
"description": "Create a blacklist with predefined identifier string\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Blacklist was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Blacklist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"409": {
|
|
"description": "Blacklist exist and cannot be updated",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$blacklistForm = new Rebilly\\Entities\\Blacklist();\n$blacklistForm->setType($blacklistForm::TYPE_EMAIL);\n$blacklistForm->setValue('test@test.com');\n$blacklistForm->setExpiredTime('2025-01-01 05:00:00');\n\ntry {\n $blacklist = $client->blacklists()->create($blacklistForm, 'blacklistId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Blacklist"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Blacklists"
|
|
],
|
|
"summary": "Delete a blacklist",
|
|
"description": "Delete a blacklist with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": "Blacklist was deleted"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$client->blacklists()->delete('blacklistId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/checkout-pages": {
|
|
"get": {
|
|
"tags": [
|
|
"Checkout Pages"
|
|
],
|
|
"summary": "Retrieve a list of checkout pages",
|
|
"description": "Retrieve a list of checkout pages\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of checkout pages was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/CheckoutPage"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$checkoutPages = $client->checkoutPages()->search([\n 'filter' => 'name:testCheckoutPage',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Checkout Pages"
|
|
],
|
|
"summary": "Create a Checkout Page",
|
|
"description": "Create a Checkout Page\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Checkout Page was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CheckoutPage"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$checkoutPageForm = new Rebilly\\Entities\\CheckoutPage();\n$checkoutPageForm->setPlanId('planId');\n$checkoutPageForm->setWebsiteId('websiteId');\n$checkoutPageForm->setName('TestCheckoutPage');\n$checkoutPageForm->setUriPath('test-checkout-page');\n\ntry {\n $checkoutPage = $client->checkoutPages()->create($checkoutPageForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/CheckoutPage"
|
|
}
|
|
}
|
|
},
|
|
"/checkout-pages/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Checkout Pages"
|
|
],
|
|
"summary": "Retrieve a Checkout Page",
|
|
"description": "Retrieve a Checkout Page with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Checkout Page was retrieved successfully",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CheckoutPage"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$checkoutPage = $client->checkoutPages()->load('checkoutPageId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Checkout Pages"
|
|
],
|
|
"summary": "Create or update a Checkout Page with predefined ID",
|
|
"description": "Create or update a Checkout Page with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Checkout Page was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CheckoutPage"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Checkout Page was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CheckoutPage"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$checkoutPageForm = new Rebilly\\Entities\\CheckoutPage();\n$checkoutPageForm->setPlanId('planId');\n$checkoutPageForm->setWebsiteId('websiteId');\n$checkoutPageForm->setName('TestCheckoutPage');\n$checkoutPageForm->setUriPath('test-checkout-page');\n\ntry {\n $checkoutPage = $client->checkoutPages()->update('checkoutPageId', $checkoutPageForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/CheckoutPage"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Checkout Pages"
|
|
],
|
|
"summary": "Delete a Checkout Page",
|
|
"description": "Delete a Checkout Page with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": "Checkout Page was deleted"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"description": "Checkout page cannot be deleted"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$client->checkoutPages()->delete('checkoutPageId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/contacts": {
|
|
"get": {
|
|
"tags": [
|
|
"Contacts"
|
|
],
|
|
"summary": "Retrieve a list of contacts",
|
|
"description": "Retrieve a list of contacts\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of Contacts was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Contact"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$contacts = $client->contacts()->search([\n 'filter' => 'firstName:John',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Contacts"
|
|
],
|
|
"summary": "Create a contact",
|
|
"description": "Create a contact\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Contact was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Contact"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$contactForm = new Rebilly\\Entities\\Contact();\n$contactForm->setFirstName('Sherlock');\n$contactForm->setLastName('Holmes');\n$contactForm->setOrganization('TestOrganization');\n\ntry {\n $contact = $client->contacts()->create($contactForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Contact"
|
|
}
|
|
}
|
|
},
|
|
"/contacts/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Contacts"
|
|
],
|
|
"summary": "Retrieve a contact",
|
|
"description": "Retrieve a contact with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Contact was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Contact"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$contact = $client->contacts()->load('contactId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Contacts"
|
|
],
|
|
"summary": "Create or update a contact with predefined ID",
|
|
"description": "Create or update a contact with predefined identifier string\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Contact was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Contact"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"description": "Contact exists and cannot be updated"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$contactForm = new Rebilly\\Entities\\Contact();\n$contactForm->setFirstName('Sherlock');\n$contactForm->setLastName('Holmes');\n$contactForm->setOrganization('TestOrganization');\n\ntry {\n $contact = $client->contacts()->update('contactId', $contactForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Contact"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Contacts"
|
|
],
|
|
"summary": "Delete a contact",
|
|
"description": "Delete a contact with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Contact was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"402": {
|
|
"description": "Contact cannot be deleted"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/coupons-redemptions": {
|
|
"get": {
|
|
"tags": [
|
|
"Coupons"
|
|
],
|
|
"summary": "Retrieve a list of coupon redemptions",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionFilter"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionQuery"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionCriteria"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionSort"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Coupons redemptions were retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/CouponRedemption"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$couponRedemptions = $client->couponsRedemptions()->search([\n 'filter' => 'customerId:testCustomer',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Coupons"
|
|
],
|
|
"summary": "Redeem a coupon",
|
|
"description": "Redeem a coupon\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Coupon was redeemed",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CouponRedemption"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$redemptionForm = new Rebilly\\Entities\\Coupons\\Redemption();\n$redemptionForm->setCustomerId('customerId');\n$redemptionForm->setRedemptionCode('redemptionCode');\n\n$restrictionArray = [\n 'type' => Rebilly\\Entities\\Coupons\\Restriction::TYPE_DISCOUNTS_PER_REDEMPTION,\n 'quantity' => 2,\n];\n\n$restrictionForm = new Rebilly\\Entities\\Coupons\\Restriction([\n $restrictionArray,\n]);\n\n$redemptionForm->setAdditionalRestrictions($restrictionForm);\n\ntry {\n $couponRedemption = $client->couponsRedemptions()->redeem($redemptionForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CouponRedemption"
|
|
}
|
|
}
|
|
},
|
|
"description": "Redeem a coupon",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/coupons-redemptions/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Coupons"
|
|
],
|
|
"summary": "Retrieve a coupon redemption with specified identifier string",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Retrieve a coupon redemption with specified identifier string",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CouponRedemption"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$couponRedemption = $client->couponsRedemptions()->load('redemptionCode');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/coupons-redemptions/{id}/cancel": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Coupons"
|
|
],
|
|
"summary": "Cancel a coupon redemption",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Cancel a coupon redemption"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$client->couponsRedemptions()->cancel('id');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/coupons": {
|
|
"get": {
|
|
"tags": [
|
|
"Coupons"
|
|
],
|
|
"summary": "Retrieve a list of coupons",
|
|
"description": "Retrieve a list of coupons\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionFilter"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionQuery"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionCriteria"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionSort"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of coupons was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Coupon"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$coupons = $client->coupons()->search([\n 'filter' => 'status:issued',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Coupons"
|
|
],
|
|
"summary": "Create a coupon",
|
|
"description": "Create a coupon\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Coupon was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Coupon"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$couponForm = new Rebilly\\Entities\\Coupons\\Coupon();\n\n$discountArray = [\n 'currency' => 'USD',\n 'amount' => 1.99,\n];\n\n$discountForm = new \\Rebilly\\Entities\\Coupons\\Discounts\\Fixed($discountArray);\n$couponForm->setDiscount($discountForm);\n// Coupon can be used right now\n$couponForm->setIssuedTime(date('Y-m-d H:i:s'));\n\n$restrictionArray = [\n 'quantity' => 2,\n];\n\n$restrictionForm = new Rebilly\\Entities\\Coupons\\Restrictions\\DiscountsPerRedemption($restrictionArray);\n\n$couponForm->setRestrictions([$restrictionForm]);\n\ntry {\n $coupon = $client->coupons()->create($couponForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Coupon"
|
|
}
|
|
}
|
|
},
|
|
"/coupons/{redemptionCode}": {
|
|
"parameters": [
|
|
{
|
|
"name": "redemptionCode",
|
|
"in": "path",
|
|
"description": "The Coupon's redemption code",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Coupons"
|
|
],
|
|
"summary": "Retrieve a coupon",
|
|
"description": "Retrieve a coupon with specified redemption code string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Coupon was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Coupon"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$coupon = $client->coupons()->load('redemptionCode');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Coupons"
|
|
],
|
|
"summary": "Create or update a coupon with predefined redemption code",
|
|
"description": "Create or update a coupon with predefined redemption code\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Coupon was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Coupon"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Coupon was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Coupon"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"description": "Coupon was redeemed already and cannot be changed"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$couponForm = new Rebilly\\Entities\\Coupons\\Coupon();\n\n$discountArray = [\n 'type' => Rebilly\\Entities\\Coupons\\Discount::TYPE_FIXED,\n 'currency' => 'USD',\n 'amount' => 1.99,\n];\n\n$discountForm = new Rebilly\\Entities\\Coupons\\Discount($discountArray);\n$couponForm->setDiscount($discountForm);\n\n$restrictionArray = [\n 'type' => Rebilly\\Entities\\Coupons\\Restriction::TYPE_DISCOUNTS_PER_REDEMPTION,\n 'quantity' => 2,\n];\n\n$restrictionForm = new Rebilly\\Entities\\Coupons\\Restriction([\n $restrictionArray,\n]);\n\n$couponForm->setRestrictions($restrictionForm);\n\ntry {\n $coupon = $client->coupons()->create($couponForm, 'redemptionCode');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Coupon"
|
|
}
|
|
}
|
|
},
|
|
"/coupons/{redemptionCode}/expiration": {
|
|
"parameters": [
|
|
{
|
|
"name": "redemptionCode",
|
|
"in": "path",
|
|
"description": "The Coupon's redemption code",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Coupons"
|
|
],
|
|
"summary": "Set a coupon's expiration time.",
|
|
"description": "Set a coupon's expiry time with the specified redemption code.\nThe expiredTime of a coupon must be greater than its issuedTime.\nThis cannot be performed on expired coupons.\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Coupon expiration was successfully set",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Coupon"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CouponExpiration"
|
|
}
|
|
}
|
|
},
|
|
"description": "Coupon resource"
|
|
}
|
|
}
|
|
},
|
|
"/credential-hashes/emails": {
|
|
"post": {
|
|
"tags": [
|
|
"Credential Hashes"
|
|
],
|
|
"summary": "Create an email credential",
|
|
"description": "Create an email credential\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Email credential was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmtpCredential"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmtpCredential"
|
|
}
|
|
}
|
|
},
|
|
"description": "Email credential resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/credential-hashes/emails/{hash}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/hash"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Credential Hashes"
|
|
],
|
|
"summary": "Retrieve an email credential",
|
|
"description": "Retrieve an email credential with specified token identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Email credential was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmtpCredential"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/credential-hashes/webhooks": {
|
|
"post": {
|
|
"tags": [
|
|
"Credential Hashes"
|
|
],
|
|
"summary": "Create a webhook credential",
|
|
"description": "Create a webhook credential\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Webhook credential was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebhookCredential"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebhookCredential"
|
|
}
|
|
}
|
|
},
|
|
"description": "Credential resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/credential-hashes/webhooks/{hash}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/hash"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Credential Hashes"
|
|
],
|
|
"summary": "Retrieve a webhook credential",
|
|
"description": "Retrieve a webhook credential with specified token identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Webhook credential was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebhookCredential"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/credentials": {
|
|
"get": {
|
|
"tags": [
|
|
"Customer Authentication"
|
|
],
|
|
"summary": "Retrieve a list of credentials",
|
|
"description": "Retrieve a list of credentials\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of Credentials was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Credential"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$customerCredentials = $client->customerCredentials()->search([\n 'filter' => 'customerId:testCustomer',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Customer Authentication"
|
|
],
|
|
"summary": "Create a credential",
|
|
"description": "Create a credential\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Credential was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Credential"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$customerCredentialForm = new Rebilly\\Entities\\CustomerCredential();\n$customerCredentialForm->setCustomerId('customerId');\n$customerCredentialForm->setUsername('test');\n$customerCredentialForm->setPassword('1234');\n\ntry {\n $customerCredential = $client->customerCredentials()->create($customerCredentialForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Credential"
|
|
}
|
|
}
|
|
},
|
|
"/credentials/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Customer Authentication"
|
|
],
|
|
"summary": "Retrieve a credential",
|
|
"description": "Retrieve a credential with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Credential was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Credential"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$customerCredential = $client->customerCredentials()->load('credentialId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Customer Authentication"
|
|
],
|
|
"summary": "Create or update a credential with predefined ID",
|
|
"description": "Create or update a credential with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Credential was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Credential"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Credential was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Credential"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$customerCredentialForm = new Rebilly\\Entities\\CustomerCredential();\n$customerCredentialForm->setCustomerId('customerId');\n$customerCredentialForm->setUsername('test');\n$customerCredentialForm->setPassword('1234');\n\ntry {\n $customerCredential = $client->customerCredentials()->update('credentialId', $customerCredentialForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Credential"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Customer Authentication"
|
|
],
|
|
"summary": "Delete a credential",
|
|
"description": "Delete a credential with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": "Credential was deleted"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$client->customerCredentials()->delete('credentialId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/custom-events": {
|
|
"get": {
|
|
"tags": [
|
|
"Custom Events"
|
|
],
|
|
"summary": "Retrieve a list of custom events",
|
|
"description": "Retrieve a list of custom events\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
},
|
|
{
|
|
"name": "sort",
|
|
"in": "query",
|
|
"description": "The collection items sort field and order (prefix with \"-\" for descending sort).",
|
|
"style": "form",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"createdTime",
|
|
"-createdTime",
|
|
"handledTime",
|
|
"-handledTime",
|
|
"scheduledTime",
|
|
"-scheduledTime"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of custom events was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/CustomEvent"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Custom Events"
|
|
],
|
|
"summary": "Create a custom event",
|
|
"description": "Create a custom event\n",
|
|
"responses": {
|
|
"202": {
|
|
"description": "Custom event was accepted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CustomEvent"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/CustomEvent"
|
|
}
|
|
}
|
|
},
|
|
"/custom-events/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Custom Events"
|
|
],
|
|
"summary": "Retrieve a custom event",
|
|
"description": "Retrieve a custom event with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Custom event was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CustomEvent"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Custom Events"
|
|
],
|
|
"summary": "Create a custom event with predefined ID",
|
|
"description": "Create a custom event with predefined identifier string\n",
|
|
"responses": {
|
|
"202": {
|
|
"description": "Custom event was accepted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CustomEvent"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/CustomEvent"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Custom Events"
|
|
],
|
|
"summary": "Delete a custom event",
|
|
"description": "Delete a custom event with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": "Custom event was deleted"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/custom-events/{id}/rules": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Custom Events",
|
|
"Rules"
|
|
],
|
|
"summary": "Retrieve a list of rules for custom event",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Rules were retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RuleSet"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Custom Events",
|
|
"Rules"
|
|
],
|
|
"summary": "Update the rules for custom event",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Rules were updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RuleSet"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/RuleSet"
|
|
}
|
|
}
|
|
},
|
|
"/custom-events/{id}/rules/history": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Custom Events",
|
|
"Rules"
|
|
],
|
|
"summary": "Retrieve the change history of the set of rules for a custom event",
|
|
"description": "Retrieve the change history of the set of rules for the selected custom event.\nThe history is updated each time you change the rules.\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionFilter"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionQuery"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionSort"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionFields"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionExpand"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "History was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/RuleSetHistoryItem"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/custom-events/{id}/rules/history/{version}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/rulesVersion"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Custom Events",
|
|
"Rules"
|
|
],
|
|
"summary": "Retrieve the record from the change history of the set of rules for a custom event",
|
|
"description": "Retrieve the record from the change history of the set of rules for the selected custom event.\nA history record is created each time you change the rules.\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionFields"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionExpand"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Rules version was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RuleSetHistoryItem"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/custom-events/{id}/rules/versions/{version}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/rulesVersion"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Custom Events",
|
|
"Rules"
|
|
],
|
|
"summary": "Retrieve the version of the set of rules for a custom event",
|
|
"description": "Retrieve the version of the selected set of rules for the selected custom event.\nThe versions are created each time you change the rules.\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionFields"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionExpand"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Rules version was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RuleSetVersion"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/custom-fields/{resource}": {
|
|
"parameters": [
|
|
{
|
|
"name": "resource",
|
|
"in": "path",
|
|
"description": "The resource type string",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"customers",
|
|
"payment-cards",
|
|
"subscriptions",
|
|
"transactions",
|
|
"websites",
|
|
"contacts",
|
|
"products"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Custom Fields"
|
|
],
|
|
"summary": "Retrieve Custom Fields",
|
|
"description": "Retrieve a schema of Custom Fields for the given resource type\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A schema of Custom Fields was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "The list of custom fields",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/CustomField"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$customFields = $client->customFields()->search([\n 'filter' => 'type:boolean',\n]);\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/custom-fields/{resource}/{name}": {
|
|
"parameters": [
|
|
{
|
|
"name": "resource",
|
|
"in": "path",
|
|
"description": "The resource type string",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"customers",
|
|
"payment-cards",
|
|
"subscriptions",
|
|
"transactions",
|
|
"websites",
|
|
"contacts",
|
|
"products"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"description": "The custom field's identifier string",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Custom Fields"
|
|
],
|
|
"summary": "Retrieve a Custom Field",
|
|
"description": "Retrieve a schema of the given Custom Field for the given resource type\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A schema of the Custom Field was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CustomField"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$customField = $client->customFields()->load('customers', 'customerId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Custom Fields"
|
|
],
|
|
"summary": "Create or alter a Custom Field",
|
|
"description": "Create or alter a schema of the given Custom Field for the given resource type.\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "The Custom Field was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CustomField"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "The Custom Fields was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CustomField"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"409": {
|
|
"description": "The schema is in use: remove all the associated data in order to remove or alter the schema",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$customFieldForm = new Rebilly\\Entities\\CustomField();\n$customFieldForm->setType($customFieldForm::TYPE_BOOLEAN);\n\ntry {\n $customField = $client->customFields()->update('customers', 'testFieldName', $customFieldForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CustomField"
|
|
}
|
|
}
|
|
},
|
|
"description": "Custom Fields schema of the given resource type",
|
|
"required": true
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Custom Fields"
|
|
],
|
|
"summary": "Delete a custom field",
|
|
"description": "Delete a custom field by its name\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Custom field has been deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"description": "The field is in use: remove all the associated data first",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$client->customFields()->delete('customers', 'testFieldName');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/customers": {
|
|
"get": {
|
|
"tags": [
|
|
"Customers"
|
|
],
|
|
"summary": "Retrieve a list of customers",
|
|
"description": "Retrieve a list of customers\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionFilter"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionQuery"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionExpand"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionFields"
|
|
},
|
|
{
|
|
"name": "sort",
|
|
"in": "query",
|
|
"description": "The collection items sort field and order (prefix with \"-\" for descending sort).",
|
|
"style": "form",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"id",
|
|
"-id",
|
|
"email",
|
|
"-email",
|
|
"createdTime",
|
|
"-createdTime",
|
|
"updatedTime",
|
|
"-updatedTime"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Accept",
|
|
"in": "header",
|
|
"description": "The response media type",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"application/json",
|
|
"text/csv"
|
|
],
|
|
"default": "application/json"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of Customers was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Customer"
|
|
}
|
|
}
|
|
},
|
|
"text/csv": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Customer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$customers = $client->customers()->search([\n 'filter' => 'firstName:John',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Customers"
|
|
],
|
|
"summary": "Create a customer",
|
|
"description": "Create a customer\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Customer was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Customer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$customerForm = new Rebilly\\Entities\\Customer();\n$customerForm->setFirstName('Sherlock');\n$customerForm->setLastName('Holmes');\n$customerForm->setEmail('sherlock.holmes@gmail.com');\n\ntry {\n $customer = $client->customers()->create($customerForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Customer"
|
|
}
|
|
}
|
|
},
|
|
"/customers/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Customers"
|
|
],
|
|
"summary": "Retrieve a customer",
|
|
"description": "Retrieve a customer with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Customer was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Customer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$customers = $client->customers()->load('myCustomerId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Customers"
|
|
],
|
|
"summary": "Create a customer with predefined ID",
|
|
"description": "Create a customer with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Customer was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Customer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Customer was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Customer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$customerForm = new Rebilly\\Entities\\Customer();\n$customerForm->setFirstName('Sherlock');\n$customerForm->setLastName('Holmes');\n$customerForm->setEmail('sherlock.holmes@gmail.com');\n\ntry {\n $customer = $client->customers()->update('myCustomerId', $customerForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Customer"
|
|
}
|
|
}
|
|
},
|
|
"/customers/{id}/lead-source": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Customers"
|
|
],
|
|
"summary": "Retrieve a customer's Lead Source",
|
|
"description": "Retrieve a Lead Source of given customer\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Lead Source was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/LeadSource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$customer = $client->customers()->load('myCustomerId');\n$leadSource = $customer->getLeadSource();\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Customers"
|
|
],
|
|
"summary": "Create a Lead Source for a customer",
|
|
"description": "Create a Lead Source for a customer\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Lead Source was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/LeadSource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Lead Source was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/LeadSource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$leadSourceForm = new Rebilly\\Entities\\LeadSource();\n$leadSourceForm->setSource('TestSource');\n$leadSourceForm->setCampaign('TestCampaign');\n\ntry {\n $customer = $client->customers()->updateLeadSource('myCustomerId', $leadSourceForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/LeadSource"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Customers"
|
|
],
|
|
"summary": "Delete a Lead Source for a customer",
|
|
"description": "Delete a Lead Source that belongs to a certain customer\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Lead Source was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"description": "Lead Source cannot be deleted"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$customer = $client->customers()->deleteLeadSource('myCustomerId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/disputes": {
|
|
"get": {
|
|
"tags": [
|
|
"Disputes"
|
|
],
|
|
"summary": "Retrieve a list of disputes",
|
|
"description": "Retrieve a list of disputes\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of disputes was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Dispute"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$disputes = $client->disputes()->search([\n 'filter' => 'transactionId:testId',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Disputes"
|
|
],
|
|
"summary": "Create a dispute",
|
|
"description": "Create a dispute\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Dispute was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Dispute"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$disputeForm = new Rebilly\\Entities\\Dispute();\n$disputeForm->setTransactionId('transactionId');\n$disputeForm->setCurrency('USD');\n$disputeForm->setAmount(10);\n$disputeForm->setReasonCode(1000);\n$disputeForm->setType($disputeForm::TYPE_1CB);\n$disputeForm->setStatus($disputeForm::STATUS_RESPONSE_NEEDED);\n$disputeForm->setPostedTime('2025-01-01 05:00:00');\n\ntry {\n $dispute = $client->disputes()->create($disputeForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Dispute"
|
|
}
|
|
}
|
|
},
|
|
"/disputes/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Disputes"
|
|
],
|
|
"summary": "Retrieve a dispute",
|
|
"description": "Retrieve a dispute with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Dispute was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Dispute"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$dispute = $client->disputes()->load('disputeId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Disputes"
|
|
],
|
|
"summary": "Create or update a Dispute with predefined ID",
|
|
"description": "Create or update a Dispute with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Dispute was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Dispute"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Dispute was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Dispute"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$disputeForm = new Rebilly\\Entities\\Dispute();\n$disputeForm->setTransactionId('transactionId');\n$disputeForm->setCurrency('USD');\n$disputeForm->setAmount(10);\n$disputeForm->setReasonCode(1000);\n$disputeForm->setType($disputeForm::TYPE_1CB);\n$disputeForm->setStatus($disputeForm::STATUS_RESPONSE_NEEDED);\n$disputeForm->setPostedTime('2025-01-01 05:00:00');\n\ntry {\n $dispute = $client->disputes()->update('disputeId', $dispute);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Dispute"
|
|
}
|
|
}
|
|
},
|
|
"/events": {
|
|
"get": {
|
|
"tags": [
|
|
"Events",
|
|
"Rules"
|
|
],
|
|
"summary": "Retrieve a list of existing events",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of System Events was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/SystemEvent"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/events/{eventType}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/systemEventType"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Events",
|
|
"Rules"
|
|
],
|
|
"summary": "Retrieve the event information",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Rules were retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SystemEvent"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/events/{eventType}/rules": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/systemEventType"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Events",
|
|
"Rules"
|
|
],
|
|
"summary": "Retrieve a list of rules for event",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Rules were retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RuleSet"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Events",
|
|
"Rules"
|
|
],
|
|
"summary": "Update the rules for event",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Rules were updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RuleSet"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/RuleSet"
|
|
}
|
|
}
|
|
},
|
|
"/events/{eventType}/rules/history": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/systemEventType"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Events",
|
|
"Rules"
|
|
],
|
|
"summary": "Retrieve the change history of the set of rules",
|
|
"description": "Retrieve the change history of the selected set of rules.\nThe history is updated each time you change the rules.\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionFilter"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionQuery"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionSort"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionFields"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionExpand"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "History was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/RuleSetHistoryItem"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/events/{eventType}/rules/history/{version}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/systemEventType"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/rulesVersion"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Events",
|
|
"Rules"
|
|
],
|
|
"summary": "Retrieve the record from the change history of the set of rules",
|
|
"description": "Retrieve the record from the change history of the selected set of rules.\nA history record is created each time you change the rules.\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionFields"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionExpand"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "History record was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RuleSetHistoryItem"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/events/{eventType}/rules/versions/{version}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/systemEventType"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/rulesVersion"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Events",
|
|
"Rules"
|
|
],
|
|
"summary": "Retrieve the version of the set of rules",
|
|
"description": "Retrieve the version of the selected set of rules.\nThe versions are created each time you change the rules.\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionFields"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionExpand"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Rules version was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RuleSetVersion"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/files": {
|
|
"get": {
|
|
"tags": [
|
|
"Files"
|
|
],
|
|
"summary": "Retrieve a list of files",
|
|
"description": "Retrieve a list of files\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionFilter"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionQuery"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionExpand"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionFields"
|
|
},
|
|
{
|
|
"name": "sort",
|
|
"in": "query",
|
|
"description": "The collection items sort field and order (prefix with \"-\" for descending sort).",
|
|
"style": "form",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"id",
|
|
"-id",
|
|
"name",
|
|
"-name",
|
|
"extension",
|
|
"-extension",
|
|
"size",
|
|
"-size",
|
|
"width",
|
|
"-width",
|
|
"height",
|
|
"-height",
|
|
"createdTime",
|
|
"-createdTime",
|
|
"updatedTime",
|
|
"-updatedTime"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of Files was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$files = $client->files()->search([\n 'filter' => 'name:TestFile',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Files"
|
|
],
|
|
"summary": "Create a file",
|
|
"description": "Create a file\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "File was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$fileForm = new Rebilly\\Entities\\File();\n$fileForm->setUrl('http://test.com/somefile.jpg');\n\ntry {\n $file = $client->files()->create($fileForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"description": "The file URL",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "Additionally, a file can be sent with a multipart/form-data POST request or the file's raw body can be sent as a request body",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/files/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Files"
|
|
],
|
|
"summary": "Retrieve a File",
|
|
"description": "Retrieve a File with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "File was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$file = $client->files()->load('fileId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Files"
|
|
],
|
|
"summary": "Update the File with predefined ID. Note that file can be uploaded with POST only.",
|
|
"description": "Update the File with predefined ID\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "File was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$fileForm = new Rebilly\\Entities\\File();\n$fileForm->setDescription('This is a test file');\n\ntry {\n $file = $client->files()->update('fileId', $fileForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/File"
|
|
}
|
|
}
|
|
},
|
|
"description": "File resource",
|
|
"required": true
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Files"
|
|
],
|
|
"summary": "Delete a File",
|
|
"description": "Delete the File with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "File was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$client->files()->delete('fileId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/files/{id}/download": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Files"
|
|
],
|
|
"summary": "Retrieve a file",
|
|
"description": "Retrieve a file\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "The file was retrieved successfully",
|
|
"headers": {
|
|
"Content-Length": {
|
|
"description": "The number of bytes in the file",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Content-Type": {
|
|
"description": "The MIME type of the file",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "string",
|
|
"readOnly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/files/{id}/download{extension}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
},
|
|
{
|
|
"name": "extension",
|
|
"in": "path",
|
|
"description": "File extension which also indicates the desired file format",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
".png",
|
|
".jpg"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Files"
|
|
],
|
|
"summary": "Used for converting images server-side",
|
|
"description": "Used for converting images server-side\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "The file was retrieved successfully",
|
|
"headers": {
|
|
"Content-Length": {
|
|
"description": "The number of bytes in the file",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Content-Type": {
|
|
"description": "The MIME type of the file",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "string",
|
|
"readOnly": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/forgot-password": {
|
|
"post": {
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Sends an email with a link containing a token to reset user password",
|
|
"description": "Sends an email with a link containing a token to reset user password\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Email sent successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$forgotPasswordForm = new Rebilly\\Entities\\Email();\n$forgotPasswordForm->setEmail('johndoe@test.com');\n\ntry {\n $client->users()->forgotPassword($forgotPasswordForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Email"
|
|
}
|
|
}
|
|
},
|
|
"description": "Email resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/gateway-accounts": {
|
|
"get": {
|
|
"tags": [
|
|
"Gateway Accounts"
|
|
],
|
|
"summary": "Retrieve a list of gateway accounts",
|
|
"description": "Retrieve a list of gateway accounts\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of Gateway Accounts was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$gatewayAccounts = $client->$gatewayAccounts()->search([\n 'filter' => 'currency:USD',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Gateway Accounts"
|
|
],
|
|
"summary": "Create a Gateway Account",
|
|
"description": "Create a Gateway Account\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Gateway Account was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$gatewayAccountForm = new Rebilly\\Entities\\GatewayAccount();\n\n$gatewayAccountForm->setGatewayName('A1Gateway');\n$gatewayAccountForm->setAcquirerName('Bank of Rebilly');\n$gatewayAccountForm->setOrganizationId('organizationId');\n$gatewayAccountForm->setMerchantCategoryCode(5734);\n$gatewayAccountForm->setWebsites([\n 'websiteId1',\n 'websiteId2',\n]);\n$gatewayAccountForm->setPaymentCardSchemes([\n Rebilly\\Entities\\PaymentCardScheme::SCHEME_VISA,\n Rebilly\\Entities\\PaymentCardScheme::SCHEME_MASTERCARD,\n]);\n$gatewayAccountForm->setMethod(Rebilly\\Entities\\PaymentMethod::METHOD_CASH);\n\n$gatewayConfig = [\n 'accountId' => 'test',\n 'password' => '123',\n];\n\n$gatewayAccountForm->setGatewayConfig($gatewayConfig);\n\ntry {\n $gatewayAccount = $client->gatewayAccounts()->create($gatewayAccountForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/GatewayAccount"
|
|
}
|
|
}
|
|
},
|
|
"/gateway-accounts/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Gateway Accounts"
|
|
],
|
|
"summary": "Retrieve a Gateway Account",
|
|
"description": "Retrieve a Gateway Account with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Gateway Account was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$gatewayAccount = $client->gatewayAccounts()->load('gatewayAccountId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Gateway Accounts"
|
|
],
|
|
"summary": "Create or update a Gateway Account with predefined ID",
|
|
"description": "Create or update a GatewayAccount with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Gateway Account was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Gateway Account was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$gatewayAccountForm = new Rebilly\\Entities\\GatewayAccount();\n\n$gatewayAccountForm->setGatewayName('A1Gateway');\n$gatewayAccountForm->setAcquirerName('Bank of Rebilly');\n$gatewayAccountForm->setOrganizationId('organizationId');\n$gatewayAccountForm->setMerchantCategoryCode(5734);\n$gatewayAccountForm->setWebsites([\n 'websiteId1',\n 'websiteId2',\n]);\n$gatewayAccountForm->setPaymentCardSchemes([\n Rebilly\\Entities\\PaymentCardScheme::SCHEME_VISA,\n Rebilly\\Entities\\PaymentCardScheme::SCHEME_MASTERCARD,\n]);\n$gatewayAccountForm->setMethod(Rebilly\\Entities\\PaymentMethod::METHOD_CASH);\n\n$gatewayConfig = [\n 'accountId' => 'test',\n 'password' => '123',\n];\n\n$gatewayAccountForm->setGatewayConfig($gatewayConfig);\n\ntry {\n $gatewayAccount = $client->gatewayAccounts()->update('gatewayAccountId', $gatewayAccountForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/GatewayAccount"
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"Gateway Accounts"
|
|
],
|
|
"summary": "Update a Gateway Account with predefined ID",
|
|
"description": "Update a GatewayAccount with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Gateway Account was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/GatewayAccount"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Gateway Accounts"
|
|
],
|
|
"summary": "Delete a Gateway Account",
|
|
"description": "Delete a Gateway Account with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Gateway Account was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "try {\n $client->gatewayAccounts()->delete('gatewayAccountId');\n} catch (ServerException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/invoices": {
|
|
"get": {
|
|
"tags": [
|
|
"Invoices"
|
|
],
|
|
"summary": "Retrieve a list of invoices",
|
|
"description": "Retrieve a list of invoices\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
},
|
|
{
|
|
"name": "Accept",
|
|
"in": "header",
|
|
"description": "The response media type",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"application/json",
|
|
"text/csv"
|
|
],
|
|
"default": "application/json"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of invoices was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Invoice"
|
|
}
|
|
}
|
|
},
|
|
"text/csv": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Invoice"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$invoices = $client->invoices()->search([\n 'filter' => 'customerId:testCustomerId',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Invoices"
|
|
],
|
|
"summary": "Create an invoice",
|
|
"description": "Create an invoice\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Invoice was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Invoice"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$invoiceForm = new Rebilly\\Entities\\Invoice();\n$invoiceForm->setCustomerId('customerId');\n$invoiceForm->setWebsiteId('websiteId');\n$invoiceForm->setCurrency('USD');\n\ntry {\n $invoice = $client->invoices()->create($invoiceForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Invoice"
|
|
}
|
|
}
|
|
},
|
|
"/invoices/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Invoices"
|
|
],
|
|
"summary": "Retrieve an invoice",
|
|
"description": "Retrieve an invoice with specified identifier string\n",
|
|
"parameters": [
|
|
{
|
|
"name": "Accept",
|
|
"in": "header",
|
|
"description": "The response media type",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"application/json",
|
|
"application/pdf"
|
|
],
|
|
"default": "application/json"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Invoice was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Invoice"
|
|
}
|
|
},
|
|
"application/pdf": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Invoice"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$invoice = $client->invoices()->load('invoiceId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Invoices"
|
|
],
|
|
"summary": "Create or update an invoice with predefined ID",
|
|
"description": "Create or update an invoice with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Invoice was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Invoice"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Invoice was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Invoice"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$invoiceForm = new Rebilly\\Entities\\Invoice();\n$invoiceForm->setCustomerId('customerId');\n$invoiceForm->setWebsiteId('websiteId');\n$invoiceForm->setCurrency('USD');\n\ntry {\n $invoice = $client->invoices()->update('invoiceId', $invoiceForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Invoice"
|
|
}
|
|
}
|
|
},
|
|
"/invoices/{id}/abandon": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Invoices"
|
|
],
|
|
"summary": "Abandon an invoice",
|
|
"description": "Abandon an invoice with specified identifier string\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Invoice was abandoned successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Invoice"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$invoice = $client->invoices()->abandon('invoiceId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/invoices/{id}/issue": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Invoices"
|
|
],
|
|
"summary": "Issue an invoice",
|
|
"description": "Issue an invoice with specified identifier string\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Invoice was issued successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Invoice"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$invoice = $client->invoices()->issue('invoiceId', '2025-01-01 05:00:00');\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvoiceIssue"
|
|
}
|
|
}
|
|
},
|
|
"description": "InvoiceIssue resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/invoices/{id}/items": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Invoices"
|
|
],
|
|
"summary": "Retrieve invoice items",
|
|
"description": "Retrieve an invoice items with specified invoice identifier string\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Invoice items were retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/InvoiceItem"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$invoiceItems = $client->invoiceItems()->search('invoiceId', [\n 'filter' => 'quantity:5',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Invoices"
|
|
],
|
|
"summary": "Create an invoice item",
|
|
"description": "Create an invoice item\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "InvoiceItem was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvoiceItem"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$invoiceItemForm = new Rebilly\\Entities\\InvoiceItem();\n$invoiceItemForm->setType($invoiceItemForm::TYPE_DEBIT);\n$invoiceItemForm->setUnitPrice(0.99);\n$invoiceItemForm->setQuantity(5);\n\ntry {\n $invoiceItem = $client->invoiceItems()->create($invoiceItemForm, 'invoiceId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvoiceItem"
|
|
}
|
|
}
|
|
},
|
|
"description": "InvoiceItem resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/invoices/{id}/lead-source": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Invoices"
|
|
],
|
|
"summary": "Retrieve an invoice's Lead Source",
|
|
"description": "Retrieve a Lead Source of given invoice\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Lead Source was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/LeadSource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$invoice = $client->invoices()->load('invoiceId');\n$leadSource = $invoice->getLeadSource();\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Invoices"
|
|
],
|
|
"summary": "Create a Lead Source for an invoice",
|
|
"description": "Create a Lead Source for an invoice\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Lead Source was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/LeadSource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Lead Source was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/LeadSource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$leadSourceForm = new Rebilly\\Entities\\LeadSource();\n$leadSourceForm->setSource('TestSource');\n$leadSourceForm->setCampaign('TestCampaign');\n\ntry {\n $invoice = $client->invoices()->updateLeadSource('invoiceId', $leadSourceForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/LeadSource"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Invoices"
|
|
],
|
|
"summary": "Delete a Lead Source for an invoice",
|
|
"description": "Delete a Lead Source that belongs to a certain invoice\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Lead Source was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"description": "Lead Source cannot be deleted"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$invoice = $client->invoices()->deleteLeadSource('invoiceId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/invoices/{id}/void": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Invoices"
|
|
],
|
|
"summary": "Void an invoice",
|
|
"description": "Void an invoice with specified identifier string\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Invoice was voided successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Invoice"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$invoice = $client->invoices()->void('invoiceId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/layouts": {
|
|
"get": {
|
|
"tags": [
|
|
"Layouts"
|
|
],
|
|
"summary": "Retrieve a layout list",
|
|
"description": "Retrieve a layout list\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Layout list was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Layout"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$layouts = $client->layouts()->search([\n 'filter' => 'name:TestLayout',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Layouts"
|
|
],
|
|
"summary": "Create a layout",
|
|
"description": "Create a layout\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Layout was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Layout"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$layoutForm = new Rebilly\\Entities\\Layout();\n$layoutItemForm = new Rebilly\\Entities\\LayoutItem();\n\n$layoutItemForm->setPlanId('planId');\n$layoutItemForm->setStarred(false);\n\n$layoutForm->setName('TestLayout');\n$layoutForm->setLayoutItems([\n $layoutItemForm,\n]);\n\ntry {\n $layout = $client->layouts()->create($layoutForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Layout"
|
|
}
|
|
}
|
|
},
|
|
"/layouts/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Layouts"
|
|
],
|
|
"summary": "Retrieve a layout",
|
|
"description": "Retrieve a layout with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Layout was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Layout"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$layout = $client->layouts()->load('layoutId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Layouts"
|
|
],
|
|
"summary": "Create or update a layout with predefined ID",
|
|
"description": "Create or update a layout with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Layout was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Layout"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Layout was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Layout"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$layoutForm = new Rebilly\\Entities\\Layout();\n$layoutItemForm = new Rebilly\\Entities\\LayoutItem();\n\n$layoutItemForm->setPlanId('planId');\n$layoutItemForm->setStarred(false);\n\n$layoutForm->setName('TestLayout');\n$layoutForm->setLayoutItems([\n $layoutItemForm,\n]);\n\ntry {\n $layout = $client->layouts()->update('layoutId', $layoutForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Layout"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Layouts"
|
|
],
|
|
"summary": "Delete a layout",
|
|
"description": "Delete a layout with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Layout was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$client->layouts()->delete('layoutId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/lists": {
|
|
"get": {
|
|
"tags": [
|
|
"Lists"
|
|
],
|
|
"summary": "Retrieve a collection of Lists (latest version of each List)",
|
|
"description": "Retrieve a collection of Lists\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionFilter"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionCriteria"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionSort"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A collection of Lists was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/List"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Lists"
|
|
],
|
|
"summary": "Create a List",
|
|
"description": "Create a List\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "List was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/List"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/List"
|
|
}
|
|
}
|
|
},
|
|
"/lists/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Lists"
|
|
],
|
|
"summary": "Retrieve list's latest version",
|
|
"description": "Retrieve latest version of List with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "List was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/List"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Lists"
|
|
],
|
|
"summary": "Create or update a list with predefined ID",
|
|
"description": "Create or update a list with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "List was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/List"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "List was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/List"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/List"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Lists"
|
|
],
|
|
"summary": "Delete a list",
|
|
"description": "Delete a list with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "List was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"description": "List is used in Rules and cannot be deleted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/lists/{id}/{version}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
},
|
|
{
|
|
"name": "version",
|
|
"in": "path",
|
|
"required": true,
|
|
"description": "List version",
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
}
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Lists"
|
|
],
|
|
"summary": "Retrieve List's exact version",
|
|
"responses": {
|
|
"200": {
|
|
"description": "List's exact version was retrieved successfully",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/List"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/notes": {
|
|
"get": {
|
|
"tags": [
|
|
"Notes"
|
|
],
|
|
"summary": "Retrieve a list of notes",
|
|
"description": "Retrieve a list of notes\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of Notes was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Note"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$notes = $client->notes()->search([\n 'filter' => 'relatedType:customer',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Notes"
|
|
],
|
|
"summary": "Create a note",
|
|
"description": "Create a note\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Note was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Note"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$noteForm = new Rebilly\\Entities\\Note();\n$noteForm->setRelatedId('customerId');\n$noteForm->setRelatedType(Rebilly\\Entities\\ResourceType::TYPE_CUSTOMER);\n$noteForm->setContent('Test Note');\n\ntry {\n $note = $client->notes()->create($noteForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Note"
|
|
}
|
|
}
|
|
},
|
|
"/notes/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Notes"
|
|
],
|
|
"summary": "Retrieve a note",
|
|
"description": "Retrieve a note with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Note was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Note"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$note = $client->notes()->load('noteId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Notes"
|
|
],
|
|
"summary": "Create or update a note with predefined ID",
|
|
"description": "Create or update a note with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Note was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Note"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Note was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Note"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$noteForm = new Rebilly\\Entities\\Note();\n$noteForm->setRelatedId('customerId');\n$noteForm->setRelatedType(Rebilly\\Entities\\ResourceType::TYPE_CUSTOMER);\n$noteForm->setContent('Test Note');\n\ntry {\n $note = $client->notes()->update('noteId', $noteForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Note"
|
|
}
|
|
}
|
|
},
|
|
"/organizations": {
|
|
"get": {
|
|
"tags": [
|
|
"Organizations"
|
|
],
|
|
"summary": "Retrieve a list of organizations",
|
|
"description": "Retrieve a list of organizations\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of organizations was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Organization"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$organizations = $client->organizations()->search([\n 'filter' => 'city:Test',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Organizations"
|
|
],
|
|
"summary": "Create a organization",
|
|
"description": "Create a organization\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Organization was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Organization"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$organizationForm = new Rebilly\\Entities\\Organization();\n$organizationForm->setName('Test Organization');\n$organizationForm->setCountry('US');\n\ntry {\n $organization = $client->organizations()->create($organizationForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Organization"
|
|
}
|
|
}
|
|
},
|
|
"/organizations/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Organizations"
|
|
],
|
|
"summary": "Retrieve a organization",
|
|
"description": "Retrieve a organization with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Organization was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Organization"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$organization = $client->organizations()->load('organizationId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Organizations"
|
|
],
|
|
"summary": "Create or update a organization with predefined ID",
|
|
"description": "Create or update a organization with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Organization was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Organization"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Organization was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Organization"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$organizationForm = new Rebilly\\Entities\\Organization();\n$organizationForm->setName('Test Organization');\n$organizationForm->setCountry('US');\n\ntry {\n $organization = $client->organizations()->update('organizationId', $organizationForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Organization"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Organizations"
|
|
],
|
|
"summary": "Delete a organization",
|
|
"description": "Delete a organization with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Organization was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"description": "Organization has related resources and cannot be deleted",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/password-tokens": {
|
|
"get": {
|
|
"tags": [
|
|
"Customer Authentication"
|
|
],
|
|
"summary": "Retrieve a list of tokens",
|
|
"description": "Retrieve a list of tokens\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of Reset Password Tokens was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ResetPasswordToken"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$resetPasswordTokens = $client->resetPasswordTokens()->search([\n 'filter' => 'token:string',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Customer Authentication"
|
|
],
|
|
"summary": "Create a Reset Password Token",
|
|
"description": "Create a Reset Password Token\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Reset Password Token was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResetPasswordToken"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$resetPasswordTokenForm = new Rebilly\\Entities\\ResetPasswordToken();\n$resetPasswordTokenForm->setUserName('test');\n$resetPasswordTokenForm->setPassword('1234');\n\ntry {\n $$resetPasswordToken = $client->resetPasswordTokens()->create($resetPasswordTokenForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResetPasswordToken"
|
|
}
|
|
}
|
|
},
|
|
"description": "ResetPasswordToken resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/password-tokens/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Customer Authentication"
|
|
],
|
|
"summary": "Retrieve a Reset Password Token",
|
|
"description": "Retrieve a Reset Password Token with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "ResetPasswordToken was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResetPasswordToken"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$resetPasswordToken = $client->resetPasswordTokens()->load('tokenId');\n"
|
|
}
|
|
]
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Customer Authentication"
|
|
],
|
|
"summary": "Delete a Reset Password Token",
|
|
"description": "Delete a Reset Password Token with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "ResetPasswordToken was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"description": "ResetPasswordToken has related resources and cannot be deleted"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "try {\n $client->websites()->delete('websiteId');\n} catch (ServerException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/payment-cards-migrations": {
|
|
"get": {
|
|
"tags": [
|
|
"Migrate payment cards"
|
|
],
|
|
"summary": "Retrieve a list of payment cards ready for migration",
|
|
"description": "Retrieve a list of payment cards ready for migration\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of payment cards was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/PaymentCard"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$paymentCardMigrations = $client->paymentCardMigrations()->search([\n 'filter' => 'status:active',\n]);\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/payment-cards-migrations/migrate": {
|
|
"post": {
|
|
"tags": [
|
|
"Migrate payment cards"
|
|
],
|
|
"summary": "Migrate payment cards to another gateway account",
|
|
"description": "Migrate payment cards to another gateway account\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Migration command was accepted",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PaymentCardMigrationResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$paymentCardMigrationForm = new Rebilly\\Entities\\PaymentCardMigrationsRequest();\n$paymentCardMigrationForm->setFromGatewayAccountId('gatewayAccountId');\n$paymentCardMigrationForm->setToGatewayAccountId('newGatewayAccountId');\n\n$paymentCardIds = [\n 'testPaymentCardId',\n 'testPaymentCardId2',\n];\n\n$paymentCardMigrationForm->setPaymentCardIds($paymentCardIds)\n\ntry {\n $paymentCardMigrationResponse = $client->paymentCardMigrations()->migrate($paymentCardMigrationForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PaymentCardMigrationRequest"
|
|
}
|
|
}
|
|
},
|
|
"description": "Payment card migration attributes",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/payment-cards": {
|
|
"get": {
|
|
"tags": [
|
|
"Payment Cards"
|
|
],
|
|
"summary": "Retrieve a list of Payment Cards",
|
|
"description": "Retrieve a list of Payments Cards\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of Payment Card was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/PaymentCard"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$paymentCards = $client->paymentCards()->search([\n 'filter' => 'status:active',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Payment Cards"
|
|
],
|
|
"summary": "Create a Payment Card",
|
|
"description": "Create a Payment Card\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Payment Card was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PaymentCard"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$paymentCardForm = new Rebilly\\Entities\\PaymentCard();\n$paymentCardForm->setCustomerId('customerId');\n$paymentCardForm->setPan('4111111111111111');\n$paymentCardForm->setExpYear(2025);\n$paymentCardForm->setExpMonth(8);\n$paymentCardForm->setBillingContactId('contactId');\n\ntry {\n $paymentCard = $client->paymentCards()->create($paymentCardForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PaymentCard"
|
|
}
|
|
}
|
|
},
|
|
"description": "PaymentCard resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/payment-cards/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Payment Cards"
|
|
],
|
|
"summary": "Retrieve a Payment Card",
|
|
"description": "Retrieve a Payment Card with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "PaymentCard was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PaymentCard"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$paymentCard = $client->paymentCards()->load('paymentCardId');\n"
|
|
}
|
|
]
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"Payment Cards"
|
|
],
|
|
"summary": "Update a payment card's cvv value with predefined ID",
|
|
"description": "Update a payment card's cvv value with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Gateway Account was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PaymentCard"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cvv": {
|
|
"description": "Card's cvv (card verification value).",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "Payment card",
|
|
"required": true
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Payment Cards"
|
|
],
|
|
"summary": "Create a payment card with predefined ID",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Payment card was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PaymentCard"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"409": {
|
|
"description": "Payment card already exists and cannot be updated",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$paymentCardForm = new Rebilly\\Entities\\PaymentCard();\n$paymentCardForm->setCustomerId('customerId');\n$paymentCardForm->setPan('4111111111111111');\n$paymentCardForm->setExpYear(2025);\n$paymentCardForm->setExpMonth(8);\n$paymentCardForm->setBillingContactId('contactId');\n\ntry {\n $paymentCard = $client->paymentCards()->create($paymentCardForm, 'paymentCardId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PaymentCard"
|
|
}
|
|
}
|
|
},
|
|
"description": "Payment card",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/payment-cards/{id}/authorization": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Payment Cards"
|
|
],
|
|
"summary": "Authorize a Payment Card",
|
|
"description": "Authorize a Payment Card\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Authorization successful",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PaymentCard"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$paymentCardAuthorizationForm = new Rebilly\\Entities\\PaymentCardAuthorization();\n$paymentCardAuthorizationForm->setWebsiteId('websiteId');\n$paymentCardAuthorizationForm->setCurrency('USD');\n$paymentCardAuthorizationForm->setGatewayAccountId('gatewayAccountId');\n\ntry {\n $paymentCard = $client->paymentCards()->authorize('paymentCardId', $paymentCardAuthorizationForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"websiteId",
|
|
"currency"
|
|
],
|
|
"properties": {
|
|
"websiteId": {
|
|
"description": "The Website ID",
|
|
"type": "string"
|
|
},
|
|
"currency": {
|
|
"description": "Currency (three letter code)",
|
|
"type": "string"
|
|
},
|
|
"gatewayAccountId": {
|
|
"description": "The Gateway account ID",
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"description": "Amount",
|
|
"type": "number",
|
|
"format": "double"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "Payment Card resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/payment-cards/{id}/deactivation": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Payment Cards"
|
|
],
|
|
"summary": "Deactivate a Payment Card",
|
|
"description": "Deactivate a Payment Card\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Authorization successful",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PaymentCard"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$client->paymentCards()->deactivate('paymentCardId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/payments": {
|
|
"get": {
|
|
"tags": [
|
|
"Payments"
|
|
],
|
|
"summary": "Retrieve a payment list",
|
|
"description": "Retrieve a payment list\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
},
|
|
{
|
|
"name": "Accept",
|
|
"in": "header",
|
|
"description": "The response media type",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"application/json",
|
|
"text/csv"
|
|
],
|
|
"default": "application/json"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Payment list was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Payment"
|
|
}
|
|
}
|
|
},
|
|
"text/csv": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Payment"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$payments = $client->payments()->search([\n 'filter' => 'currency:USD',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Payments"
|
|
],
|
|
"summary": "Create a payment",
|
|
"description": "Create a payment\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Payment was processed",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Payment"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"202": {
|
|
"description": "Payment was accepted",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Payment"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$paymentForm = new Rebilly\\Entities\\Payment();\n\n$paymentForm->setWebsiteId('websiteId');\n$paymentForm->setCustomerId('customerId');\n$paymentForm->setCurrency('USD');\n$paymentForm->setAmount(1.99);\n\n$data = [\n 'method' => Rebilly\\Entities\\PaymentMethod::METHOD_CASH,\n];\n\n$paymentInstrumentForm = new Rebilly\\Entities\\PaymentMethodInstrument($data);\n\n$paymentForm->setPaymentInstrument($paymentInstrumentForm);\n\ntry {\n $payment = $client->payments()->create($paymentForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Payment"
|
|
}
|
|
}
|
|
},
|
|
"/payments/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Payments"
|
|
],
|
|
"summary": "Retrieve a payment",
|
|
"description": "Retrieve a payment with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Payment was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Payment"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$payment = $client->payments()->load('paymentId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Payments"
|
|
],
|
|
"summary": "Create a payment with predefined ID",
|
|
"description": "Make a payment with predefined identifier string\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Payment was processed",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Payment"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"202": {
|
|
"description": "Payment was accepted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Payment"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$paymentForm = new Rebilly\\Entities\\Payment();\n\n$paymentForm->setWebsiteId('websiteId');\n$paymentForm->setCustomerId('customerId');\n$paymentForm->setCurrency('USD');\n$paymentForm->setAmount(1.99);\n\n$data = [\n 'method' => Rebilly\\Entities\\PaymentMethod::METHOD_CASH,\n];\n\n$paymentInstrumentForm = new Rebilly\\Entities\\PaymentMethodInstrument($data);\n\n$paymentForm->setPaymentInstrument($paymentInstrumentForm);\n\ntry {\n $payment = $client->payments()->update('paymentId', $paymentForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Payment"
|
|
}
|
|
}
|
|
},
|
|
"/paypal-accounts": {
|
|
"get": {
|
|
"tags": [
|
|
"PayPal Accounts"
|
|
],
|
|
"summary": "Retrieve a list of PayPal accounts",
|
|
"description": "Retrieve a list of PayPal Accounts\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of PayPal Accounts was retrieved successfully",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/PayPalAccount"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"PayPal Accounts"
|
|
],
|
|
"summary": "Create a PayPal Account",
|
|
"description": "Create a PayPal Account\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "PayPal Account was created",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PayPalAccount"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PayPalAccount"
|
|
}
|
|
}
|
|
},
|
|
"description": "PayPalAccount resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/paypal-accounts/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"PayPal Accounts"
|
|
],
|
|
"summary": "Retrieve a PayPal Account",
|
|
"description": "Retrieve a PayPal Account with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "PayPal Account was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PayPalAccount"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"PayPal Accounts"
|
|
],
|
|
"summary": "Create a PayPal account with predefined ID",
|
|
"responses": {
|
|
"201": {
|
|
"description": "PayPal Account was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PayPalAccount"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"409": {
|
|
"description": "PayPal Account exist and cannot be updated",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PayPalAccount"
|
|
}
|
|
}
|
|
},
|
|
"description": "PayPal Account",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/paypal-accounts/{id}/activation": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"PayPal Accounts"
|
|
],
|
|
"summary": "Activate a PayPal Account",
|
|
"description": "Activate a PayPal Account\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Activate successful",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PayPalAccount"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"websiteId",
|
|
"currency"
|
|
],
|
|
"properties": {
|
|
"websiteId": {
|
|
"description": "The Website ID",
|
|
"type": "string"
|
|
},
|
|
"currency": {
|
|
"description": "Currency (three letter code)",
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"description": "The amount to authorize",
|
|
"type": "number",
|
|
"format": "double",
|
|
"default": 1
|
|
},
|
|
"redirectURLs": {
|
|
"description": "Redirect URLs",
|
|
"type": "object"
|
|
},
|
|
"gatewayAccountId": {
|
|
"description": "The Gateway Account ID which use to send transactions",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "PayPal Account resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/paypal-accounts/{id}/deactivation": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"PayPal Accounts"
|
|
],
|
|
"summary": "Deactivate a PayPal Account",
|
|
"description": "Deactivate a PayPal Account\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Deactivate successful",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PayPalAccount"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/plans": {
|
|
"get": {
|
|
"tags": [
|
|
"Plans"
|
|
],
|
|
"summary": "Retrieve a list of plans",
|
|
"description": "Retrieve a list of plans\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of Plans was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Plan"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$plans = $client->plans()->search([\n 'filter' => 'name:TestPlan',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Plans"
|
|
],
|
|
"summary": "Create a plan",
|
|
"description": "Create a plan\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Plan was created",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Plan"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$planForm = new Rebilly\\Entities\\Plan();\n$planForm->setName('TestPlan');\n$planForm->setCurrency('USD');\n$planForm->setTrialAmount(1);\n$planForm->setTrialPeriodUnit('day');\n$planForm->setTrialPeriodLength(1);\n\ntry {\n $plan = $client->plans()->create($planForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Plan"
|
|
}
|
|
}
|
|
},
|
|
"/plans/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Plans"
|
|
],
|
|
"summary": "Retrieve a plan",
|
|
"description": "Retrieve a plan with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Plan was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Plan"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$plan = $client->plans()->load('planId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Plans"
|
|
],
|
|
"summary": "Create or update a Plan with predefined ID",
|
|
"description": "Create or update a Plan with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Plan was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Plan"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Plan was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Plan"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$planForm = new Rebilly\\Entities\\Plan();\n$planForm->setName('TestPlan');\n$planForm->setCurrency('USD');\n$planForm->setTrialAmount(1);\n$planForm->setTrialPeriodUnit('day');\n$planForm->setTrialPeriodLength(1);\n\ntry {\n $plan = $client->plans()->update('planId', $planForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Plan"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Plans"
|
|
],
|
|
"summary": "Delete a Plan",
|
|
"description": "Delete a Plan with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Plan was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$client->plans()->delete('planId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/previews/rule-actions/send-email": {
|
|
"post": {
|
|
"tags": [
|
|
"Rules"
|
|
],
|
|
"summary": "Send a test email",
|
|
"description": "Send a test email\n",
|
|
"security": [
|
|
{
|
|
"RebAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Test email was sent",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SendTestEmail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SendTestEmail"
|
|
}
|
|
}
|
|
},
|
|
"description": "Test email resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/previews/rule-actions/trigger-webhook": {
|
|
"post": {
|
|
"tags": [
|
|
"Rules"
|
|
],
|
|
"summary": "Trigger a test webhook",
|
|
"description": "Trigger a test webhook\n",
|
|
"security": [
|
|
{
|
|
"RebAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Test webhook was triggered",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SendPreviewWebhook"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SendPreviewWebhook"
|
|
}
|
|
}
|
|
},
|
|
"description": "Test webhook resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/previews/webhooks": {
|
|
"post": {
|
|
"tags": [
|
|
"Webhooks"
|
|
],
|
|
"summary": "Trigger a test webhook",
|
|
"description": "Trigger a test webhook\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Test webhook was triggered",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/GlobalWebhook"
|
|
}
|
|
}
|
|
},
|
|
"/products": {
|
|
"get": {
|
|
"tags": [
|
|
"Products"
|
|
],
|
|
"summary": "Retrieve a list of products",
|
|
"description": "Retrieve a list of products\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of products was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Product"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Products"
|
|
],
|
|
"summary": "Create a Product",
|
|
"description": "Create a Product\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Product was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Product"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Product"
|
|
}
|
|
}
|
|
},
|
|
"/products/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Products"
|
|
],
|
|
"summary": "Retrieve a product",
|
|
"description": "Retrieve a product with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Product was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Product"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Products"
|
|
],
|
|
"summary": "Create a product with predefined ID",
|
|
"description": "Create a product with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Product was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Product"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Product was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Product"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Product"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Products"
|
|
],
|
|
"summary": "Delete a product",
|
|
"description": "Delete a product with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Product was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/profile": {
|
|
"get": {
|
|
"tags": [
|
|
"Profile"
|
|
],
|
|
"summary": "Retrieve user's profile",
|
|
"description": "Retrieve user's profile\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Profile was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Profile"
|
|
],
|
|
"summary": "Update user's profile",
|
|
"description": "Update user's profile\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Profile was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
}
|
|
},
|
|
"description": "Profile resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/profile/password": {
|
|
"post": {
|
|
"tags": [
|
|
"Profile"
|
|
],
|
|
"summary": "Updates user's password with the specified newPassword",
|
|
"description": "Updates user's password with the specified newPassword. And checks if currentPassword matches the actual one.\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Password updated successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/UpdatePassword"
|
|
}
|
|
}
|
|
},
|
|
"/profile/totp-reset": {
|
|
"post": {
|
|
"tags": [
|
|
"Profile"
|
|
],
|
|
"summary": "Reset (renew) totpSecret",
|
|
"description": "Reset (renew) totpSecret\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "totpSecret reset (renewed) successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/queue/custom-events": {
|
|
"get": {
|
|
"tags": [
|
|
"Custom Events"
|
|
],
|
|
"summary": "Retrieve a list of scheduled custom events",
|
|
"description": "Retrieve a list of scheduled custom events\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of scheduled custom events was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/CustomEvent"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/queue/custom-events/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Custom Events"
|
|
],
|
|
"summary": "Retrieve a scheduled custom event",
|
|
"description": "Retrieve a scheduled custom event with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Scheduled custom event was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CustomEvent"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"303": {
|
|
"description": "Custom event was successfully processed and moved out from queue",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CustomEvent"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Custom Events"
|
|
],
|
|
"summary": "Delete a scheduled custom event",
|
|
"description": "Delete a scheduled custom event with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": "Scheduled custom event was deleted"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/queue/payments": {
|
|
"get": {
|
|
"tags": [
|
|
"Payments"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"summary": "Retrieve a scheduled payment list",
|
|
"description": "Retrieve a scheduled payment list\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful retrieve the payments list that still waiting to be processed",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Payment"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$payments = $client->payments()->searchInQueue([\n 'filter' => 'currency:USD',\n]);\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/queue/payments/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Payments"
|
|
],
|
|
"summary": "Retrieve a scheduled payment",
|
|
"description": "Retrieve a payment with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful retrieve the payment that still waiting to be processed",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Payment"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"303": {
|
|
"description": "Payment was successfully processed and moved out from queue",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Payment"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$payment = $client->payments()->loadFromQueue('paymentId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Payments"
|
|
],
|
|
"summary": "Update pending payment",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Payment was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Payment"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"description": "Payment is already handled and cannot be updated"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Payment"
|
|
}
|
|
}
|
|
},
|
|
"/sessions": {
|
|
"get": {
|
|
"tags": [
|
|
"Sessions"
|
|
],
|
|
"summary": "Retrieve a list of sessions",
|
|
"description": "Retrieve a list of sessions\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of Sessions was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Session"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$sessions = $client->sessions()->search([\n 'filter' => 'userId:testUserId',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Sessions"
|
|
],
|
|
"summary": "Create a session",
|
|
"description": "Create a session\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Session was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Session"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$sessionForm = new Rebilly\\Entities\\Session();\n\n$permissions = [\n // Example permission to use GET and POST methods only for certain Customers\n [\n 'resourceName' => Rebilly\\Entities\\ResourceType::TYPE_CUSTOMERS,\n 'methods' => [\n $sessionForm::METHOD_GET,\n $sessionForm::METHOD_POST,\n ],\n 'resourceIds' => [\n 'testCustomerId',\n 'testCustomerId2',\n ],\n ],\n // Example permission to use all methods for Websites resource\n [\n 'resourceName' => Rebilly\\Entities\\ResourceType::TYPE_WEBSITES,\n 'methods' => [\n $sessionForm::METHOD_GET,\n $sessionForm::METHOD_POST,\n $sessionForm::METHOD_PUT,\n $sessionForm::METHOD_HEAD,\n $sessionForm::METHOD_DELETE,\n ],\n ],\n // Example permission to use all methods for all resources\n [],\n];\n\n$sessionForm->setPermissions($permissions);\n\ntry {\n $session = $client->sessions()->create($sessionForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Session"
|
|
}
|
|
}
|
|
},
|
|
"description": "Sessions resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/sessions/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Sessions"
|
|
],
|
|
"summary": "Retrieve a Session",
|
|
"description": "Retrieve a Session with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Session was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Session"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$session = $client->sessions()->load('sessionId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Sessions"
|
|
],
|
|
"summary": "Create or update a Session with predefined ID",
|
|
"description": "Create or update a Session with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Session was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Session"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Session was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Session"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$sessionForm = new Rebilly\\Entities\\Session();\n\n$permissions = [\n [\n 'resourceName' => Rebilly\\Entities\\ResourceType::TYPE_CUSTOMERS,\n 'methods' => [\n $sessionForm::METHOD_GET,\n $sessionForm::METHOD_POST,\n ],\n 'resourceIds' => [\n 'testCustomerId',\n 'testCustomerId2',\n ],\n ],\n [\n 'resourceName' => Rebilly\\Entities\\ResourceType::TYPE_WEBSITES,\n 'methods' => [\n $sessionForm::METHOD_GET,\n $sessionForm::METHOD_POST,\n ],\n 'resourceIds' => [\n 'testWebsiteId',\n 'testWebsiteId2',\n ],\n ],\n];\n\n$sessionForm->setPermissions($permissions);\n\ntry {\n $session = $client->sessions()->update('sessionId', $sessionForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Session"
|
|
}
|
|
}
|
|
},
|
|
"description": "Session resource",
|
|
"required": true
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Sessions"
|
|
],
|
|
"summary": "Delete a Session",
|
|
"description": "Delete a Session with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Session was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"description": "Session has related resources and cannot be deleted"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "try {\n $client->sessions()->delete('sessionId');\n} catch (ServerException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/shipping-zones": {
|
|
"get": {
|
|
"tags": [
|
|
"Shipping Zones"
|
|
],
|
|
"summary": "Retrieve a list of shipping zones",
|
|
"description": "Retrieve a list of shipping zones\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of shipping zones was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ShippingZone"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Shipping Zones"
|
|
],
|
|
"summary": "Create a Shipping Zone",
|
|
"description": "Create a Shipping Zone\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Shipping Zone was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ShippingZone"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ShippingZone"
|
|
}
|
|
}
|
|
},
|
|
"description": "Shipping Zone resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/shipping-zones/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Shipping Zones"
|
|
],
|
|
"summary": "Retrieve a shipping zone",
|
|
"description": "Retrieve a shipping zone with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Shipping zone was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ShippingZone"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Shipping Zones"
|
|
],
|
|
"summary": "Create a shipping zone with predefined ID",
|
|
"description": "Create a shipping zone with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Shipping zone was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ShippingZone"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Shipping zone was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ShippingZone"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ShippingZone"
|
|
}
|
|
}
|
|
},
|
|
"description": "Shipping zone resource",
|
|
"required": true
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Shipping Zones"
|
|
],
|
|
"summary": "Delete a shipping zone",
|
|
"description": "Delete a shipping zone with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Shipping zone was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/signin": {
|
|
"post": {
|
|
"tags": [
|
|
"Users",
|
|
"Sessions"
|
|
],
|
|
"summary": "Create a session with email and password",
|
|
"description": "Create a session with email and password\n",
|
|
"security": [],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Session was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Session"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$loginForm = new Rebilly\\Entities\\Login();\n$loginForm->setEmail('test@test.com');\n$loginForm->setPassword('1234');\n\ntry {\n $user = $client->users()->signin($loginForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Signin"
|
|
}
|
|
}
|
|
},
|
|
"description": "Signin resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/signup": {
|
|
"post": {
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Creates a new user and sends an email confirmation",
|
|
"description": "Creates a new user and sends an email confirmation\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "User was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$signupForm = new Rebilly\\Entities\\Signup();\n$signupForm->setFirstName('John');\n$signupForm->setLastName('Doe');\n$signupForm->setEmail('johndoe@test.com');\n$signupForm->setBusinessPhone('+123456789');\n$signupForm->setPassword('1234');\n\ntry {\n $client->users()->signup($signupForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Signup"
|
|
}
|
|
}
|
|
},
|
|
"description": "Signup resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/status": {
|
|
"get": {
|
|
"tags": [
|
|
"Status"
|
|
],
|
|
"summary": "Retrieve API current status",
|
|
"description": "Retrieve API current status\n",
|
|
"security": [],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Status was received",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Status"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/subscriptions": {
|
|
"get": {
|
|
"tags": [
|
|
"Subscriptions"
|
|
],
|
|
"summary": "Retrieve a list of subscriptions",
|
|
"description": "Retrieve a list of subscriptions\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
},
|
|
{
|
|
"name": "Accept",
|
|
"in": "header",
|
|
"description": "The response media type",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"application/json",
|
|
"text/csv"
|
|
],
|
|
"default": "application/json"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of subscriptions was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Subscription"
|
|
}
|
|
}
|
|
},
|
|
"text/csv": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Subscription"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$subscriptions = $client->subscriptions()->search([\n 'filter' => 'customerId:testCustomerId',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Subscriptions"
|
|
],
|
|
"summary": "Create a subscription",
|
|
"description": "Create a subscription\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Subscription was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Subscription"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$subscriptionForm = new Rebilly\\Entities\\Subscription();\n$subscriptionForm->setCustomerId('customerId');\n$subscriptionForm->setWebsiteId('websiteId');\n$subscriptionForm->setPlanId('planId');\n\ntry {\n $subscription = $client->subscriptions()->create($subscriptionForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Subscription"
|
|
}
|
|
}
|
|
},
|
|
"/subscriptions/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Subscriptions"
|
|
],
|
|
"summary": "Retrieve a subscription",
|
|
"description": "Retrieve a subscription with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Subscription was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Subscription"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$subscription = $client->subscriptions()->load('subscriptionId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Subscriptions"
|
|
],
|
|
"summary": "Create or update a subscription with predefined ID",
|
|
"description": "Create or update a subscription with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Subscription was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Subscription"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Subscription was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Subscription"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$subscriptionForm = new Rebilly\\Entities\\Subscription();\n$subscriptionForm->setCustomerId('customerId');\n$subscriptionForm->setWebsiteId('websiteId');\n$subscriptionForm->setPlanId('planId');\n\ntry {\n $subscription = $client->subscriptions()->update('subscriptionId', $subscriptionForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Subscription"
|
|
}
|
|
}
|
|
},
|
|
"/subscriptions/{id}/cancel": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Subscriptions"
|
|
],
|
|
"summary": "Cancel a subscription",
|
|
"description": "Cancel a subscription\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Subscription was switched",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Subscription"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$subscriptionCancelForm = new Rebilly\\Entities\\SubscriptionCancel();\n$subscriptionCancelForm->setPolicy($subscriptionCancelForm::NOW);\n\ntry {\n $subscription = $client->subscriptions()->cancel('subscriptionId', $subscriptionCancelForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SubscriptionCancel"
|
|
}
|
|
}
|
|
},
|
|
"description": "Only policy",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/subscriptions/{id}/lead-source": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Subscriptions"
|
|
],
|
|
"summary": "Retrieve a subscription's Lead Source",
|
|
"description": "Retrieve a Lead Source of given subscription\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Lead Source was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/LeadSource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$subscription = $client->subscriptions()->load('subscriptionId');\n$leadSource = $subscription->getLeadSource();\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Subscriptions"
|
|
],
|
|
"summary": "Create a Lead Source for a Subscription",
|
|
"description": "Create a Lead Source for a Subscription\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Lead Source was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/LeadSource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Lead Source was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/LeadSource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$leadSourceForm = new Rebilly\\Entities\\LeadSource();\n$leadSourceForm->setSource('TestSource');\n$leadSourceForm->setCampaign('TestCampaign');\n\ntry {\n $subscription = $client->subscriptions()->updateLeadSource('subscriptionId', $leadSourceForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/LeadSource"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Subscriptions"
|
|
],
|
|
"summary": "Delete a Lead Source for a Subscription",
|
|
"description": "Delete a Lead Source that belongs to a certain Subscription\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Lead Source was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"description": "Lead Source cannot be deleted"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$subscription = $client->subscriptions()->deleteLeadSource('subscriptionId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/subscriptions/{id}/switch": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Subscriptions"
|
|
],
|
|
"summary": "Switch a subscription",
|
|
"description": "Switch a subscription\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Subscription was switched",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Subscription"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$subscriptionSwitchForm = new Rebilly\\Entities\\SubscriptionSwitch();\n$subscriptionSwitchForm->setPlanId('newPlanId');\n$subscriptionSwitchForm->setPolicy($subscriptionSwitchForm::NOW);\n\ntry {\n $subscription = $client->subscriptions()->switchTo('subscriptionId', $subscriptionSwitchForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SubscriptionSwitch"
|
|
}
|
|
}
|
|
},
|
|
"description": "SubscriptionSwitch resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/tax-categories": {
|
|
"get": {
|
|
"tags": [
|
|
"Taxes"
|
|
],
|
|
"summary": "Retrieve a list of tax categories",
|
|
"description": "Retrieve a list of tax categories\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of tax categories was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/TaxCategory"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tokens": {
|
|
"get": {
|
|
"tags": [
|
|
"Payment Tokens"
|
|
],
|
|
"summary": "Retrieve a list of tokens",
|
|
"description": "Retrieve a list of tokens\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of tokens was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/PaymentToken"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$paymentCardTokens = $client->paymentCardTokens()->search([\n 'filter' => 'token:string',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Payment Tokens"
|
|
],
|
|
"summary": "Create a payment token",
|
|
"description": "Create a token\n",
|
|
"security": [
|
|
{
|
|
"RebAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Token was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PaymentToken"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$paymentCardTokenForm = new Rebilly\\Entities\\PaymentCardToken();\n$paymentCardTokenForm->setFirstName('John');\n$paymentCardTokenForm->setLastName('Doe');\n$paymentCardTokenForm->setAddress('1313 Main Street');\n$paymentCardTokenForm->setCity('Gotham');\n$paymentCardTokenForm->setPostalCode('12345');\n$paymentCardTokenForm->setRegion('NY');\n$paymentCardTokenForm->setCountry('US');\n\n$paymentInstrumentForm = new Entities\\PaymentInstruments\\PaymentCardPaymentInstrument();\n$paymentInstrumentForm->setPan('4111111111111111');\n$paymentInstrumentForm->setExpYear(2025);\n$paymentInstrumentForm->setExpMonth(8);\n$paymentInstrumentForm->setCvv(123);\n\n$paymentCardTokenForm->setPaymentInstrument($paymentInstrumentForm);\n\ntry {\n $paymentCardToken = $client->paymentCardTokens()->create($paymentCardTokenForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/PaymentToken"
|
|
}
|
|
}
|
|
},
|
|
"/tokens/{token}": {
|
|
"parameters": [
|
|
{
|
|
"name": "token",
|
|
"in": "path",
|
|
"description": "The token identifier string",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Payment Tokens"
|
|
],
|
|
"summary": "Retrieve a token",
|
|
"description": "Retrieve a token with specified identifier string\n",
|
|
"security": [
|
|
{
|
|
"RebAuth": []
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Token was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PaymentToken"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$paymentCardToken = $client->paymentCardTokens()->load('tokenId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/tokens/{token}/expiration": {
|
|
"parameters": [
|
|
{
|
|
"name": "token",
|
|
"in": "path",
|
|
"description": "The token identifier string",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Payment Tokens"
|
|
],
|
|
"summary": "Expire a token",
|
|
"description": "Expire a token\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Token expiration successful",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PaymentToken"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "try {\n $paymentCardToken = $client->paymentCardTokens()->expire('tokenId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/PaymentToken"
|
|
}
|
|
}
|
|
},
|
|
"/tracking/api": {
|
|
"get": {
|
|
"tags": [
|
|
"Tracking"
|
|
],
|
|
"summary": "Retrieve a list of tracking API logs",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
},
|
|
{
|
|
"name": "Accept",
|
|
"in": "header",
|
|
"description": "The response media type",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"application/json",
|
|
"text/csv"
|
|
],
|
|
"default": "application/json"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Tracking API logs was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ApiTracking"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$apiTrackingLog = $client->apiTracking()->search([\n 'filter' => 'status:200',\n]);\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/tracking/api/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Tracking"
|
|
],
|
|
"summary": "Retrieve a tracking API log with specified identifier string",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Tracking API log was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiTracking"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$apiTrackingLog = $client->apiTracking()->load('apiLogId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/tracking/lists": {
|
|
"get": {
|
|
"tags": [
|
|
"Tracking"
|
|
],
|
|
"summary": "Retrieve Lists changes history",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Lists changes history was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/List"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tracking/subscriptions": {
|
|
"get": {
|
|
"tags": [
|
|
"Tracking"
|
|
],
|
|
"summary": "Retrieve a list of tracking subscription logs",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Tracking subscription logs was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/SubscriptionTracking"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tracking/subscriptions/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Tracking"
|
|
],
|
|
"summary": "Retrieve a tracking subscription log with specified identifier string",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Tracking subscription log was retrieved successfully",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SubscriptionTracking"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tracking/webhooks": {
|
|
"get": {
|
|
"tags": [
|
|
"Tracking"
|
|
],
|
|
"summary": "Retrieve a list of tracking webhook notifications",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionSort"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionFilter"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionCriteria"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Tracking webhook notifications was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/WebhookTracking"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tracking/webhooks/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Tracking"
|
|
],
|
|
"summary": "Retrieve a tracking webhook notification with specified identifier string",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Tracking webhook notification was retrieved successfully",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebhookTracking"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tracking/website-webhooks": {
|
|
"get": {
|
|
"tags": [
|
|
"Tracking"
|
|
],
|
|
"summary": "Retrieve a list of tracking webhook notifications",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Tracking webhook notifications was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/WebsiteWebhookTracking"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tracking/website-webhooks/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Tracking"
|
|
],
|
|
"summary": "Retrieve a tracking webhook notification with specified identifier string",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Tracking webhook notification was retrieved successfully",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebsiteWebhookTracking"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/transactions": {
|
|
"get": {
|
|
"tags": [
|
|
"Transactions"
|
|
],
|
|
"summary": "Retrieve a list of transactions",
|
|
"description": "Retrieve a list of transactions\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionFilter"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionQuery"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionCriteria"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionSort"
|
|
},
|
|
{
|
|
"name": "Accept",
|
|
"in": "header",
|
|
"description": "The response media type",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"application/json",
|
|
"text/csv"
|
|
],
|
|
"default": "application/json"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of transactions was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Transaction"
|
|
}
|
|
}
|
|
},
|
|
"text/csv": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Transaction"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$transactions = $client->transactions()->search([\n 'filter' => 'result:approved',\n]);\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/transactions/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Transactions"
|
|
],
|
|
"summary": "Retrieve a Transaction",
|
|
"description": "Retrieve a Transaction with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Transaction was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Transaction"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$transaction = $client->transactions()->load('transactionId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/transactions/{id}/cancel": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Transactions"
|
|
],
|
|
"summary": "Cancel a pending or suspended transaction",
|
|
"description": "Cancel a scheduled transaction. Once handled a transaction cannot be canceled",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Successful cancel the payment",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Transaction"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "try {\n $payment = $client->transactions()->cancel('transactionId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/transactions/{id}/gateway-logs": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Transactions"
|
|
],
|
|
"summary": "Retrieve a Transaction Gateway Logs",
|
|
"description": "Retrieve Gateway communication Logs for Transaction with specified identifier string",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Logs were retrieved successfully",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TransactionGatewayLog"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/transactions/{id}/lead-source": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Transactions"
|
|
],
|
|
"summary": "Retrieve a transaction's Lead Source",
|
|
"description": "Retrieve a Lead Source of given transaction\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Lead Source was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/LeadSource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$transaction = $client->transactions()->load('transactionId');\n$leadSource = $transaction->getLeadSource();\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Transactions"
|
|
],
|
|
"summary": "Create a Lead Source for a transaction",
|
|
"description": "Create a Lead Source for a transaction\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Lead Source was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/LeadSource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Lead Source was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/LeadSource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$leadSourceForm = new Rebilly\\Entities\\LeadSource();\n$leadSourceForm->setSource('TestSource');\n$leadSourceForm->setCampaign('TestCampaign');\n\ntry {\n $transaction = $client->transactions()->updateLeadSource('transactionId', $leadSourceForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/LeadSource"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Transactions"
|
|
],
|
|
"summary": "Delete a Lead Source for a transaction",
|
|
"description": "Delete a Lead Source that belongs to a certain transaction\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Lead Source was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"description": "Lead Source cannot be deleted"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$payment = $client->transactions()->deleteLeadSource('transactionId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/transactions/{id}/refund": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Transactions"
|
|
],
|
|
"summary": "Refund a Transaction",
|
|
"description": "Refund a Transaction with specified identifier string.\nNote that the refund will be in the same currency as the original transaction.\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Transaction was refunded successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Transaction"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$transaction = $client->transactions()->refund('transactionId', 1.99);\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TransactionRefund"
|
|
}
|
|
}
|
|
},
|
|
"description": "Transaction resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/users": {
|
|
"get": {
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Retrieve a list of users",
|
|
"description": "Retrieve a list of users\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of users was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$users = $client->users()->search([\n 'filter' => 'firstName:John',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Create an user",
|
|
"description": "Create an user\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "User was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$userForm = new Rebilly\\Entities\\User();\n$userForm->setFirstName('John');\n$userForm->setLastName('Doe');\n$userForm->setEmail('johndoe@test.com');\n\ntry {\n $user = $client->users()->create($userForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/User"
|
|
}
|
|
}
|
|
},
|
|
"/users/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Retrieve user",
|
|
"description": "Retrieve user with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "User was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$user = $client->users()->load('userId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Create or update user with predefined ID",
|
|
"description": "Create or update user with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "User was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "User was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$userForm = new Rebilly\\Entities\\User();\n$userForm->setFirstName('John');\n$userForm->setLastName('Doe');\n$userForm->setEmail('johndoe@test.com');\n\ntry {\n $user = $client->users()->update('userId', $userForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/User"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Delete user",
|
|
"description": "Delete user with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "User was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "try {\n $client->users()->delete('userId');\n} catch (ServerException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/users/{id}/password": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Updates user's password with the specified newPassword",
|
|
"description": "Updates user's password with the specified newPassword. And checks if currentPassword matches the actual one.\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Password updated successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/InvalidDataError"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$updatePasswordForm = new Rebilly\\Entities\\UpdatePassword();\n$updatePasswordForm->setCurrentPassword('1234');\n$updatePasswordForm->setNewPassword('5678');\n\ntry {\n $user = $client->users()->updatePassword('userId', $updatePasswordForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/UpdatePassword"
|
|
}
|
|
}
|
|
},
|
|
"/users/{id}/totp-reset": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Reset (renew) totpSecret",
|
|
"description": "Reset (renew) totpSecret\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "totpSecret reset (renewed) successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$user = $client->users()->resetTotp('userId');\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/users/reset-password/{token}": {
|
|
"parameters": [
|
|
{
|
|
"name": "token",
|
|
"in": "path",
|
|
"description": "The token string",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Reset user password",
|
|
"description": "Reset user password\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Password was reseted successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$resetPasswordForm = new Rebilly\\Entities\\ResetPassword();\n$resetPasswordForm->setNewPassword('1234');\n\ntry {\n $user = $client->users()->resetPassword('userId', 'token', $resetPasswordForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResetPassword"
|
|
}
|
|
}
|
|
},
|
|
"description": "ResetPassword resource",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"/webhooks": {
|
|
"get": {
|
|
"tags": [
|
|
"Webhooks"
|
|
],
|
|
"summary": "Retrieve a list of webhooks",
|
|
"description": "Retrieve a list of webhooks\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of Webhooks was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/GlobalWebhook"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Webhooks"
|
|
],
|
|
"summary": "Create a webhook",
|
|
"description": "Create a webhook\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Webhook was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GlobalWebhook"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/GlobalWebhook"
|
|
}
|
|
}
|
|
},
|
|
"/webhooks/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Webhooks"
|
|
],
|
|
"summary": "Retrieve a webhook",
|
|
"description": "Retrieve a webhook with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Webhook was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GlobalWebhook"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Webhooks"
|
|
],
|
|
"summary": "Create or update a webhook with predefined ID",
|
|
"description": "Create or update a webhook with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Webhook was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GlobalWebhook"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Webhook was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GlobalWebhook"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/GlobalWebhook"
|
|
}
|
|
}
|
|
},
|
|
"/websites": {
|
|
"get": {
|
|
"tags": [
|
|
"Websites"
|
|
],
|
|
"summary": "Retrieve a list of websites",
|
|
"description": "Retrieve a list of websites\n",
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/collectionLimit"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/collectionOffset"
|
|
},
|
|
{
|
|
"name": "Accept",
|
|
"in": "header",
|
|
"description": "The response media type",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"application/json",
|
|
"text/csv"
|
|
],
|
|
"default": "application/json"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of Websites was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"Pagination-Total": {
|
|
"description": "Total items count",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Limit": {
|
|
"description": "Items per page limit",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Pagination-Offset": {
|
|
"description": "Pagination offset",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Website"
|
|
}
|
|
}
|
|
},
|
|
"text/csv": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Website"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$websites = $client->websites()->search([\n 'filter' => 'name:TestWebsite',\n]);\n"
|
|
}
|
|
]
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Websites"
|
|
],
|
|
"summary": "Create a website",
|
|
"description": "Create a website\n",
|
|
"responses": {
|
|
"201": {
|
|
"description": "Website was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Website"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$websiteForm = new Rebilly\\Entities\\Website();\n$websiteForm->setName('TestWebsite');\n$websiteForm->setUrl('http://testwebsite.com');\n$websiteForm->setServicePhone('+0123456789');\n$websiteForm->setServiceEmail('test@testwebsite.com');\n\ntry {\n $website = $client->websites()->create($websiteForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Website"
|
|
}
|
|
}
|
|
},
|
|
"/websites/{id}": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Websites"
|
|
],
|
|
"summary": "Retrieve a website",
|
|
"description": "Retrieve a website with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Website was retrieved successfully",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Website"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$website = $client->websites()->load('websiteId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Websites"
|
|
],
|
|
"summary": "Create or update a website with predefined ID",
|
|
"description": "Create or update a website with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Website was updated",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Website"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"201": {
|
|
"description": "Website was created",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Website"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$websiteForm = new Rebilly\\Entities\\Website();\n$websiteForm->setName('TestWebsite');\n$websiteForm->setUrl('http://testwebsite.com');\n$websiteForm->setServicePhone('+0123456789');\n$websiteForm->setServiceEmail('test@testwebsite.com');\n\ntry {\n $website = $client->websites()->update('websiteId', $websiteForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"$ref": "#/components/requestBodies/Website"
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Websites"
|
|
],
|
|
"summary": "Delete a website",
|
|
"description": "Delete a website with predefined identifier string\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Website was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"description": "Website has related resources and cannot be deleted"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "try {\n $client->websites()->delete('websiteId');\n} catch (ServerException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/websites/{id}/webhook": {
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/resourceId"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Websites"
|
|
],
|
|
"summary": "Retrieve a webhook for website",
|
|
"description": "Retrieve a webhook for website with specified identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Webhook was retrieved successfully",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebsiteWebhook"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$websiteWebhook = $client->websiteWebhook()->load('websiteId');\n"
|
|
}
|
|
]
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Websites"
|
|
],
|
|
"summary": "Create or update a webhook for website with predefined ID",
|
|
"description": "Create or update a webhook for website with predefined identifier string\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Webhook was updated",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebsiteWebhook"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$websiteWebhookForm = new Rebilly\\Entities\\WebsiteWebhook();\n$websiteWebhookForm->setWebHookUrl('http://testwebsite.com/webhook');\n$websiteWebhookForm->setWebHookUsername('test');\n$websiteWebhookForm->setWebHookPassword('1234');\n\ntry {\n $website = $client->websiteWebhook()->update('websiteId', $websiteWebhookForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebsiteWebhook"
|
|
}
|
|
}
|
|
},
|
|
"description": "Webhook resource",
|
|
"required": true
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Websites"
|
|
],
|
|
"summary": "Delete a webhook",
|
|
"description": "Delete a webhook that belongs to a website with predefined ID\n",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Webhook was deleted",
|
|
"headers": {
|
|
"Rate-Limit-Limit": {
|
|
"description": "The number of allowed requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Remaining": {
|
|
"description": "The number of remaining requests in the current period",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Rate-Limit-Reset": {
|
|
"description": "The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/AccessForbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
}
|
|
},
|
|
"x-code-samples": [
|
|
{
|
|
"lang": "PHP",
|
|
"source": "$client->websiteWebhook()->delete('websiteId');\n"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {
|
|
"ApiKey": {
|
|
"type": "object",
|
|
"description": "API secret Key.",
|
|
"properties": {
|
|
"id": {
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"description": {
|
|
"description": "API key description",
|
|
"type": "string"
|
|
},
|
|
"datetimeFormat": {
|
|
"description": "Date time format",
|
|
"type": "string",
|
|
"default": "iso8601",
|
|
"enum": [
|
|
"mysql",
|
|
"iso8601"
|
|
]
|
|
},
|
|
"apiUser": {
|
|
"description": "API user name",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"secretKey": {
|
|
"description": "API secret key's value",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"createdTime": {
|
|
"description": "The API key created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Attachment": {
|
|
"type": "object",
|
|
"required": [
|
|
"fileId",
|
|
"relatedId",
|
|
"relatedType"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"fileId": {
|
|
"description": "Linked File object id",
|
|
"type": "string"
|
|
},
|
|
"relatedType": {
|
|
"description": "Linked object type",
|
|
"type": "string",
|
|
"enum": [
|
|
"customer",
|
|
"dispute",
|
|
"invoice",
|
|
"note",
|
|
"payment",
|
|
"plan",
|
|
"product",
|
|
"subscription",
|
|
"transaction"
|
|
]
|
|
},
|
|
"relatedId": {
|
|
"description": "Linked object Id",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"description": "The Original Attachment name",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"description": "The Attachment description",
|
|
"type": "string"
|
|
},
|
|
"createdTime": {
|
|
"description": "Creation date/time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "Latest update date/time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 3,
|
|
"maxItems": 3,
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/FileLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/AttachmentResourceLink"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"AuthenticationOptions": {
|
|
"type": "object",
|
|
"properties": {
|
|
"passwordPattern": {
|
|
"description": "Allowed password pattern",
|
|
"type": "string"
|
|
},
|
|
"credentialTtl": {
|
|
"description": "The default lifetime of the credential in seconds",
|
|
"type": "integer"
|
|
},
|
|
"authTokenTtl": {
|
|
"description": "The default lifetime of the auth-token in seconds",
|
|
"type": "integer"
|
|
},
|
|
"resetTokenTtl": {
|
|
"description": "The default lifetime of the reset-token in seconds",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"AuthenticationToken": {
|
|
"type": "object",
|
|
"required": [
|
|
"username",
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"token": {
|
|
"description": "The token identifier string",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"username": {
|
|
"description": "The token's username",
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"description": "The token's password (write-only)",
|
|
"type": "string",
|
|
"format": "password"
|
|
},
|
|
"credentialId": {
|
|
"description": "The credential's ID",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"customerId": {
|
|
"description": "The token's customer ID",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"expiredTime": {
|
|
"description": "Token's expired time",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"BankAccount": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "The bank account identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"customerId": {
|
|
"description": "The Customer's ID.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"bankName": {
|
|
"description": "Bank's name.",
|
|
"type": "string"
|
|
},
|
|
"routingNumber": {
|
|
"description": "Bank's Routing Number. Required if bank account is not created from Token. This field is write-only",
|
|
"type": "string"
|
|
},
|
|
"accountNumber": {
|
|
"description": "Bank's Account Number. Required if bank account is not created from Token. This field is write-only",
|
|
"type": "string"
|
|
},
|
|
"accountType": {
|
|
"description": "Banks's Account type. Required if bank account is not created from Token",
|
|
"type": "string"
|
|
},
|
|
"token": {
|
|
"description": "Bank Account Token. Use without any other fields",
|
|
"type": "string"
|
|
},
|
|
"address": {
|
|
"description": "The Address. Required if bank account is not created from Token",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ContactObject"
|
|
}
|
|
]
|
|
},
|
|
"status": {
|
|
"description": "Bank Account status",
|
|
"type": "string",
|
|
"enum": [
|
|
"active",
|
|
"deactivated"
|
|
]
|
|
},
|
|
"createdTime": {
|
|
"description": "Bank Account created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "Bank Account updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"customFields": {
|
|
"$ref": "#/components/schemas/ResourceCustomFields"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 3,
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/CustomerLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/ContactLink"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Blacklist": {
|
|
"type": "object",
|
|
"required": [
|
|
"type",
|
|
"value"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "The blacklist identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"type": {
|
|
"description": "The blacklist type",
|
|
"type": "string",
|
|
"enum": [
|
|
"payment-card-id",
|
|
"customer-id",
|
|
"email",
|
|
"ip-address",
|
|
"country",
|
|
"fingerprint",
|
|
"bin"
|
|
]
|
|
},
|
|
"value": {
|
|
"description": "The blacklist value",
|
|
"type": "string"
|
|
},
|
|
"expiredTime": {
|
|
"description": "The blacklist expired time",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"createdTime": {
|
|
"description": "The blacklist created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "The blacklist updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"CheckoutPage": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"planId",
|
|
"websiteId",
|
|
"uriPath"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "Checkout page identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"planId": {
|
|
"description": "Checkout page plan ID",
|
|
"type": "string",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"websiteId": {
|
|
"description": "Checkout page website ID",
|
|
"type": "string",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"uriPath": {
|
|
"description": "Your own custom uri path for this Checkout Page. It will be appended to checkout url https://checkout.rebilly.com/website/",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"description": "Checkout page name",
|
|
"type": "string"
|
|
},
|
|
"isActive": {
|
|
"description": "If checkout page active",
|
|
"type": "boolean"
|
|
},
|
|
"redirectUrl": {
|
|
"description": "Checkout page url",
|
|
"type": "string"
|
|
},
|
|
"redirectTimeout": {
|
|
"description": "Checkout page redirect timeout",
|
|
"type": "integer"
|
|
},
|
|
"allowCustomCustomerId": {
|
|
"description": "If to enable your own customer ID in requests",
|
|
"type": "boolean"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"none": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/AmountAdjustment"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/SmtpAuthorization"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/WebhookAuthorization"
|
|
}
|
|
]
|
|
},
|
|
"Contact": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "The contact identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"customerId": {
|
|
"description": "The contact customer ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"firstName": {
|
|
"description": "The contact first name",
|
|
"type": "string"
|
|
},
|
|
"lastName": {
|
|
"description": "The contact last name",
|
|
"type": "string"
|
|
},
|
|
"organization": {
|
|
"description": "The contact organization",
|
|
"type": "string"
|
|
},
|
|
"address": {
|
|
"description": "The contact street address",
|
|
"type": "string",
|
|
"maxLength": 60
|
|
},
|
|
"address2": {
|
|
"description": "The contact street address (second line)",
|
|
"type": "string",
|
|
"maxLength": 60
|
|
},
|
|
"city": {
|
|
"description": "The contact city",
|
|
"type": "string",
|
|
"maxLength": 45
|
|
},
|
|
"region": {
|
|
"description": "The contact region (state)",
|
|
"type": "string",
|
|
"maxLength": 45
|
|
},
|
|
"country": {
|
|
"description": "The contact country ISO Alpha-2 code",
|
|
"type": "string",
|
|
"pattern": "^[A-Z]{2}$"
|
|
},
|
|
"postalCode": {
|
|
"description": "The contact postal code",
|
|
"type": "string",
|
|
"maxLength": 10
|
|
},
|
|
"phoneNumbers": {
|
|
"$ref": "#/components/schemas/ContactPhoneNumbers"
|
|
},
|
|
"emails": {
|
|
"$ref": "#/components/schemas/ContactEmails"
|
|
},
|
|
"isOutdated": {
|
|
"description": "Is contact outdated",
|
|
"type": "boolean",
|
|
"readOnly": true
|
|
},
|
|
"createdTime": {
|
|
"description": "The contact created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "The contact updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"customFields": {
|
|
"$ref": "#/components/schemas/ResourceCustomFields"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 2,
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/CustomerLink"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"ContactEmails": {
|
|
"description": "The contact emails",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"label",
|
|
"value"
|
|
],
|
|
"properties": {
|
|
"label": {
|
|
"description": "The email label",
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"description": "The email value",
|
|
"type": "string"
|
|
},
|
|
"primary": {
|
|
"description": "True if email is primary",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"ContactObject": {
|
|
"type": "object",
|
|
"properties": {
|
|
"firstName": {
|
|
"description": "The contact first name",
|
|
"type": "string"
|
|
},
|
|
"lastName": {
|
|
"description": "The contact last name",
|
|
"type": "string"
|
|
},
|
|
"organization": {
|
|
"description": "The contact organization",
|
|
"type": "string"
|
|
},
|
|
"address": {
|
|
"description": "The contact street address",
|
|
"type": "string",
|
|
"maxLength": 60
|
|
},
|
|
"address2": {
|
|
"description": "The contact street address (second line)",
|
|
"type": "string",
|
|
"maxLength": 60
|
|
},
|
|
"city": {
|
|
"description": "The contact city",
|
|
"type": "string",
|
|
"maxLength": 45
|
|
},
|
|
"region": {
|
|
"description": "The contact region (state)",
|
|
"type": "string",
|
|
"maxLength": 45
|
|
},
|
|
"country": {
|
|
"description": "The contact country ISO Alpha-2 code",
|
|
"type": "string",
|
|
"pattern": "^[A-Z]{2}$"
|
|
},
|
|
"postalCode": {
|
|
"description": "The contact postal code",
|
|
"type": "string",
|
|
"maxLength": 10
|
|
},
|
|
"phoneNumbers": {
|
|
"$ref": "#/components/schemas/ContactPhoneNumbers"
|
|
},
|
|
"emails": {
|
|
"$ref": "#/components/schemas/ContactEmails"
|
|
}
|
|
}
|
|
},
|
|
"ContactPhoneNumbers": {
|
|
"description": "The contact phone numbers",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"label",
|
|
"value"
|
|
],
|
|
"properties": {
|
|
"label": {
|
|
"description": "The phone label",
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"description": "The phone value",
|
|
"type": "string"
|
|
},
|
|
"primary": {
|
|
"description": "True if phone is primary",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Coupon": {
|
|
"type": "object",
|
|
"description": "Coupons and Discounts",
|
|
"required": [
|
|
"discount",
|
|
"issuedTime"
|
|
],
|
|
"properties": {
|
|
"redemptionCode": {
|
|
"description": "Coupon's redemption code",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"discount": {
|
|
"$ref": "#/components/schemas/Discount"
|
|
},
|
|
"restrictions": {
|
|
"description": "Coupon restrictions",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/CouponRestriction"
|
|
}
|
|
},
|
|
"redemptionsCount": {
|
|
"type": "integer",
|
|
"description": "Coupon's redemptions count",
|
|
"minimum": 0,
|
|
"readOnly": true
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "If coupon enabled",
|
|
"readOnly": true,
|
|
"enum": [
|
|
"issued",
|
|
"expired"
|
|
]
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "Your coupon description. When it is not empty this is used for invoice discount item description,\notherwise the item's description uses coupon's redemptionCode like 'Coupon \"redemptionCode\"'\n"
|
|
},
|
|
"issuedTime": {
|
|
"description": "Coupon's issued time (start time)",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"expiredTime": {
|
|
"description": "Coupon's expire time (end time)",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"createdTime": {
|
|
"description": "Coupon created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "Coupon updated time.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"CouponExpiration": {
|
|
"type": "object",
|
|
"required": [
|
|
"expiredTime"
|
|
],
|
|
"properties": {
|
|
"expiredTime": {
|
|
"description": "The coupon's expiry time, must be greater than the issued time. Null or empty string will immediately expire the coupon.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
}
|
|
},
|
|
"CouponRedemption": {
|
|
"type": "object",
|
|
"description": "Coupons redemption log",
|
|
"properties": {
|
|
"id": {
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"redemptionCode": {
|
|
"description": "Coupon's redemption code",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"customerId": {
|
|
"description": "Customer's ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"additionalRestrictions": {
|
|
"description": "Additional restrictions for coupon's redemptions",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/RedemptionRestriction"
|
|
}
|
|
},
|
|
"redeemedTime": {
|
|
"description": "Coupon redeem time",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"canceledTime": {
|
|
"description": "Coupon redemption canceled time",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"CouponRestriction": {
|
|
"description": "Coupon restrictions",
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GenericRestriction"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"description": "Coupon's restriction type",
|
|
"type": "string",
|
|
"enum": [
|
|
"discounts-per-redemption",
|
|
"redemptions-per-customer",
|
|
"restrict-to-invoices",
|
|
"restrict-to-plans",
|
|
"restrict-to-subscriptions",
|
|
"minimum-order-amount",
|
|
"total-redemptions"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Discount": {
|
|
"type": "object",
|
|
"discriminator": {
|
|
"propertyName": "type"
|
|
},
|
|
"properties": {
|
|
"type": {
|
|
"description": "Discount type",
|
|
"type": "string",
|
|
"enum": [
|
|
"fixed",
|
|
"percent"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"discounts-per-redemption": {
|
|
"description": "discounts-per-redemption restrictions",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GenericRestriction"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"quantity"
|
|
],
|
|
"properties": {
|
|
"quantity": {
|
|
"type": "integer",
|
|
"description": "Restriction quantity"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"fixed": {
|
|
"description": "Coupon fixed amount discount",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Discount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"amount",
|
|
"currency"
|
|
],
|
|
"properties": {
|
|
"amount": {
|
|
"description": "Discount amount",
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"currency": {
|
|
"description": "Discount currency",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"GenericRestriction": {
|
|
"description": "All restriction",
|
|
"type": "object",
|
|
"discriminator": {
|
|
"propertyName": "type"
|
|
},
|
|
"properties": {
|
|
"type": {
|
|
"description": "Restriction type",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"InvoiceDiscount": {
|
|
"type": "object",
|
|
"readOnly": true,
|
|
"properties": {
|
|
"redemptionCode": {
|
|
"description": "Coupon's redemption code",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"redemptionId": {
|
|
"description": "Redemption ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"amount": {
|
|
"description": "Total amount that was discounted by this Coupon",
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "Discount description"
|
|
}
|
|
}
|
|
},
|
|
"minimum-order-amount": {
|
|
"description": "minimum-order-amount restrictions",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GenericRestriction"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"amount",
|
|
"currency"
|
|
],
|
|
"properties": {
|
|
"amount": {
|
|
"type": "integer",
|
|
"description": "Minimum order quantity"
|
|
},
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Minimum order currency"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"percent": {
|
|
"description": "Coupon percent discount",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Discount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"value"
|
|
],
|
|
"properties": {
|
|
"value": {
|
|
"description": "Discount percent",
|
|
"type": "number",
|
|
"format": "double"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"RedemptionRestriction": {
|
|
"description": "Redemption restrictions",
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GenericRestriction"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"description": "Redemption's additional restriction type",
|
|
"type": "string",
|
|
"enum": [
|
|
"discounts-per-redemption",
|
|
"restrict-to-invoices",
|
|
"restrict-to-plans",
|
|
"restrict-to-subscriptions",
|
|
"minimum-order-amount"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"redemptions-per-customer": {
|
|
"description": "Quantity per Customer restrictions",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GenericRestriction"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"quantity"
|
|
],
|
|
"properties": {
|
|
"quantity": {
|
|
"type": "integer",
|
|
"description": "Restriction value"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"restrict-to-invoices": {
|
|
"description": "restrict-to-invoices restrictions",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GenericRestriction"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"invoiceIds"
|
|
],
|
|
"properties": {
|
|
"invoiceIds": {
|
|
"type": "array",
|
|
"description": "Invoice IDs coupon can be applied to",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"restrict-to-plans": {
|
|
"description": "restrict-to-plans restrictions",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GenericRestriction"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"planIds"
|
|
],
|
|
"properties": {
|
|
"planIds": {
|
|
"type": "array",
|
|
"description": "Plan IDs coupon can be applied to",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"restrict-to-subscriptions": {
|
|
"description": "restrict-to-subscriptions restrictions",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GenericRestriction"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"subscriptionIds"
|
|
],
|
|
"properties": {
|
|
"subscriptionIds": {
|
|
"type": "array",
|
|
"description": "Subscription IDs coupon can be applied to",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"total-redemptions": {
|
|
"description": "total-redemptions restrictions",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GenericRestriction"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"quantity"
|
|
],
|
|
"properties": {
|
|
"quantity": {
|
|
"type": "integer",
|
|
"description": "Total redemptions quantity"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Credential": {
|
|
"type": "object",
|
|
"required": [
|
|
"username",
|
|
"password",
|
|
"customerId"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "The credential identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"username": {
|
|
"description": "Credential's username",
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"description": "The credential's password",
|
|
"type": "string",
|
|
"format": "password"
|
|
},
|
|
"customerId": {
|
|
"description": "The credential's customer ID",
|
|
"type": "string"
|
|
},
|
|
"expiredTime": {
|
|
"description": "The credential's expired time",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 2,
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/CustomerLink"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Condition": {
|
|
"type": "object",
|
|
"discriminator": {
|
|
"propertyName": "op"
|
|
},
|
|
"properties": {
|
|
"op": {
|
|
"type": "string",
|
|
"description": "The condition operation",
|
|
"enum": [
|
|
"and",
|
|
"or",
|
|
"not",
|
|
"between",
|
|
"equals",
|
|
"in",
|
|
"gt",
|
|
"gte",
|
|
"lt",
|
|
"lte"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"op"
|
|
]
|
|
},
|
|
"and": {
|
|
"type": "object",
|
|
"description": "Logical AND",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Condition"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/logical"
|
|
}
|
|
]
|
|
},
|
|
"between": {
|
|
"type": "object",
|
|
"description": "Between condition",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Condition"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"min": {
|
|
"type": "string"
|
|
},
|
|
"max": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"min",
|
|
"max"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"compare": {
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"value"
|
|
]
|
|
},
|
|
"equals": {
|
|
"type": "object",
|
|
"description": "Equals condition",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Condition"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/compare"
|
|
}
|
|
]
|
|
},
|
|
"gt": {
|
|
"type": "object",
|
|
"description": "Greater than condition",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Condition"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/compare"
|
|
}
|
|
]
|
|
},
|
|
"gte": {
|
|
"type": "object",
|
|
"description": "Greater than or equals condition",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Condition"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/compare"
|
|
}
|
|
]
|
|
},
|
|
"in": {
|
|
"type": "object",
|
|
"description": "In condition",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Condition"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"values": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"values"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"logical-not": {
|
|
"type": "object",
|
|
"properties": {
|
|
"condition": {
|
|
"$ref": "#/components/schemas/Condition"
|
|
}
|
|
},
|
|
"required": [
|
|
"condition"
|
|
],
|
|
"example": {
|
|
"operation": "not",
|
|
"condition": {
|
|
"operation": "equals",
|
|
"path": "/name",
|
|
"value": "John Dou"
|
|
}
|
|
}
|
|
},
|
|
"logical": {
|
|
"type": "object",
|
|
"properties": {
|
|
"conditions": {
|
|
"type": "array",
|
|
"minItems": 2,
|
|
"items": {
|
|
"$ref": "#/components/schemas/Condition"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"conditions"
|
|
]
|
|
},
|
|
"lt": {
|
|
"type": "object",
|
|
"description": "Less than condition",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Condition"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/compare"
|
|
}
|
|
]
|
|
},
|
|
"lte": {
|
|
"type": "object",
|
|
"description": "Less than or equals condition",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Condition"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/compare"
|
|
}
|
|
]
|
|
},
|
|
"not": {
|
|
"type": "object",
|
|
"description": "Logical NOT",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Condition"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/logical-not"
|
|
}
|
|
]
|
|
},
|
|
"or": {
|
|
"type": "object",
|
|
"description": "Logical OR",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Condition"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/logical"
|
|
}
|
|
]
|
|
},
|
|
"Customer": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "The customer identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"defaultPaymentInstrument": {
|
|
"$ref": "#/components/schemas/PaymentInstrument"
|
|
},
|
|
"createdTime": {
|
|
"description": "The customer created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "The customer updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"customFields": {
|
|
"$ref": "#/components/schemas/ResourceCustomFields"
|
|
},
|
|
"primaryAddress": {
|
|
"$ref": "#/components/schemas/ContactObject"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 3,
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/NotesLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/DefaultPaymentInstrumentLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/LeadSourceLink"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"CustomEvent": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "The custom event identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"eventType": {
|
|
"type": "string",
|
|
"description": "The system event type",
|
|
"enum": [
|
|
"subscription-ended",
|
|
"subscription-trial-ended",
|
|
"subscription-renewed",
|
|
"payment-card-expired",
|
|
"invoice-past-due",
|
|
"invoice-issued",
|
|
"invoice-voided",
|
|
"invoice-paid",
|
|
"invoice-abandoned"
|
|
]
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "The custom event title"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "The custom event description"
|
|
},
|
|
"chronology": {
|
|
"type": "string",
|
|
"description": "The emitting time of the custom event relatively to the system event",
|
|
"enum": [
|
|
"before",
|
|
"after"
|
|
]
|
|
},
|
|
"scheduleInstruction": {
|
|
"$ref": "#/components/schemas/CustomEventScheduleInstruction"
|
|
},
|
|
"createdTime": {
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
},
|
|
"rulesCount": {
|
|
"type": "integer",
|
|
"readOnly": true
|
|
}
|
|
},
|
|
"required": [
|
|
"eventType",
|
|
"title",
|
|
"chronology",
|
|
"scheduleInstruction"
|
|
]
|
|
},
|
|
"CustomField": {
|
|
"description": "A separate Custom Field schema",
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"description": "The name of the custom field",
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"description": "Type value | Description\n------------- | -------------\narray | An array of strings up to 255 characters, maximum size is 1000 elements\nboolean | true or false\ndate | String of format \"full-date\" (YYYY-MM-DD) from RFC-3339 (full-date)\ndatetime | String of format \"date-time\" (YYYY-MM-DDTHH:MM:SSZ) from RFC-3339 (date-time)\ninteger | Cardinal value of -2^31..2^31-1\nnumber | Float value. It can take cardinal values also which are interpreted as float\nstring | Regular string up to 255 characters\nmonetary | A map of 3-letters currency code and amount, e.g. {\"currency\": \"EUR\", \"amount\": 25.30}\n",
|
|
"type": "string",
|
|
"enum": [
|
|
"array",
|
|
"boolean",
|
|
"datetime",
|
|
"integer",
|
|
"number",
|
|
"string",
|
|
"monetary"
|
|
]
|
|
},
|
|
"description": {
|
|
"description": "The custom field description",
|
|
"type": "string"
|
|
},
|
|
"isUsed": {
|
|
"description": "A flag to represent that the custom field is used on a record of the resource.",
|
|
"type": "boolean"
|
|
},
|
|
"additionalSchema": {
|
|
"description": "Additional parameters which can be added according to type:\nParameter Name | Types | Description\n-------------- | ------------- | -------------\nallowedValues | string, array | List of allowed values\n"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Dispute": {
|
|
"type": "object",
|
|
"required": [
|
|
"currency",
|
|
"transactionId",
|
|
"postedTime",
|
|
"type",
|
|
"status",
|
|
"reasonCode"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "The dispute identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"customerId": {
|
|
"description": "The dispute's customer ID",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"transactionId": {
|
|
"description": "The dispute's transaction ID",
|
|
"type": "string"
|
|
},
|
|
"currency": {
|
|
"description": "The dispute currency ISO Alpha code",
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"description": "The dispute amount",
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"acquirerReferenceNumber": {
|
|
"description": "The dispute's acquirer reference number",
|
|
"type": "string"
|
|
},
|
|
"reasonCode": {
|
|
"description": "The dispute's reason code",
|
|
"type": "string",
|
|
"enum": [
|
|
"1000",
|
|
"12",
|
|
"2",
|
|
"30",
|
|
"31",
|
|
"35",
|
|
"37",
|
|
"40",
|
|
"41",
|
|
"42",
|
|
"46",
|
|
"47",
|
|
"49",
|
|
"50",
|
|
"53",
|
|
"54",
|
|
"55",
|
|
"57",
|
|
"59",
|
|
"60",
|
|
"62",
|
|
"7",
|
|
"70",
|
|
"71",
|
|
"72",
|
|
"73",
|
|
"74",
|
|
"75",
|
|
"76",
|
|
"77",
|
|
"79",
|
|
"8",
|
|
"80",
|
|
"81",
|
|
"82",
|
|
"83",
|
|
"85",
|
|
"86",
|
|
"93",
|
|
"00",
|
|
"63",
|
|
"A01",
|
|
"A02",
|
|
"A08",
|
|
"F10",
|
|
"F14",
|
|
"F22",
|
|
"F24",
|
|
"F29",
|
|
"C02",
|
|
"C04",
|
|
"C05",
|
|
"C08",
|
|
"C14",
|
|
"C18",
|
|
"C28",
|
|
"C31",
|
|
"C32",
|
|
"M10",
|
|
"M49",
|
|
"P01",
|
|
"P03",
|
|
"P04",
|
|
"P05",
|
|
"P07",
|
|
"P08",
|
|
"P22",
|
|
"P23",
|
|
"R03",
|
|
"R13",
|
|
"M01",
|
|
"FR1",
|
|
"FR4",
|
|
"FR6",
|
|
"AL",
|
|
"AP",
|
|
"AW",
|
|
"CA",
|
|
"CD",
|
|
"CR",
|
|
"DA",
|
|
"DP",
|
|
"DP1",
|
|
"EX",
|
|
"IC",
|
|
"IN",
|
|
"IS",
|
|
"LP",
|
|
"N",
|
|
"NA",
|
|
"NC",
|
|
"P",
|
|
"RG",
|
|
"RM",
|
|
"RN1",
|
|
"RN2",
|
|
"SV",
|
|
"TF",
|
|
"TNM",
|
|
"UA01",
|
|
"UA02",
|
|
"UA32",
|
|
"UA99",
|
|
"UA03",
|
|
"UA10",
|
|
"UA11",
|
|
"UA12",
|
|
"UA18",
|
|
"UA20",
|
|
"UA21",
|
|
"UA22",
|
|
"UA23",
|
|
"UA28",
|
|
"UA30",
|
|
"UA31",
|
|
"UA38",
|
|
"duplicate",
|
|
"fraudulent",
|
|
"subscription_canceled",
|
|
"product_unacceptable",
|
|
"product_not_received",
|
|
"unrecognized",
|
|
"credit_not_processed",
|
|
"customer_initiated",
|
|
"incorrect_account_details",
|
|
"insufficient_funds",
|
|
"bank_cannot_process",
|
|
"debit_not_authorized",
|
|
"general"
|
|
]
|
|
},
|
|
"category": {
|
|
"description": "The dispute's category",
|
|
"type": "string",
|
|
"readOnly": true,
|
|
"enum": [
|
|
"fraud",
|
|
"unrecognized",
|
|
"product-not-received",
|
|
"product-unacceptable",
|
|
"product-not-refunded",
|
|
"duplicate",
|
|
"subscription-canceled",
|
|
"uncategorized"
|
|
]
|
|
},
|
|
"type": {
|
|
"description": "The dispute's type",
|
|
"type": "string",
|
|
"enum": [
|
|
"information-request",
|
|
"first-chargeback",
|
|
"second-chargeback",
|
|
"arbitration"
|
|
]
|
|
},
|
|
"status": {
|
|
"description": "The dispute's status",
|
|
"type": "string",
|
|
"enum": [
|
|
"response-needed",
|
|
"under-review",
|
|
"forfeited",
|
|
"won",
|
|
"lost",
|
|
"unknown"
|
|
]
|
|
},
|
|
"postedTime": {
|
|
"description": "Dispute posted time",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"deadlineTime": {
|
|
"description": "Dispute deadline time",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"rawResponse": {
|
|
"description": "Dispute raw response from gateway",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"resolvedTime": {
|
|
"description": "Dispute resolved time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"createdTime": {
|
|
"description": "Dispute created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "Dispute updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"DisputeEvidence": {
|
|
"type": "object",
|
|
"properties": {
|
|
"policy": {
|
|
"description": "The id of a file upload with the policy materials (may include the cancellation policy, refund policy, and terms of use).",
|
|
"type": "string"
|
|
},
|
|
"accessLogs": {
|
|
"description": "The id of a file upload with the access logs showing the customer activity.",
|
|
"type": "string"
|
|
},
|
|
"customerCommunication": {
|
|
"description": "The id of a file upload showing communication with the customer (for example emails).",
|
|
"type": "string"
|
|
},
|
|
"customerSignature": {
|
|
"description": "The id of a file upload showing the signed contract or signed delivery receipt.",
|
|
"type": "string"
|
|
},
|
|
"deliveryProof": {
|
|
"description": "The id of a file upload showing the proof of delivery.",
|
|
"type": "string"
|
|
},
|
|
"explanation": {
|
|
"description": "An explanation relevant to the category of dispute.",
|
|
"type": "string"
|
|
},
|
|
"additionalFile": {
|
|
"description": "Any additional evidence as a file upload id.",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Email": {
|
|
"type": "object",
|
|
"required": [
|
|
"email"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"description": "Email",
|
|
"type": "string",
|
|
"format": "email"
|
|
}
|
|
}
|
|
},
|
|
"SmtpAuthorization": {
|
|
"type": "object",
|
|
"discriminator": {
|
|
"propertyName": "type"
|
|
},
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"none",
|
|
"plain",
|
|
"login",
|
|
"cram-md5"
|
|
],
|
|
"default": "none"
|
|
}
|
|
}
|
|
},
|
|
"cram-md5": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SmtpAuthorization"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/UserPasswordAuthorization"
|
|
}
|
|
]
|
|
},
|
|
"login": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SmtpAuthorization"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/UserPasswordAuthorization"
|
|
}
|
|
]
|
|
},
|
|
"plain": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SmtpAuthorization"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/UserPasswordAuthorization"
|
|
}
|
|
]
|
|
},
|
|
"SmtpCredential": {
|
|
"type": "object",
|
|
"description": "SMTP Credential",
|
|
"required": [
|
|
"host"
|
|
],
|
|
"properties": {
|
|
"hash": {
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"host": {
|
|
"type": "string",
|
|
"description": "The host name"
|
|
},
|
|
"port": {
|
|
"type": "integer",
|
|
"description": "The port value",
|
|
"minimum": 1,
|
|
"maximum": 65535,
|
|
"default": 25
|
|
},
|
|
"encryption": {
|
|
"type": "string",
|
|
"description": "The encryption value",
|
|
"enum": [
|
|
"none",
|
|
"tls",
|
|
"ssl"
|
|
],
|
|
"default": "none"
|
|
},
|
|
"auth": {
|
|
"$ref": "#/components/schemas/SmtpAuthorization"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"UserPasswordAuthorization": {
|
|
"type": "object",
|
|
"properties": {
|
|
"username": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"username",
|
|
"password"
|
|
]
|
|
},
|
|
"Error": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"type": "integer",
|
|
"minimum": 100,
|
|
"maximum": 600
|
|
},
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"SystemEvent": {
|
|
"type": "object",
|
|
"description": "The application event",
|
|
"readOnly": true,
|
|
"properties": {
|
|
"eventType": {
|
|
"$ref": "#/components/schemas/EventType"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"rulesCount": {
|
|
"type": "integer",
|
|
"readOnly": true
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"EventType": {
|
|
"type": "string",
|
|
"description": "Rebilly event type",
|
|
"readOnly": true,
|
|
"enum": [
|
|
"dispute-created",
|
|
"gateway-account-requested",
|
|
"transaction-processed",
|
|
"subscription-canceled",
|
|
"subscription-created",
|
|
"subscription-renewed",
|
|
"payment-card-expired",
|
|
"payment-declined",
|
|
"transaction-process-requested",
|
|
"risk-score-changed"
|
|
]
|
|
},
|
|
"File": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"name": {
|
|
"description": "Original File name",
|
|
"type": "string"
|
|
},
|
|
"extension": {
|
|
"description": "The File extension",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"description": "The File description",
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"description": "Write-only. If defined on POST, this would be used as a file source.",
|
|
"type": "string"
|
|
},
|
|
"tags": {
|
|
"description": "The tags list",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"mime": {
|
|
"description": "The mime type",
|
|
"type": "string",
|
|
"readOnly": true,
|
|
"enum": [
|
|
"image/png",
|
|
"image/jpeg",
|
|
"image/gif",
|
|
"application/pdf",
|
|
"audio/mpeg"
|
|
]
|
|
},
|
|
"size": {
|
|
"description": "The File size in bytes",
|
|
"type": "integer",
|
|
"readOnly": true
|
|
},
|
|
"width": {
|
|
"description": "Image width, applicable to images only",
|
|
"type": "integer",
|
|
"readOnly": true
|
|
},
|
|
"height": {
|
|
"description": "Image height, applicable to images only",
|
|
"type": "integer",
|
|
"readOnly": true
|
|
},
|
|
"sha1": {
|
|
"description": "Hash sum of the file",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"createdTime": {
|
|
"description": "The upload date/time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "The latest update date/time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 2,
|
|
"maxItems": 2,
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PermalinkLink"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"GatewayAccount": {
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayName",
|
|
"acquirerName",
|
|
"merchantCategoryCode",
|
|
"websites",
|
|
"acceptedCurrencies",
|
|
"organizationId"
|
|
],
|
|
"discriminator": {
|
|
"propertyName": "gatewayName"
|
|
},
|
|
"properties": {
|
|
"id": {
|
|
"description": "The gateway identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"status": {
|
|
"description": "The gateway account's status",
|
|
"readOnly": true,
|
|
"type": "string",
|
|
"enum": [
|
|
"active",
|
|
"inactive",
|
|
"pending"
|
|
]
|
|
},
|
|
"gatewayName": {
|
|
"$ref": "#/components/schemas/GatewayName"
|
|
},
|
|
"acquirerName": {
|
|
"$ref": "#/components/schemas/AcquirerName"
|
|
},
|
|
"merchantCategoryCode": {
|
|
"description": "The gateway account's merchant category code",
|
|
"type": "integer",
|
|
"minimum": 742,
|
|
"maximum": 9950
|
|
},
|
|
"dccMarkup": {
|
|
"description": "Dynamic currency conversion markup in basis points",
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 10000
|
|
},
|
|
"descriptor": {
|
|
"description": "The gateway account's descriptor",
|
|
"type": "string"
|
|
},
|
|
"cityField": {
|
|
"description": "The gateway account's city field (also known as line 2 descriptor)",
|
|
"type": "string"
|
|
},
|
|
"organizationId": {
|
|
"description": "Organization ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"websites": {
|
|
"description": "Websites IDs",
|
|
"type": "array",
|
|
"items": {
|
|
"description": "Website ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"excludedDccQuoteCurrencies": {
|
|
"description": "Excluded Dynamic Currency Conversion Quote Currencies",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"monthlyLimit": {
|
|
"description": "Monthly Limit",
|
|
"type": "integer",
|
|
"format": "double",
|
|
"minimum": 0
|
|
},
|
|
"threeDSecure": {
|
|
"description": "True, if Gateway Account allows 3DSecure",
|
|
"type": "boolean"
|
|
},
|
|
"dynamicDescriptor": {
|
|
"description": "True, if Gateway Account allows dynamic descriptor",
|
|
"type": "boolean"
|
|
},
|
|
"acceptedCurrencies": {
|
|
"description": "Accepted currencies (array of the currency three letter code)",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"method": {
|
|
"$ref": "#/components/schemas/Method"
|
|
},
|
|
"paymentCardSchemes": {
|
|
"description": "Accepted payment card brands",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Visa",
|
|
"MasterCard",
|
|
"American Express",
|
|
"Discover",
|
|
"Maestro",
|
|
"Solo",
|
|
"Electron",
|
|
"JCB",
|
|
"Voyager",
|
|
"Diners Club",
|
|
"Switch",
|
|
"Laser",
|
|
"China Unionpay"
|
|
]
|
|
}
|
|
},
|
|
"downtimeStart": {
|
|
"description": "Gateway account downtime start",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"downtimeEnd": {
|
|
"description": "Gateway account downtime end",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"createdTime": {
|
|
"description": "Gateway Account created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "Gateway Account updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 2,
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/OnBoardingUrlLink"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"A1Gateway": {
|
|
"description": "A1Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"description": "A1Gateway credentials object",
|
|
"properties": {
|
|
"accountId": {
|
|
"type": "string",
|
|
"description": "A1Gateway account ID"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"description": "A1Gateway password",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"accountId",
|
|
"password"
|
|
]
|
|
},
|
|
"mpi": {
|
|
"$ref": "#/components/schemas/A1GatewayMpis"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"AmexVPC": {
|
|
"description": "AmexVPC config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"description": "AmexVPC credentials object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string",
|
|
"description": "Virtual Payment Client URL"
|
|
},
|
|
"merchantId": {
|
|
"type": "string",
|
|
"description": "Merchant ID"
|
|
},
|
|
"accessCode": {
|
|
"type": "string",
|
|
"description": "Access Code",
|
|
"format": "password"
|
|
},
|
|
"user": {
|
|
"type": "string",
|
|
"description": "User (used for refund, void and capture)"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"description": "Password (used for refund, void and capture)",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"url",
|
|
"merchantId",
|
|
"accessCode",
|
|
"user",
|
|
"password"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"AuthorizeNet": {
|
|
"description": "AuthorizeNet Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"apiLoginId": {
|
|
"type": "string",
|
|
"description": "AuthorizeNet Gateway api login ID"
|
|
},
|
|
"transactionKey": {
|
|
"description": "AuthorizeNet Gateway Transaction Key",
|
|
"type": "string",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"apiLoginId",
|
|
"transactionKey"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Beanstream": {
|
|
"description": "Beanstream Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"merchantId": {
|
|
"type": "string",
|
|
"description": "Beanstream Gateway merchant ID"
|
|
},
|
|
"apiPasscode": {
|
|
"type": "string",
|
|
"description": "Beanstream Gateway API Passcode",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"merchantId",
|
|
"apiPasscode"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"BraintreePayments": {
|
|
"description": "BraintreePayments Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"publicKey": {
|
|
"type": "string",
|
|
"description": "BraintreePayments Public Key"
|
|
},
|
|
"privateKey": {
|
|
"type": "string",
|
|
"description": "BraintreePayments Private Key",
|
|
"format": "password"
|
|
},
|
|
"merchantId": {
|
|
"type": "string",
|
|
"description": "BraintreePayments merchant ID",
|
|
"format": "password"
|
|
},
|
|
"merchantAccountId": {
|
|
"type": "string",
|
|
"description": "BraintreePayments merchant account ID",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"publicKey",
|
|
"privateKey",
|
|
"merchantId",
|
|
"merchantAccountId"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Cashflows": {
|
|
"description": "Cashflows Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"authId": {
|
|
"type": "string",
|
|
"description": "Cashflows Gateway auth ID"
|
|
},
|
|
"authPassword": {
|
|
"type": "string",
|
|
"description": "Cashflows Gateway auth password",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"authPassword",
|
|
"authId"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Cayan": {
|
|
"description": "Cayan Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"merchantSiteId": {
|
|
"type": "string",
|
|
"description": "Cayan Gateway merchant site ID"
|
|
},
|
|
"merchantName": {
|
|
"type": "string",
|
|
"description": "Cayan Gateway merchant name"
|
|
},
|
|
"merchantKey": {
|
|
"type": "string",
|
|
"description": "Cayan Gateway merchant key",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"merchantSiteId",
|
|
"merchantName",
|
|
"merchantKey"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Chase": {
|
|
"description": "Chase Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"username": {
|
|
"type": "string",
|
|
"description": "Chase Gateway Net Connect username"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"description": "Chase Gateway Net Connect password",
|
|
"format": "password"
|
|
},
|
|
"coNumber": {
|
|
"type": "string",
|
|
"description": "Chase Gateway CO Number used for delimited file reports"
|
|
},
|
|
"divisionId": {
|
|
"type": "string",
|
|
"description": "Chase Gateway division ID"
|
|
},
|
|
"partialAuth": {
|
|
"type": "boolean",
|
|
"description": "Support for Partial Auths",
|
|
"default": false
|
|
}
|
|
},
|
|
"required": [
|
|
"username",
|
|
"password",
|
|
"coNumber",
|
|
"divisionId",
|
|
"partialAuth"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"ChinaUnionPay": {
|
|
"description": "China Union Pay Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"accountId": {
|
|
"type": "string",
|
|
"description": "China Union Pay Gateway account ID"
|
|
},
|
|
"partyId": {
|
|
"type": "string",
|
|
"description": "China Union Pay Gateway party ID"
|
|
},
|
|
"goods": {
|
|
"type": "string",
|
|
"description": "China Union Pay Gateway goods"
|
|
},
|
|
"md5key": {
|
|
"type": "string",
|
|
"description": "China Union Pay Gateway md5key",
|
|
"format": "password"
|
|
},
|
|
"mobilePay": {
|
|
"type": "string",
|
|
"description": "China Union Pay Gateway mobile pay param"
|
|
}
|
|
},
|
|
"required": [
|
|
"accountId",
|
|
"partyId",
|
|
"goods",
|
|
"md5key",
|
|
"mobilePay"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Credorax": {
|
|
"description": "Credorax Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"merchantId": {
|
|
"type": "string",
|
|
"description": "Credorax Gateway merchant ID"
|
|
},
|
|
"merchantMd5Signature": {
|
|
"type": "string",
|
|
"description": "Credorax Gateway md5 signature",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"merchantId",
|
|
"merchantMd5Signature"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"DataCash": {
|
|
"description": "DataCash Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"client": {
|
|
"type": "string",
|
|
"description": "DataCash Gateway client"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"description": "DataCash Gateway password",
|
|
"format": "password"
|
|
},
|
|
"policy": {
|
|
"type": "integer",
|
|
"description": "Policy",
|
|
"minimum": 0,
|
|
"maximum": 7,
|
|
"default": 2
|
|
},
|
|
"delay": {
|
|
"type": "integer",
|
|
"description": "Auto Capture delay (in hours)",
|
|
"minimum": 0,
|
|
"default": 0
|
|
}
|
|
},
|
|
"required": [
|
|
"client",
|
|
"password",
|
|
"policy",
|
|
"delay"
|
|
]
|
|
},
|
|
"mpi": {
|
|
"$ref": "#/components/schemas/DataCashMpis"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Dengi": {
|
|
"description": "Dengi Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"projectId": {
|
|
"type": "string",
|
|
"description": "Dengi Gateway project ID"
|
|
},
|
|
"publicKey": {
|
|
"type": "string",
|
|
"description": "Dengi Gateway public key",
|
|
"format": "password"
|
|
},
|
|
"refundKey": {
|
|
"type": "string",
|
|
"description": "Dengi Gateway refund key",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"projectId",
|
|
"publicKey",
|
|
"refundKey"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"eMerchantPay": {
|
|
"description": "eMerchantPay Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"clientId": {
|
|
"type": "string",
|
|
"description": "eMerchantPay Gateway client ID"
|
|
},
|
|
"apiKey": {
|
|
"type": "string",
|
|
"description": "eMerchantPay Gateway api key",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"clientId",
|
|
"apiKey"
|
|
]
|
|
},
|
|
"mpi": {
|
|
"$ref": "#/components/schemas/eMerchantPayMpis"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Flexepin": {
|
|
"description": "Flexepin Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"apiKey": {
|
|
"type": "string",
|
|
"description": "Flexepin API Key"
|
|
},
|
|
"apiSecret": {
|
|
"type": "string",
|
|
"description": "Flexepin API Secret",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"apiKey",
|
|
"apiSecret"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Forte": {
|
|
"description": "Forte Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"accountId": {
|
|
"type": "string",
|
|
"description": "Forte Gateway account ID"
|
|
},
|
|
"locationId": {
|
|
"type": "string",
|
|
"description": "Forte Gateway location ID"
|
|
},
|
|
"apiAccessId": {
|
|
"type": "string",
|
|
"description": "Forte Gateway api access ID",
|
|
"format": "password"
|
|
},
|
|
"apiSecretKey": {
|
|
"type": "string",
|
|
"description": "Forte Gateway api secret key",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"accountId",
|
|
"locationId",
|
|
"apiAccessId",
|
|
"apiSecretKey"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"FundSend": {
|
|
"description": "FundSend Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"clientId": {
|
|
"type": "string",
|
|
"description": "FundSend Gateway client ID"
|
|
},
|
|
"secretWord": {
|
|
"type": "string",
|
|
"description": "FundSend Gateway secret word",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"clientId",
|
|
"secretWord"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"GET": {
|
|
"description": "GET Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"accountId": {
|
|
"type": "string",
|
|
"description": "GET Gateway account ID"
|
|
}
|
|
},
|
|
"required": [
|
|
"accountId"
|
|
]
|
|
},
|
|
"mpi": {
|
|
"$ref": "#/components/schemas/GETMpis"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"GlobalCollect": {
|
|
"description": "GlobalCollect Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"merchantId": {
|
|
"type": "string",
|
|
"description": "GlobalCollect Gateway merchant ID"
|
|
},
|
|
"apiKeyId": {
|
|
"type": "string",
|
|
"description": "GlobalCollect Gateway api key ID"
|
|
},
|
|
"apiSecretKey": {
|
|
"type": "string",
|
|
"description": "GlobalCollect Gateway api secret key",
|
|
"format": "password"
|
|
},
|
|
"skipFraudService": {
|
|
"type": "boolean",
|
|
"description": "GlobalCollect skip fraud service"
|
|
}
|
|
},
|
|
"required": [
|
|
"merchantId",
|
|
"apiKeyId",
|
|
"apiSecretKey"
|
|
]
|
|
},
|
|
"mpi": {
|
|
"$ref": "#/components/schemas/GlobalCollectMpis"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"GlobalOne": {
|
|
"description": "GlobalOne Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"terminalId": {
|
|
"type": "string",
|
|
"description": "GlobalOne Gateway terminal ID"
|
|
},
|
|
"sharedSecret": {
|
|
"type": "string",
|
|
"description": "GlobalOne Gateway shared secret",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"terminalId",
|
|
"sharedSecret"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Gpaysafe": {
|
|
"description": "Gpaysafe Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"apiKey": {
|
|
"type": "string",
|
|
"description": "Gpaysafe apiKey"
|
|
}
|
|
},
|
|
"required": [
|
|
"apiKey"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"iCheque": {
|
|
"description": "iCheque Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"clientId": {
|
|
"type": "string",
|
|
"description": "iCheque Gateway client ID"
|
|
},
|
|
"secretWord": {
|
|
"type": "string",
|
|
"description": "iCheque Gateway secret word",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"clientId",
|
|
"secretWord"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Ilixium": {
|
|
"description": "Ilixium Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"merchantId": {
|
|
"type": "string",
|
|
"description": "Ilixium Gateway merchant ID"
|
|
},
|
|
"accountId": {
|
|
"type": "string",
|
|
"description": "Ilixium Gateway account ID"
|
|
},
|
|
"digestPassword": {
|
|
"type": "string",
|
|
"description": "Ilixium Gateway digest password",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"merchantId",
|
|
"accountId",
|
|
"digestPassword"
|
|
]
|
|
},
|
|
"mpi": {
|
|
"$ref": "#/components/schemas/IlixiumMpis"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Jeton": {
|
|
"description": "Jeton Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"apiKey": {
|
|
"type": "string",
|
|
"description": "Jeton apiKey"
|
|
}
|
|
},
|
|
"required": [
|
|
"apiKey"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"JetPay": {
|
|
"description": "JetPay Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"TerminalID": {
|
|
"type": "string",
|
|
"description": "JetPay Gateway terminal ID"
|
|
}
|
|
},
|
|
"required": [
|
|
"TerminalID"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Moneris": {
|
|
"description": "Moneris Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"apiToken": {
|
|
"type": "string",
|
|
"description": "Moneris Gateway api token",
|
|
"format": "password"
|
|
},
|
|
"storeId": {
|
|
"type": "string",
|
|
"description": "Moneris Gateway store ID"
|
|
}
|
|
},
|
|
"required": [
|
|
"storeId",
|
|
"apiToken"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"NMI": {
|
|
"description": "NMI Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"username": {
|
|
"type": "string",
|
|
"description": "NMI Gateway api token"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"description": "NMI Gateway store ID",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"username",
|
|
"password"
|
|
]
|
|
},
|
|
"mpi": {
|
|
"$ref": "#/components/schemas/NMIMpis"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"OchaPay": {
|
|
"description": "OchaPay Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"apiUsername": {
|
|
"type": "string",
|
|
"description": "OchaPay Gateway username"
|
|
},
|
|
"apiPassword": {
|
|
"type": "string",
|
|
"description": "OchaPay Gateway api password",
|
|
"format": "password"
|
|
},
|
|
"secretWord": {
|
|
"type": "string",
|
|
"description": "OchaPay Gateway secret word",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"apiUsername",
|
|
"apiPassword",
|
|
"secretWord"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Optimal": {
|
|
"description": "Optimal Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"storeId": {
|
|
"type": "string",
|
|
"description": "Optimal Gateway store ID"
|
|
},
|
|
"storePwd": {
|
|
"type": "string",
|
|
"description": "Optimal Gateway store password",
|
|
"format": "password"
|
|
},
|
|
"accountNum": {
|
|
"type": "string",
|
|
"description": "Optimal Gateway account number"
|
|
}
|
|
},
|
|
"required": [
|
|
"storeId",
|
|
"storePwd",
|
|
"accountNum"
|
|
]
|
|
},
|
|
"mpi": {
|
|
"$ref": "#/components/schemas/OptimalMpis"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"PandaGateway": {
|
|
"description": "Panda Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"merchantCode": {
|
|
"type": "string",
|
|
"description": "Panda Gateway merchant code"
|
|
},
|
|
"apiCode": {
|
|
"type": "string",
|
|
"description": "Panda Gateway api code"
|
|
},
|
|
"signKey": {
|
|
"type": "string",
|
|
"description": "Panda Gateway sign key",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"merchantCode",
|
|
"apiCode",
|
|
"signKey"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Payeezy": {
|
|
"description": "Payeezy Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"merchantId": {
|
|
"type": "string",
|
|
"description": "Payeezy Merchant ID"
|
|
},
|
|
"merchantToken": {
|
|
"type": "string",
|
|
"description": "Merchant Token",
|
|
"format": "password"
|
|
},
|
|
"apiKey": {
|
|
"type": "string",
|
|
"description": "API Key"
|
|
},
|
|
"apiSecret": {
|
|
"type": "string",
|
|
"description": "API Secret",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"merchantId",
|
|
"merchantToken",
|
|
"apiKey",
|
|
"apiSecret"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Payflow": {
|
|
"description": "Payflow config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"description": "Payflow credentials object",
|
|
"properties": {
|
|
"user": {
|
|
"type": "string",
|
|
"description": "If you set up one or more additional users on the account, this value is the ID of the user authorized to process transactions. If, however, you have not set up additional users, USER has the same value as VENDOR"
|
|
},
|
|
"vendor": {
|
|
"type": "string",
|
|
"description": "Your merchant login ID created when you registered for the account."
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"description": "The password you defined while registering for the account.",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"user",
|
|
"vendor",
|
|
"password"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"PayPal": {
|
|
"description": "PayPal Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"merchantIdInPayPal": {
|
|
"type": "string",
|
|
"description": "PayPal Gateway merchant id"
|
|
},
|
|
"redirectUrl": {
|
|
"type": "string",
|
|
"description": "PayPal Gateway redirect url",
|
|
"format": "url"
|
|
}
|
|
},
|
|
"required": [
|
|
"merchantIdInPayPal",
|
|
"redirectUrl"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Payr": {
|
|
"description": "Payr Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"clientId": {
|
|
"type": "string",
|
|
"description": "Payr Gateway client ID"
|
|
},
|
|
"secretWord": {
|
|
"type": "string",
|
|
"description": "Payr Gateway secret word",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"clientId",
|
|
"secretWord"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Payvision": {
|
|
"description": "Payvision Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"memberId": {
|
|
"type": "string",
|
|
"description": "Payvision Gateway member id"
|
|
},
|
|
"memberGuid": {
|
|
"type": "string",
|
|
"description": "Payvision Gateway member guid",
|
|
"format": "password"
|
|
},
|
|
"avs": {
|
|
"type": "boolean",
|
|
"description": "Payvision Gateway avs"
|
|
},
|
|
"delay": {
|
|
"type": "integer",
|
|
"description": "Payvision Gateway delay"
|
|
}
|
|
},
|
|
"required": [
|
|
"memberId",
|
|
"memberGuid",
|
|
"avs",
|
|
"delay"
|
|
]
|
|
},
|
|
"mpi": {
|
|
"$ref": "#/components/schemas/PayvisionMpis"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Plugnpay": {
|
|
"description": "Plugnpay Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"publisher-name": {
|
|
"type": "string",
|
|
"description": "Plugnpay Gateway member id"
|
|
},
|
|
"publisher-password": {
|
|
"type": "string",
|
|
"description": "Plugnpay Gateway avs",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"publisher-name",
|
|
"publisher-password"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Realex": {
|
|
"description": "Realex Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"merchantId": {
|
|
"type": "string",
|
|
"description": "Realex Gateway merchant id"
|
|
},
|
|
"secretKey": {
|
|
"type": "string",
|
|
"description": "Realex Gateway secret key",
|
|
"format": "password"
|
|
},
|
|
"rebatePassword": {
|
|
"type": "string",
|
|
"description": "Realex Gateway rebate password",
|
|
"format": "password"
|
|
},
|
|
"account": {
|
|
"type": "string",
|
|
"description": "Realex Gateway account"
|
|
}
|
|
},
|
|
"required": [
|
|
"merchantId",
|
|
"secretKey",
|
|
"rebatePassword",
|
|
"account"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"RealTime": {
|
|
"description": "RealTime Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"clientId": {
|
|
"type": "string",
|
|
"description": "RealTime Gateway client ID"
|
|
},
|
|
"secretWord": {
|
|
"type": "string",
|
|
"description": "RealTime Gateway secret word",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"clientId",
|
|
"secretWord"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"RebillyProcessor": {
|
|
"description": "RebillyProcessor Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"mpi": {
|
|
"$ref": "#/components/schemas/RebillyProcessorMpis"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Redsys": {
|
|
"description": "Redsys Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"merchantCode": {
|
|
"type": "string",
|
|
"description": "Redsys Gateway merchant code",
|
|
"format": "password"
|
|
},
|
|
"secretCode": {
|
|
"type": "string",
|
|
"description": "Redsys Gateway secret code",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"merchantCode",
|
|
"secretCode"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"RPN": {
|
|
"description": "RPN Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"mid": {
|
|
"type": "string",
|
|
"description": "RPN MID"
|
|
},
|
|
"key": {
|
|
"type": "string",
|
|
"description": "RPN Key",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"mid",
|
|
"key"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Sagepay": {
|
|
"description": "Sagepay Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"M_ID": {
|
|
"type": "string",
|
|
"description": "Sagepay Gateway merchant ID"
|
|
},
|
|
"M_KEY": {
|
|
"type": "string",
|
|
"description": "Sagepay Gateway merchant key",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"M_ID",
|
|
"M_KEY"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"SMSVoucher": {
|
|
"description": "SMSVoucher Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"AppId": {
|
|
"type": "string",
|
|
"description": "SMSVoucher AppId"
|
|
}
|
|
},
|
|
"required": [
|
|
"AppId"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Stripe": {
|
|
"description": "Stripe Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"redirectUrl": {
|
|
"type": "string",
|
|
"description": "Stripe Gateway redirect url",
|
|
"format": "url"
|
|
}
|
|
},
|
|
"required": [
|
|
"redirectUrl"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"UPayCard": {
|
|
"description": "UPayCard Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"receiver_account": {
|
|
"type": "string",
|
|
"description": "merchant receiver account"
|
|
},
|
|
"key": {
|
|
"type": "string",
|
|
"description": "merchant key",
|
|
"format": "password"
|
|
},
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "merchant secret",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"receiver_account",
|
|
"key",
|
|
"secret"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"USAePay": {
|
|
"description": "USAePay Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"sourceKey": {
|
|
"type": "string",
|
|
"description": "USAePay Gateway source key",
|
|
"format": "password"
|
|
},
|
|
"pin": {
|
|
"type": "string",
|
|
"description": "USAePay Gateway pin",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"sourceKey",
|
|
"pin"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"VantivLitle": {
|
|
"description": "VantivLitle Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"username": {
|
|
"type": "string",
|
|
"description": "VantivLitle Gateway username"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"description": "VantivLitle Gateway password",
|
|
"format": "password"
|
|
},
|
|
"merchantId": {
|
|
"type": "string",
|
|
"description": "VantivLitle Gateway merchant ID"
|
|
}
|
|
},
|
|
"required": [
|
|
"username",
|
|
"password",
|
|
"merchantId"
|
|
]
|
|
},
|
|
"mpi": {
|
|
"$ref": "#/components/schemas/VantivLitleMpis"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"vegaaH": {
|
|
"description": "vegaaH Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"terminalId": {
|
|
"type": "string",
|
|
"description": "vegaaH Gateway terminal ID"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"description": "vegaaH Gateway password",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"terminalId",
|
|
"password"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Walpay": {
|
|
"description": "Walpay Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"merchantName": {
|
|
"type": "string",
|
|
"description": "Walpay Gateway merchant name"
|
|
},
|
|
"merchantPin": {
|
|
"type": "string",
|
|
"description": "Walpay Gateway merchant pin",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"merchantName",
|
|
"merchantPin"
|
|
]
|
|
},
|
|
"mpi": {
|
|
"$ref": "#/components/schemas/WalpayMpis"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Wirecard": {
|
|
"description": "Wirecard Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"merchantUsername": {
|
|
"type": "string",
|
|
"description": "Wirecard Gateway merchant username"
|
|
},
|
|
"merchantPassword": {
|
|
"type": "string",
|
|
"description": "Wirecard Gateway merchant password",
|
|
"format": "password"
|
|
},
|
|
"businessSignature": {
|
|
"type": "string",
|
|
"description": "Wirecard Gateway merchant business case signature",
|
|
"format": "password"
|
|
},
|
|
"delay": {
|
|
"type": "integer",
|
|
"description": "Wirecard Gateway delay"
|
|
}
|
|
},
|
|
"required": [
|
|
"merchantUsername",
|
|
"merchantPassword",
|
|
"businessSignature",
|
|
"delay"
|
|
]
|
|
},
|
|
"mpi": {
|
|
"$ref": "#/components/schemas/WirecardMpis"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Worldpay": {
|
|
"description": "Worldpay Gateway config",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"gatewayConfig"
|
|
],
|
|
"properties": {
|
|
"gatewayConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"merchantCode": {
|
|
"type": "string",
|
|
"description": "Worldpay Gateway merchant code",
|
|
"format": "password"
|
|
},
|
|
"merchantPassword": {
|
|
"type": "string",
|
|
"description": "Worldpay Gateway merchant password",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"merchantCode",
|
|
"merchantPassword"
|
|
]
|
|
},
|
|
"mpi": {
|
|
"$ref": "#/components/schemas/WorldpayMpis"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"AcquirerName": {
|
|
"description": "Acquirer name",
|
|
"type": "string",
|
|
"enum": [
|
|
"Alipay",
|
|
"AIB",
|
|
"B+S",
|
|
"Bank of America",
|
|
"Bank of Moscow",
|
|
"Bank of Rebilly",
|
|
"Bank One",
|
|
"Beanstream",
|
|
"BMO Harris Bank",
|
|
"Borgun",
|
|
"BraintreePayments",
|
|
"Catalunya Caixa",
|
|
"Chase",
|
|
"ChinaUnionPay",
|
|
"CIM",
|
|
"Credorax",
|
|
"Elavon",
|
|
"EMS",
|
|
"Fifth Third Bank",
|
|
"First Data Buypass",
|
|
"First Data Nashville",
|
|
"First Data North",
|
|
"First Data Omaha",
|
|
"Flexepin",
|
|
"Forte",
|
|
"FundSend",
|
|
"GlobalCollect",
|
|
"Global East",
|
|
"Gpaysafe",
|
|
"Heartland",
|
|
"HSBC",
|
|
"iCheque",
|
|
"Ilixium",
|
|
"Jeton",
|
|
"Masapay",
|
|
"Merrick",
|
|
"Mission Valley Bank",
|
|
"Moneris",
|
|
"NATWEST",
|
|
"NMI",
|
|
"OchaPay",
|
|
"Other",
|
|
"Panda Bank",
|
|
"PayPal",
|
|
"Payr",
|
|
"Payvision",
|
|
"Peoples Trust Company",
|
|
"Privatbank",
|
|
"RBC",
|
|
"RBS WorldPay",
|
|
"RealTime",
|
|
"RebillyProcessor",
|
|
"SMSVoucher",
|
|
"State Bank of Mauritius",
|
|
"Stripe",
|
|
"TBI",
|
|
"TrustPay",
|
|
"TSYS",
|
|
"UPayCard",
|
|
"Vantiv",
|
|
"VoicePay",
|
|
"WeChat Pay",
|
|
"Wells Fargo",
|
|
"Wing Hang Bank",
|
|
"Wirecard",
|
|
"WorldPay"
|
|
]
|
|
},
|
|
"GatewayName": {
|
|
"description": "The gateway name",
|
|
"type": "string",
|
|
"enum": [
|
|
"A1Gateway",
|
|
"AmexVPC",
|
|
"AuthorizeNet",
|
|
"Beanstream",
|
|
"BraintreePayments",
|
|
"Cashflows",
|
|
"Cayan",
|
|
"Chase",
|
|
"ChinaUnionPay",
|
|
"Credorax",
|
|
"DataCash",
|
|
"Dengi",
|
|
"eMerchantPay",
|
|
"Flexepin",
|
|
"FundSend",
|
|
"Forte",
|
|
"GET",
|
|
"GlobalCollect",
|
|
"GlobalOne",
|
|
"Gpaysafe",
|
|
"iCheque",
|
|
"Ilixium",
|
|
"JetPay",
|
|
"Jeton",
|
|
"Moneris",
|
|
"NMI",
|
|
"OchaPay",
|
|
"Optimal",
|
|
"PandaGateway",
|
|
"Payeezy",
|
|
"Payflow",
|
|
"PayPal",
|
|
"Payr",
|
|
"Payvision",
|
|
"Plugnpay",
|
|
"Realex",
|
|
"RealTime",
|
|
"RebillyProcessor",
|
|
"Redsys",
|
|
"RPN",
|
|
"Sagepay",
|
|
"SMSVoucher",
|
|
"Stripe",
|
|
"UPayCard",
|
|
"USAePay",
|
|
"VantivLitle",
|
|
"vegaaH",
|
|
"Walpay",
|
|
"Wirecard",
|
|
"Worldpay"
|
|
]
|
|
},
|
|
"MpiName": {
|
|
"description": "The Merchant plug-in Name",
|
|
"type": "string",
|
|
"enum": [
|
|
"PayvisionMpi",
|
|
"WirecardMpi",
|
|
"IlixiumMpi",
|
|
"DataCashMpi",
|
|
"OptimalMpi",
|
|
"GlobalCollectMpi",
|
|
"CardinalCommerce",
|
|
"Other"
|
|
]
|
|
},
|
|
"GlobalWebhook": {
|
|
"type": "object",
|
|
"required": [
|
|
"method",
|
|
"url",
|
|
"credentialHash"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "The webhook identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"eventsFilter": {
|
|
"description": "An array of System event type",
|
|
"type": "array",
|
|
"default": [],
|
|
"items": {
|
|
"$ref": "#/components/schemas/GlobalWebhookEventType"
|
|
}
|
|
},
|
|
"status": {
|
|
"$ref": "#/components/schemas/OnOff"
|
|
},
|
|
"method": {
|
|
"type": "string",
|
|
"enum": [
|
|
"GET",
|
|
"POST",
|
|
"PUT",
|
|
"PATCH",
|
|
"DELETE"
|
|
]
|
|
},
|
|
"url": {
|
|
"description": "URL that will be triggered when the given event occurs.",
|
|
"type": "string",
|
|
"format": "uri"
|
|
},
|
|
"headers": {
|
|
"type": "object",
|
|
"description": "Map of elements with header name - header value association"
|
|
},
|
|
"credentialHash": {
|
|
"type": "string",
|
|
"description": "Hash from Credentials which is used for authentication by the given URL"
|
|
},
|
|
"createdTime": {
|
|
"description": "List created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "List updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "Links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"GlobalWebhookEventType": {
|
|
"type": "string",
|
|
"description": "Rebilly webhooks event type",
|
|
"enum": [
|
|
"gateway-account-requested",
|
|
"subscription-trial-ended",
|
|
"subscription-activated",
|
|
"subscription-canceled",
|
|
"subscription-renewed",
|
|
"transaction-processed",
|
|
"payment-card-expired",
|
|
"payment-declined",
|
|
"invoice-modified",
|
|
"invoice-created",
|
|
"dispute-created",
|
|
"suspended-payment-completed"
|
|
]
|
|
},
|
|
"InvalidError": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"details": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"Invoice": {
|
|
"type": "object",
|
|
"required": [
|
|
"customerId",
|
|
"websiteId",
|
|
"currency"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "The invoice identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"customerId": {
|
|
"description": "The customer's ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"websiteId": {
|
|
"description": "The website's ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"organizationId": {
|
|
"description": "The organization's ID",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"subscriptionId": {
|
|
"description": "The related Subscription's ID if available, otherwise null",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"currency": {
|
|
"description": "The currency three letter code",
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"description": "The Invoice's amount",
|
|
"type": "number",
|
|
"format": "double",
|
|
"readOnly": true
|
|
},
|
|
"shippingAmount": {
|
|
"description": "The Invoice's shipping amount",
|
|
"type": "number",
|
|
"format": "double",
|
|
"readOnly": true
|
|
},
|
|
"billingAddress": {
|
|
"description": "Invoice's billing address",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ContactObject"
|
|
}
|
|
]
|
|
},
|
|
"deliveryAddress": {
|
|
"description": "Invoice's delivery address",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ContactObject"
|
|
}
|
|
]
|
|
},
|
|
"notes": {
|
|
"description": "Notes for the customer which will display on the invoice",
|
|
"type": "string"
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"description": "Invoice items array",
|
|
"readOnly": true,
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"taxes": {
|
|
"type": "array",
|
|
"description": "Taxes applied to this invoice",
|
|
"readOnly": true,
|
|
"items": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/InvoiceTax"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"discounts": {
|
|
"type": "array",
|
|
"description": "Discounts applied",
|
|
"readOnly": true,
|
|
"items": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/InvoiceDiscount"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "Invoice status.",
|
|
"readOnly": true,
|
|
"enum": [
|
|
"draft",
|
|
"issued",
|
|
"past-due",
|
|
"paid",
|
|
"abandoned",
|
|
"voided"
|
|
]
|
|
},
|
|
"delinquentCollectionPeriod": {
|
|
"type": "integer",
|
|
"description": "Delinquent Collection Period - difference between paidTime and dueTime in days.",
|
|
"readOnly": true
|
|
},
|
|
"collectionPeriod": {
|
|
"type": "integer",
|
|
"description": "Collection Period - difference between paidTime and issuedTime in days.",
|
|
"readOnly": true
|
|
},
|
|
"abandonedTime": {
|
|
"description": "Invoice abandoned time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"voidedTime": {
|
|
"description": "Invoice voided time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"paidTime": {
|
|
"description": "Invoice paid time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"dueTime": {
|
|
"description": "Invoice due time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"issuedTime": {
|
|
"description": "Invoice issued time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"createdTime": {
|
|
"description": "Invoice created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 6,
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/CustomerLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/WebsiteLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/BillingContactLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/DeliveryContactLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/OrganizationLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/LeadSourceLink"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"InvoiceIssue": {
|
|
"type": "object",
|
|
"properties": {
|
|
"issuedTime": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
}
|
|
},
|
|
"InvoiceItem": {
|
|
"type": "object",
|
|
"required": [
|
|
"type",
|
|
"unitPrice"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "The website identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"type": {
|
|
"description": "Invoice item's type",
|
|
"type": "string",
|
|
"enum": [
|
|
"debit",
|
|
"credit"
|
|
]
|
|
},
|
|
"unitPrice": {
|
|
"description": "Invoice item's price",
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"quantity": {
|
|
"description": "Invoice item's quantity",
|
|
"type": "integer"
|
|
},
|
|
"productId": {
|
|
"description": "The product's ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"description": {
|
|
"description": "Invoice item's description",
|
|
"type": "string"
|
|
},
|
|
"discountAmount": {
|
|
"description": "Invoice item discount amount",
|
|
"type": "number",
|
|
"format": "double",
|
|
"readOnly": true
|
|
},
|
|
"periodStartTime": {
|
|
"description": "Start time",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"periodEndTime": {
|
|
"description": "End time",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 2,
|
|
"items": {
|
|
"x-tuple": true,
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/SubscriptionLink"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"InvoiceTax": {
|
|
"type": "object",
|
|
"readOnly": true,
|
|
"properties": {
|
|
"amount": {
|
|
"description": "Tax amount",
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "Tax description"
|
|
}
|
|
}
|
|
},
|
|
"Layout": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "The layout identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"name": {
|
|
"description": "The name of the layout string",
|
|
"type": "string"
|
|
},
|
|
"items": {
|
|
"description": "The array of layout items (planId and starred)",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/LayoutItem"
|
|
}
|
|
},
|
|
"createdTime": {
|
|
"description": "Layout created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"customFields": {
|
|
"$ref": "#/components/schemas/ResourceCustomFields"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 2,
|
|
"maxItems": 2,
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/ItemsLink"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"LayoutItem": {
|
|
"type": "object",
|
|
"required": [
|
|
"planId"
|
|
],
|
|
"properties": {
|
|
"planId": {
|
|
"description": "The plan identifier string",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"starred": {
|
|
"description": "Boolean if the plan should be starred (special callout presentation)",
|
|
"type": "boolean"
|
|
},
|
|
"order": {
|
|
"description": "Item's order in Layout",
|
|
"type": "integer",
|
|
"readOnly": true
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"LeadSource": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "The lead source identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"medium": {
|
|
"description": "Lead Source's medium (eg search, display)",
|
|
"type": "string"
|
|
},
|
|
"source": {
|
|
"description": "Lead Source's source (eg google, yahoo)",
|
|
"type": "string"
|
|
},
|
|
"campaign": {
|
|
"description": "Lead Source's campaign (eg go-big-123)",
|
|
"type": "string"
|
|
},
|
|
"term": {
|
|
"description": "Lead Source's term (eg salt shakers)",
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"description": "Lead Source's content (eg smiley faces)",
|
|
"type": "string"
|
|
},
|
|
"affiliate": {
|
|
"description": "Lead Source's affiliate (eg 123, Bob Smith)",
|
|
"type": "string"
|
|
},
|
|
"subAffiliate": {
|
|
"description": "Lead Source's sub-affiliate also called a sub-id or click id in some circles (eg 123456)",
|
|
"type": "string"
|
|
},
|
|
"salesAgent": {
|
|
"description": "Lead Source's sales agent (eg James Bond)",
|
|
"type": "string"
|
|
},
|
|
"clickId": {
|
|
"description": "Lead Source's click id (may come from an ad server)",
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"description": "Lead Source's path uri (eg www.example.com/some/landing/path)",
|
|
"type": "string"
|
|
},
|
|
"ipAddress": {
|
|
"description": "Customer's IP Address",
|
|
"type": "string"
|
|
},
|
|
"currency": {
|
|
"description": "Currency (three letter ISO 4217 alpha code) (eg USD, EUR)",
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"description": "The amount that the lead cost",
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"createdTime": {
|
|
"description": "LeadSource created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "LeadSource updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 2,
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/CustomerLink"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"ApprovalUrlLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"approvalUrl"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"AttachmentResourceLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"customer",
|
|
"dispute",
|
|
"invoice",
|
|
"note",
|
|
"payment",
|
|
"plan",
|
|
"product",
|
|
"subscription",
|
|
"transaction"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"BankAccountLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"bankAccount"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"BillingContactLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"billingContact"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"CancelUrlLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"cancelUrl"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"ContactLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"contact"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"CustomerLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"customer"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"DefaultPaymentInstrumentLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"defaultPaymentInstrument"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"DeliveryContactLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"deliveryContact"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"DisputeLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"dispute"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"FileLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"file"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"GatewayAccountLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"gatewayAccount"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"ItemsLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"items"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"LeadSourceLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"leadSource"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"NewLink": {
|
|
"type": "object",
|
|
"properties": {
|
|
"href": {
|
|
"description": "The link URL",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"href"
|
|
]
|
|
},
|
|
"NotesLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"notes"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"OnBoardingUrlLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"onBoardingUrl"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"OrganizationLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"organization"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"ParentTransactionLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"parentTransaction"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"PaymentCardLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"paymentCard"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"PaymentLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"payment"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"PermalinkLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"permalink"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"PlanLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"plan"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"RefundUrlLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"refundUrl"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"RetriedTransactionLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"retriedTransaction"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"RuleSetVersionLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"rules"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"SelfLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"self"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"SubscriptionLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"subscription"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"TransactionLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"transaction"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"WebsiteLink": {
|
|
"type": "object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NewLink"
|
|
}
|
|
],
|
|
"properties": {
|
|
"rel": {
|
|
"description": "The link type",
|
|
"type": "string",
|
|
"enum": [
|
|
"website"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"rel"
|
|
]
|
|
},
|
|
"List": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"values"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "List ID",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"version": {
|
|
"description": "List version",
|
|
"type": "integer",
|
|
"readOnly": true,
|
|
"minimum": 1
|
|
},
|
|
"name": {
|
|
"description": "List name",
|
|
"type": "string"
|
|
},
|
|
"values": {
|
|
"description": "List values",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"createdTime": {
|
|
"description": "List created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "List updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "Links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Method": {
|
|
"type": "string",
|
|
"description": "The payment method",
|
|
"enum": [
|
|
"ach",
|
|
"cash",
|
|
"payment-card",
|
|
"paypal",
|
|
"Alipay",
|
|
"China UnionPay",
|
|
"Flexepin",
|
|
"Gpaysafe",
|
|
"Jeton",
|
|
"OchaPay",
|
|
"SMSVoucher",
|
|
"UPayCard",
|
|
"WeChat Pay"
|
|
]
|
|
},
|
|
"A1GatewayMpis": {
|
|
"description": "A1Gateway Mpis",
|
|
"discriminator": {
|
|
"propertyName": "name"
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MpiName"
|
|
}
|
|
],
|
|
"enum": [
|
|
"Other"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"DataCashMpi": {
|
|
"description": "DataCash Integrated",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/DataCashMpis"
|
|
}
|
|
]
|
|
},
|
|
"DataCashMpis": {
|
|
"description": "DataCash Mpis",
|
|
"discriminator": {
|
|
"propertyName": "name"
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MpiName"
|
|
}
|
|
],
|
|
"enum": [
|
|
"DataCashMpi"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"eMerchantPayMpis": {
|
|
"description": "eMerchantPay Mpis",
|
|
"discriminator": {
|
|
"propertyName": "name"
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MpiName"
|
|
}
|
|
],
|
|
"enum": [
|
|
"Other"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"GETMpis": {
|
|
"description": "GET Mpis",
|
|
"discriminator": {
|
|
"propertyName": "name"
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MpiName"
|
|
}
|
|
],
|
|
"enum": [
|
|
"Other"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"GlobalCollectMpi": {
|
|
"description": "GlobalCollect Integrated",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GlobalCollectMpis"
|
|
}
|
|
]
|
|
},
|
|
"GlobalCollectMpis": {
|
|
"description": "GlobalCollect Mpis",
|
|
"discriminator": {
|
|
"propertyName": "name"
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MpiName"
|
|
}
|
|
],
|
|
"enum": [
|
|
"GlobalCollectMpi"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"IlixiumMpi": {
|
|
"description": "Ilixium Integrated",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/IlixiumMpis"
|
|
}
|
|
]
|
|
},
|
|
"IlixiumMpis": {
|
|
"description": "IlixiumMpis Mpis",
|
|
"discriminator": {
|
|
"propertyName": "name"
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MpiName"
|
|
}
|
|
],
|
|
"enum": [
|
|
"IlixiumMpi"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"NMIMpis": {
|
|
"description": "NMI Mpis",
|
|
"discriminator": {
|
|
"propertyName": "name"
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MpiName"
|
|
}
|
|
],
|
|
"enum": [
|
|
"Other"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"OptimalMpi": {
|
|
"description": "Optimal Integrated",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/OptimalMpis"
|
|
}
|
|
]
|
|
},
|
|
"OptimalMpis": {
|
|
"description": "Optimal Mpis",
|
|
"discriminator": {
|
|
"propertyName": "name"
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MpiName"
|
|
}
|
|
],
|
|
"enum": [
|
|
"OptimalMpi"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"Other": {
|
|
"description": "Other",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/A1GatewayMpis"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/eMerchantPayMpis"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/GETMpis"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/NMIMpis"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PayvisionMpis"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/VantivLitleMpis"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/WalpayMpis"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/WorldpayMpis"
|
|
}
|
|
]
|
|
},
|
|
"CardinalCommerce": {
|
|
"description": "CardinalCommerce Mpi Credentials",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PayvisionMpis"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"merchantId",
|
|
"processorId",
|
|
"transactionPwd"
|
|
],
|
|
"properties": {
|
|
"merchantId": {
|
|
"type": "string",
|
|
"description": "Cardinal MerchantId"
|
|
},
|
|
"processorId": {
|
|
"type": "string",
|
|
"description": "Cardinal ProcessorId"
|
|
},
|
|
"transactionPwd": {
|
|
"type": "string",
|
|
"format": "password",
|
|
"description": "Cardinal TransactionPwd"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"PayvisionMpi": {
|
|
"description": "Payvision Integrated",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PayvisionMpis"
|
|
}
|
|
]
|
|
},
|
|
"PayvisionMpis": {
|
|
"description": "Payvision Mpis",
|
|
"discriminator": {
|
|
"propertyName": "name"
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MpiName"
|
|
}
|
|
],
|
|
"enum": [
|
|
"PayvisionMpi",
|
|
"CardinalCommerce",
|
|
"Other"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"RebillyProcessorMpi": {
|
|
"description": "RebillyProcessor Integrated",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RebillyProcessorMpis"
|
|
}
|
|
]
|
|
},
|
|
"RebillyProcessorMpis": {
|
|
"description": "RebillyProcessorMpis Mpis",
|
|
"discriminator": {
|
|
"propertyName": "name"
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MpiName"
|
|
}
|
|
],
|
|
"enum": [
|
|
"RebillySandboxMpi"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"VantivLitleMpis": {
|
|
"description": "VantivLitle Mpis",
|
|
"discriminator": {
|
|
"propertyName": "name"
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MpiName"
|
|
}
|
|
],
|
|
"enum": [
|
|
"Other"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"WalpayMpis": {
|
|
"description": "WalpayMpis Mpis",
|
|
"discriminator": {
|
|
"propertyName": "name"
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MpiName"
|
|
}
|
|
],
|
|
"enum": [
|
|
"Other"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"WirecardMpi": {
|
|
"description": "Wirecard Integrated",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/WirecardMpis"
|
|
}
|
|
]
|
|
},
|
|
"WirecardMpis": {
|
|
"description": "Wirecard Mpis",
|
|
"discriminator": {
|
|
"propertyName": "name"
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MpiName"
|
|
}
|
|
],
|
|
"enum": [
|
|
"WirecardMpi"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"WorldpayMpis": {
|
|
"description": "Worldpay Mpis",
|
|
"discriminator": {
|
|
"propertyName": "name"
|
|
},
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MpiName"
|
|
}
|
|
],
|
|
"enum": [
|
|
"Other"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"Note": {
|
|
"type": "object",
|
|
"required": [
|
|
"content",
|
|
"relatedType",
|
|
"relatedId"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "The note identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"createdBy": {
|
|
"description": "The note's creator",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"content": {
|
|
"description": "The note's name",
|
|
"type": "string"
|
|
},
|
|
"archived": {
|
|
"description": "Is the note archived (excluded from List method)",
|
|
"type": "boolean"
|
|
},
|
|
"relatedType": {
|
|
"description": "The note's related resource type",
|
|
"type": "string",
|
|
"enum": [
|
|
"customer",
|
|
"payment-card",
|
|
"payment-gateway",
|
|
"subscription",
|
|
"transaction"
|
|
]
|
|
},
|
|
"relatedId": {
|
|
"description": "The note's related resource ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"createdTime": {
|
|
"description": "Note created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "Note updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"archivedTime": {
|
|
"description": "Note archived time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"OnOff": {
|
|
"type": "string",
|
|
"default": "active",
|
|
"enum": [
|
|
"active",
|
|
"inactive"
|
|
]
|
|
},
|
|
"Organization": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"country"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "The organization identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"createdTime": {
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
},
|
|
"updatedTime": {
|
|
"description": "The organization updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"name": {
|
|
"description": "The organization name",
|
|
"type": "string",
|
|
"maxLength": 60
|
|
},
|
|
"address": {
|
|
"description": "The organization street address",
|
|
"type": "string",
|
|
"maxLength": 60
|
|
},
|
|
"address2": {
|
|
"description": "The organization street address",
|
|
"type": "string",
|
|
"maxLength": 60
|
|
},
|
|
"city": {
|
|
"description": "The organization city",
|
|
"type": "string",
|
|
"maxLength": 45
|
|
},
|
|
"region": {
|
|
"description": "The organization region (state)",
|
|
"type": "string",
|
|
"maxLength": 45
|
|
},
|
|
"country": {
|
|
"description": "The organization country ISO Alpha-2 code",
|
|
"type": "string",
|
|
"pattern": "^[A-Z]{2}$"
|
|
},
|
|
"postalCode": {
|
|
"description": "The organization postal code",
|
|
"type": "string",
|
|
"maxLength": 10
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Payment": {
|
|
"type": "object",
|
|
"required": [
|
|
"websiteId",
|
|
"customerId",
|
|
"currency",
|
|
"amount"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "The payment identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"websiteId": {
|
|
"description": "The website identifier string",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"customerId": {
|
|
"description": "The customer identifier string",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"currency": {
|
|
"description": "The payment currency ISO Alpha code",
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"description": "The payment amount",
|
|
"type": "integer",
|
|
"format": "double"
|
|
},
|
|
"scheduledTime": {
|
|
"description": "The time the payment is scheduled for collection",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"invoiceIds": {
|
|
"description": "The array of invoice identifiers",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
},
|
|
"description": {
|
|
"description": "The payment description",
|
|
"type": "string",
|
|
"maxLength": 255
|
|
},
|
|
"retryInstruction": {
|
|
"$ref": "#/components/schemas/PaymentRetry"
|
|
},
|
|
"retryNumber": {
|
|
"readOnly": true,
|
|
"description": "The position in the sequence of retries",
|
|
"type": "integer"
|
|
},
|
|
"retriedPaymentId": {
|
|
"readOnly": true,
|
|
"description": "The retried payment ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"customFields": {
|
|
"$ref": "#/components/schemas/ResourceCustomFields"
|
|
},
|
|
"paymentInstrument": {
|
|
"$ref": "#/components/schemas/PaymentInstrument"
|
|
},
|
|
"billingAddress": {
|
|
"description": "Billing Address",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ContactObject"
|
|
}
|
|
]
|
|
},
|
|
"createdBy": {
|
|
"description": "The process that created this payment",
|
|
"type": "string"
|
|
},
|
|
"updatedBy": {
|
|
"description": "The process that updated this payment",
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"description": "Payment status",
|
|
"type": "string",
|
|
"readOnly": true,
|
|
"enum": [
|
|
"scheduled",
|
|
"queued",
|
|
"in-progress",
|
|
"incomplete",
|
|
"waiting-gateway",
|
|
"suspended",
|
|
"completed"
|
|
]
|
|
},
|
|
"result": {
|
|
"description": "Payment result",
|
|
"type": "string",
|
|
"readOnly": true,
|
|
"enum": [
|
|
"approved",
|
|
"declined",
|
|
"canceled",
|
|
"unknown"
|
|
]
|
|
},
|
|
"riskMetadata": {
|
|
"description": "Risk metadata",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RiskMetadata"
|
|
}
|
|
]
|
|
},
|
|
"createdTime": {
|
|
"description": "Payment created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "Payment updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 4,
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/WebsiteLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/TransactionLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/ApprovalUrlLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/LeadSourceLink"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"PaymentCard": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "The card identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"customerId": {
|
|
"description": "The Customer's ID. Required if card is creating not from Token",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"pan": {
|
|
"description": "The card PAN (Primary Account Number). Required if card is creating not from Token",
|
|
"type": "string"
|
|
},
|
|
"bin": {
|
|
"description": "The card's bin (the PAN's first 6 digits)",
|
|
"type": "string",
|
|
"format": "bin",
|
|
"readOnly": true
|
|
},
|
|
"last4": {
|
|
"description": "The PAN's last 4 digits",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"expYear": {
|
|
"description": "Card's expiry year. Required if card is creating not from Token",
|
|
"type": "integer"
|
|
},
|
|
"expMonth": {
|
|
"description": "Card's expiry month. Required if card is creating not from Token",
|
|
"type": "integer"
|
|
},
|
|
"cvv": {
|
|
"description": "Card's cvv (card verification value). Required if card is creating not from Token",
|
|
"type": "string"
|
|
},
|
|
"billingAddress": {
|
|
"description": "The Billing Address. Required if card is creating not from Token",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ContactObject"
|
|
}
|
|
]
|
|
},
|
|
"token": {
|
|
"description": "PaymentCardToken. Use without any other fields",
|
|
"type": "string"
|
|
},
|
|
"safeHash": {
|
|
"description": "The card's hash. Based on bin and last 4 digits of the PAN",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"status": {
|
|
"description": "Payment Card status",
|
|
"type": "string",
|
|
"readOnly": true,
|
|
"enum": [
|
|
"active",
|
|
"expired",
|
|
"inactive",
|
|
"deactivated",
|
|
"pending"
|
|
]
|
|
},
|
|
"brand": {
|
|
"description": "Payment Card brand",
|
|
"type": "string",
|
|
"readOnly": true,
|
|
"enum": [
|
|
"Visa",
|
|
"MasterCard",
|
|
"American Express",
|
|
"Discover",
|
|
"Maestro",
|
|
"Solo",
|
|
"Electron",
|
|
"JCB",
|
|
"Voyager",
|
|
"Diners Club",
|
|
"Switch",
|
|
"Laser",
|
|
"China UnionPay"
|
|
]
|
|
},
|
|
"bankCountry": {
|
|
"description": "Payment Card bank country",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"bankName": {
|
|
"description": "Payment Card bank name",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"createdTime": {
|
|
"description": "Card created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "Card updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"customFields": {
|
|
"$ref": "#/components/schemas/ResourceCustomFields"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 3,
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/CustomerLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/BillingContactLink"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"PaymentCardMigrationRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"fromGatewayAccountId",
|
|
"toGatewayAccountId",
|
|
"paymentCardIds"
|
|
],
|
|
"properties": {
|
|
"fromGatewayAccountId": {
|
|
"description": "An ID of Gateway Account cards should be migrated from",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"toGatewayAccountId": {
|
|
"description": "An ID of Gateway Account cards should be migrated to",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"paymentCardIds": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"description": "An array of payment card IDs",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"PaymentCardMigrationResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"migratedCards": {
|
|
"type": "integer",
|
|
"description": "Amount of cards that were successfully migrated"
|
|
}
|
|
}
|
|
},
|
|
"PaymentInstrument": {
|
|
"type": "object",
|
|
"required": [
|
|
"method"
|
|
],
|
|
"discriminator": {
|
|
"propertyName": "method"
|
|
},
|
|
"properties": {
|
|
"method": {
|
|
"$ref": "#/components/schemas/Method"
|
|
}
|
|
}
|
|
},
|
|
"ach": {
|
|
"description": "ACH payment instrument object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PaymentInstrument"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"bankAccountId"
|
|
],
|
|
"properties": {
|
|
"bankAccountId": {
|
|
"description": "The bank account identifier string",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"gatewayAccountId": {
|
|
"description": "The payment gateway identifier string",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"cash": {
|
|
"description": "Cash payment instrument object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PaymentInstrument"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"receivedBy": {
|
|
"description": "The receiver's name",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"payment-card": {
|
|
"description": "Payment card payment instrument object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PaymentInstrument"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"paymentCardId"
|
|
],
|
|
"properties": {
|
|
"paymentCardId": {
|
|
"description": "The payment card identifier string",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"gatewayAccountId": {
|
|
"description": "The payment gateway identifier string",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"paypal": {
|
|
"description": "PayPal payment instrument object",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PaymentInstrument"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"payPalAccountId"
|
|
],
|
|
"properties": {
|
|
"payPalAccountId": {
|
|
"description": "The PayPal account identifier string",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"gatewayAccountId": {
|
|
"description": "The payment gateway identifier string",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"AmountAdjustment": {
|
|
"type": "object",
|
|
"discriminator": {
|
|
"propertyName": "method"
|
|
},
|
|
"properties": {
|
|
"method": {
|
|
"type": "string",
|
|
"enum": [
|
|
"none",
|
|
"partial",
|
|
"discount"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"method"
|
|
]
|
|
},
|
|
"PaymentRetry": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attempts": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"scheduleInstruction": {
|
|
"$ref": "#/components/schemas/CommonScheduleInstruction"
|
|
},
|
|
"paymentInstruction": {
|
|
"$ref": "#/components/schemas/AmountAdjustment"
|
|
}
|
|
},
|
|
"required": [
|
|
"scheduleInstruction",
|
|
"paymentInstruction"
|
|
]
|
|
}
|
|
},
|
|
"afterAttemptPolicy": {
|
|
"description": "The policy on the attempt finishes",
|
|
"type": "string",
|
|
"enum": [
|
|
"none",
|
|
"change-subscription-renewal-time"
|
|
]
|
|
},
|
|
"afterRetryEndPolicy": {
|
|
"description": "The policy on the retry ends",
|
|
"type": "string",
|
|
"enum": [
|
|
"none",
|
|
"cancel-subscription"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"attempts",
|
|
"afterAttemptPolicy",
|
|
"afterRetryEndPolicy"
|
|
]
|
|
},
|
|
"discount": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/AmountAdjustment"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"value": {
|
|
"description": "The payment amount discount",
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"type": {
|
|
"description": "The payment amount discount type",
|
|
"type": "string",
|
|
"enum": [
|
|
"percent",
|
|
"fixed"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"value",
|
|
"type"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"partial": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/AmountAdjustment"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"value": {
|
|
"description": "The payment amount",
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"type": {
|
|
"description": "The payment amount type",
|
|
"type": "string",
|
|
"enum": [
|
|
"percent",
|
|
"fixed"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"value",
|
|
"type"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"PaymentToken": {
|
|
"type": "object",
|
|
"required": [
|
|
"method",
|
|
"paymentInstrument"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "The token identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"method": {
|
|
"$ref": "#/components/schemas/Method"
|
|
},
|
|
"paymentInstrument": {
|
|
"$ref": "#/components/schemas/PaymentTokenInstrument"
|
|
},
|
|
"fingerprint": {
|
|
"description": "Device fingerprint hash",
|
|
"type": "string"
|
|
},
|
|
"billingAddress": {
|
|
"description": "The Address. Required if bank account is not created from Token",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ContactObject"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"PaymentTokenInstrument": {
|
|
"type": "object",
|
|
"description": "Payment Token instrument object",
|
|
"properties": {
|
|
"pan": {
|
|
"description": "The card PAN (Primary Account Number)",
|
|
"type": "string"
|
|
},
|
|
"expMonth": {
|
|
"description": "Card's expiry month",
|
|
"type": "integer"
|
|
},
|
|
"expYear": {
|
|
"description": "Card's expiry year",
|
|
"type": "integer"
|
|
},
|
|
"cvv": {
|
|
"description": "The CVV/CVC of the payment card",
|
|
"type": "string"
|
|
},
|
|
"routingNumber": {
|
|
"description": "Routing Number",
|
|
"type": "integer"
|
|
},
|
|
"accountNumber": {
|
|
"description": "AccountNumber",
|
|
"type": "integer"
|
|
},
|
|
"accountType": {
|
|
"description": "Account Type",
|
|
"type": "string"
|
|
},
|
|
"bankName": {
|
|
"description": "Bank name",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"PayPalAccount": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "The PayPal identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"customerId": {
|
|
"description": "The Customer's ID.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"billingAddress": {
|
|
"description": "The Customer's Billing Address.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ContactObject"
|
|
}
|
|
]
|
|
},
|
|
"username": {
|
|
"description": "PayPal username.",
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"description": "PayPal Account status",
|
|
"type": "string",
|
|
"readOnly": true,
|
|
"enum": [
|
|
"inactive",
|
|
"active",
|
|
"deactivated"
|
|
]
|
|
},
|
|
"createdTime": {
|
|
"description": "PayPal Account created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "PayPal Account updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"customFields": {
|
|
"$ref": "#/components/schemas/ResourceCustomFields"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 4,
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/CustomerLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/ContactLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/ApprovalUrlLink"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"customerId",
|
|
"billingAddress"
|
|
]
|
|
},
|
|
"Plan": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"currency"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "The website identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"name": {
|
|
"description": "The plan name",
|
|
"type": "string"
|
|
},
|
|
"currency": {
|
|
"description": "Currency (three letter ISO 4217 code)",
|
|
"type": "string"
|
|
},
|
|
"currencySign": {
|
|
"description": "Currency sign",
|
|
"type": "string"
|
|
},
|
|
"isActive": {
|
|
"description": "If the plan is not active, customers cannot subscribe to the plan (default to true)",
|
|
"type": "boolean"
|
|
},
|
|
"description": {
|
|
"description": "The plan description",
|
|
"type": "string"
|
|
},
|
|
"richDescription": {
|
|
"description": "The plan rich description - supports HTML",
|
|
"type": "string"
|
|
},
|
|
"recurringAmount": {
|
|
"description": "The amount that recurs according to the schedule",
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"recurringPeriodUnit": {
|
|
"description": "The unit of time",
|
|
"type": "string",
|
|
"enum": [
|
|
"day",
|
|
"week",
|
|
"month",
|
|
"year"
|
|
]
|
|
},
|
|
"recurringPeriodLength": {
|
|
"description": "The length of time (used with the recurringPeriodUnit)",
|
|
"type": "integer"
|
|
},
|
|
"trialAmount": {
|
|
"description": "The amount of a trial - 0 is a valid value (for free)",
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"trialPeriodUnit": {
|
|
"description": "The unit of time",
|
|
"type": "string",
|
|
"enum": [
|
|
"day",
|
|
"week",
|
|
"month",
|
|
"year"
|
|
]
|
|
},
|
|
"trialPeriodLength": {
|
|
"description": "The length of time (used with the trialPeriodUnit)",
|
|
"type": "integer"
|
|
},
|
|
"setupAmount": {
|
|
"description": "The amount of a trial - 0 is a valid value (for free)",
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"expiredTime": {
|
|
"description": "Time when the plan is not longer valid",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"contractTermUnit": {
|
|
"description": "The unit of time",
|
|
"type": "string",
|
|
"enum": [
|
|
"day",
|
|
"week",
|
|
"month",
|
|
"year"
|
|
]
|
|
},
|
|
"contractTermLength": {
|
|
"description": "The length that corresponds with the contractTermUnit",
|
|
"type": "integer"
|
|
},
|
|
"recurringPeriodLimit": {
|
|
"description": "The number of times a subscription will rebill until the contract is over",
|
|
"type": "integer"
|
|
},
|
|
"minQuantity": {
|
|
"description": "Minimum quantity per order, defaults to 1",
|
|
"type": "integer"
|
|
},
|
|
"maxQuantity": {
|
|
"description": "Maximum quantity per order (NULL if no maximum)",
|
|
"type": "integer"
|
|
},
|
|
"createdTime": {
|
|
"description": "Plan created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "Plan updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"PriceBasedShippingRate": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"currency",
|
|
"price"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"description": "The shipping rate name",
|
|
"type": "string",
|
|
"maxLength": 255
|
|
},
|
|
"minOrderSubtotal": {
|
|
"description": "Minimum order subtotal for which this shipping rate is applicable, defaults to 0.00",
|
|
"type": "number",
|
|
"format": "double",
|
|
"default": 0
|
|
},
|
|
"maxOrderSubtotal": {
|
|
"description": "Maximum order subtotal for which this shipping rate is applicable (NULL if no maximum)",
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"price": {
|
|
"description": "The shipping price - 0 is a valid value (for free)",
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"currency": {
|
|
"description": "Currency (three letter ISO 4217 code)",
|
|
"type": "string"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Product": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"description": "Your product includes digital goods, services, and physical goods.\nProducts appear on invoice line items. If you set a tax category identifier,\ntaxes will be calculated upon invoice generation.\n",
|
|
"example": "{\n \"id\": \"stringid\",\n \"name\": \"Widget\",\n \"description\": \"Fantastic widget\",\n \"taxCategoryId\": null,\n \"requiresShipping\": true,\n \"accountingCode\": \"100\",\n \"customFields\": [],\n \"createdTime\": \"2015-08-27 13:45:12\",\n \"updatedTime\": \"2015-08-27 13:45:12\",\n \"_links\": [\n {\n \"rel\": \"self\",\n \"href\": \"https://api.rebilly.com/v2.1/products/stringid\"\n }\n ]\n}\n",
|
|
"properties": {
|
|
"id": {
|
|
"description": "The product identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"name": {
|
|
"description": "The product name",
|
|
"type": "string",
|
|
"maxLength": 255
|
|
},
|
|
"description": {
|
|
"description": "The product description",
|
|
"type": "string",
|
|
"maxLength": 512
|
|
},
|
|
"taxCategoryId": {
|
|
"description": "The product's tax category identifier string",
|
|
"type": "string",
|
|
"enum": [
|
|
99999,
|
|
20010,
|
|
40030,
|
|
51020,
|
|
51010,
|
|
31000,
|
|
30070
|
|
]
|
|
},
|
|
"requiresShipping": {
|
|
"description": "If the product requires shipping, shipping calculations will be applied",
|
|
"type": "boolean"
|
|
},
|
|
"accountingCode": {
|
|
"description": "The product accounting code",
|
|
"type": "string"
|
|
},
|
|
"customFields": {
|
|
"$ref": "#/components/schemas/ResourceCustomFields"
|
|
},
|
|
"createdTime": {
|
|
"description": "The product created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "The product updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Profile": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "The user identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"email": {
|
|
"description": "The user email",
|
|
"readOnly": true,
|
|
"type": "string",
|
|
"format": "email",
|
|
"maxLength": 100
|
|
},
|
|
"firstName": {
|
|
"description": "User's first name",
|
|
"readOnly": true,
|
|
"type": "string"
|
|
},
|
|
"lastName": {
|
|
"description": "User's last name",
|
|
"readOnly": true,
|
|
"type": "string"
|
|
},
|
|
"businessPhone": {
|
|
"description": "The user business phone number",
|
|
"readOnly": true,
|
|
"type": "string"
|
|
},
|
|
"mobilePhone": {
|
|
"description": "The user mobile phone number",
|
|
"readOnly": true,
|
|
"type": "string"
|
|
},
|
|
"availableCurrencies": {
|
|
"type": "array",
|
|
"description": "An array of reporting currencies enabled for the merchant",
|
|
"readOnly": true,
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"reportingCurrency": {
|
|
"description": "The user's ISO Alpha-3 code used for reports",
|
|
"type": "string"
|
|
},
|
|
"totpRequired": {
|
|
"description": "The user setting of two-factor authentification",
|
|
"readOnly": true,
|
|
"type": "boolean"
|
|
},
|
|
"totpSecret": {
|
|
"description": "The user TOTP key for authentification app (if TOTP enabled)",
|
|
"readOnly": true,
|
|
"type": "string"
|
|
},
|
|
"totpUrl": {
|
|
"description": "The user link to QR-code for TOTP authentification app (if TOTP enabled)",
|
|
"readOnly": true,
|
|
"type": "string",
|
|
"format": "url"
|
|
},
|
|
"country": {
|
|
"description": "The user country setting - two letter code",
|
|
"readOnly": true,
|
|
"type": "string"
|
|
},
|
|
"preferences": {
|
|
"description": "User preferences like timezone, language and many more. This is an object with custom properties.",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"ResetPassword": {
|
|
"type": "object",
|
|
"required": [
|
|
"newPassword"
|
|
],
|
|
"properties": {
|
|
"newPassword": {
|
|
"description": "New password",
|
|
"type": "string",
|
|
"format": "password"
|
|
}
|
|
}
|
|
},
|
|
"ResetPasswordToken": {
|
|
"type": "object",
|
|
"required": [
|
|
"username",
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"token": {
|
|
"description": "The token's identifier string",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"username": {
|
|
"description": "The token's username",
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"description": "Token's password (only for POST)",
|
|
"type": "string",
|
|
"format": "password"
|
|
},
|
|
"credential": {
|
|
"description": "Token's credential ID",
|
|
"type": "string"
|
|
},
|
|
"expiredTime": {
|
|
"description": "Password expired time",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"ResourceCustomFields": {
|
|
"description": "\"Custom Fields list as a map `{\"custom field name\": \"custom field value\", ...}\"`.\nThe format must follow the saved format (see Custom Fields section for the formats).\n",
|
|
"type": "object"
|
|
},
|
|
"ResourceId": {
|
|
"type": "string",
|
|
"description": "The resource ID. Defaults to UUID v4",
|
|
"maxLength": 50,
|
|
"example": "4f6cf35x-2c4y-483z-a0a9-158621f77a21"
|
|
},
|
|
"RiskMetadata": {
|
|
"type": "object",
|
|
"properties": {
|
|
"ipAddress": {
|
|
"description": "The customer's IP",
|
|
"type": "string",
|
|
"format": "ipv4"
|
|
},
|
|
"isProxy": {
|
|
"description": "True if customer's ip address is related to proxy",
|
|
"type": "boolean",
|
|
"readOnly": true
|
|
},
|
|
"isVpn": {
|
|
"description": "True if customer's ip address is related to VPN",
|
|
"type": "boolean",
|
|
"readOnly": true
|
|
},
|
|
"isTor": {
|
|
"description": "True if customer's ip address is related to TOR",
|
|
"type": "boolean",
|
|
"readOnly": true
|
|
},
|
|
"isHosting": {
|
|
"description": "True if customer's ip address is related to hosting",
|
|
"type": "boolean",
|
|
"readOnly": true
|
|
},
|
|
"vpnServiceName": {
|
|
"description": "VPN service name, if available",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"isp": {
|
|
"description": "Internet Service Provider name, if available",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"country": {
|
|
"description": "Country ISO Alpha-2 code for specified ipAddress",
|
|
"maxLength": 2,
|
|
"type": "string",
|
|
"readOnly": true,
|
|
"example": "US"
|
|
},
|
|
"city": {
|
|
"description": "City for specified ipAddress",
|
|
"type": "string",
|
|
"readOnly": true,
|
|
"example": "New York"
|
|
},
|
|
"latitude": {
|
|
"description": "Latitude for specified ipAddress",
|
|
"type": "number",
|
|
"format": "double",
|
|
"readOnly": true
|
|
},
|
|
"longitude": {
|
|
"description": "Longitude for specified ipAddress",
|
|
"type": "number",
|
|
"format": "double",
|
|
"readOnly": true
|
|
},
|
|
"postalCode": {
|
|
"description": "Postal code for specified ipAddress",
|
|
"type": "string",
|
|
"maxLength": 10,
|
|
"readOnly": true
|
|
},
|
|
"timeZone": {
|
|
"description": "Time zone for specified ipAddress",
|
|
"type": "string",
|
|
"readOnly": true,
|
|
"example": "America/New_York"
|
|
},
|
|
"accuracyRadius": {
|
|
"description": "Accuracy radius for specified ipAddress (kilometers)",
|
|
"type": "integer",
|
|
"readOnly": true
|
|
},
|
|
"fingerprint": {
|
|
"description": "The fingerprint",
|
|
"type": "string"
|
|
},
|
|
"httpHeaders": {
|
|
"description": "HTTP headers",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"example": {
|
|
"User-Agent": "Mozilla/5.0",
|
|
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"add-risk-score": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RuleAction"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"description": "Add risk score",
|
|
"properties": {
|
|
"score": {
|
|
"type": "integer",
|
|
"default": 0
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"blacklist": {
|
|
"description": "Add customer data to blacklist",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RuleAction"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"customer-id",
|
|
"email",
|
|
"fingerprint",
|
|
"ip-address",
|
|
"payment-card-id"
|
|
]
|
|
},
|
|
"ttl": {
|
|
"type": "integer",
|
|
"description": "Blacklist TTL. Defaults to zero, meaning blacklist record won't expire ever.",
|
|
"default": 0
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"cancel-scheduled-payments": {
|
|
"description": "",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RuleAction"
|
|
}
|
|
]
|
|
},
|
|
"guess-payment-card-expiration": {
|
|
"description": "",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RuleAction"
|
|
}
|
|
]
|
|
},
|
|
"pick-gateway-account": {
|
|
"description": "",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RuleAction"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"pickInstruction": {
|
|
"$ref": "#/components/schemas/GatewayAccountPickInstruction"
|
|
}
|
|
},
|
|
"required": [
|
|
"pickInstruction"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"schedule-payment-retry": {
|
|
"description": "",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RuleAction"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PaymentRetry"
|
|
}
|
|
]
|
|
},
|
|
"schedule-payment": {
|
|
"description": "",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RuleAction"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"description": "The calculation instruction of scheduled time for payment",
|
|
"properties": {
|
|
"scheduleInstruction": {
|
|
"$ref": "#/components/schemas/CommonScheduleInstruction"
|
|
},
|
|
"amountPolicy": {
|
|
"type": "string",
|
|
"enum": [
|
|
"balance-outstanding",
|
|
"invoice-total"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"scheduleInstruction",
|
|
"amountPolicy"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"send-email": {
|
|
"description": "",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RuleAction"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/EmailNotification"
|
|
}
|
|
]
|
|
},
|
|
"stop-subscriptions": {
|
|
"description": "Stop active subscriptions",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RuleAction"
|
|
}
|
|
]
|
|
},
|
|
"trigger-webhook": {
|
|
"description": "",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RuleAction"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/Webhook"
|
|
}
|
|
]
|
|
},
|
|
"SendPreviewWebhook": {
|
|
"description": "Trigger a test webhook",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Webhook"
|
|
}
|
|
]
|
|
},
|
|
"SendTestEmail": {
|
|
"description": "Send a test email",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/EmailNotification"
|
|
}
|
|
]
|
|
},
|
|
"EmailNotification": {
|
|
"type": "object",
|
|
"properties": {
|
|
"credentialHash": {
|
|
"type": "string",
|
|
"description": "SMTP Credential identifier string."
|
|
},
|
|
"sender": {
|
|
"type": "string",
|
|
"description": "The sender address. The template palceholders are allowed."
|
|
},
|
|
"recipients": {
|
|
"type": "array",
|
|
"description": "The recipients addresses. The template palceholders are allowed.",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"cc": {
|
|
"type": "array",
|
|
"description": "The recipients addresses. The template palceholders are allowed.",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"bcc": {
|
|
"type": "array",
|
|
"description": "The hidden recipients addresses. The template palceholders are allowed.",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"subject": {
|
|
"type": "string",
|
|
"description": "The message subject. The template palceholders are allowed."
|
|
},
|
|
"bodyText": {
|
|
"type": "string",
|
|
"description": "Leave empty to use text from \"bodyHtml\" without tags.\nThe template palceholders are allowed.\n"
|
|
},
|
|
"bodyHtml": {
|
|
"type": "string",
|
|
"description": "Leave empty to recieve \"text/plain\" email.\nThe template palceholders are allowed.\n"
|
|
}
|
|
},
|
|
"required": [
|
|
"credentialHash",
|
|
"sender",
|
|
"recipients",
|
|
"subject",
|
|
"bodyText",
|
|
"bodyHtml"
|
|
]
|
|
},
|
|
"GatewayAccountPickInstruction": {
|
|
"type": "object",
|
|
"discriminator": {
|
|
"propertyName": "method"
|
|
},
|
|
"properties": {
|
|
"method": {
|
|
"type": "string",
|
|
"enum": [
|
|
"gateway-account-weights",
|
|
"gateway-acquirer-weights"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"method"
|
|
]
|
|
},
|
|
"gateway-account-weights": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccountPickInstruction"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"weightedList": {
|
|
"type": "array",
|
|
"uniqueItems": true,
|
|
"minimum": 0,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"gatewayAccountId": {
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
},
|
|
"weight": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"gatewayAccountId",
|
|
"weight"
|
|
]
|
|
},
|
|
"example": "[\n {\"gatewayAccountId\": \"my_gateway_account_1\", \"weight\": 80},\n {\"gatewayAccountId\": \"my_gateway_account_2\", \"weight\": 20}\n]\n"
|
|
}
|
|
},
|
|
"required": [
|
|
"weightedList"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gateway-acquirer-weights": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccountPickInstruction"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"weightedList": {
|
|
"type": "array",
|
|
"uniqueItems": true,
|
|
"minimum": 0,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"gatewayName": {
|
|
"$ref": "#/components/schemas/GatewayName"
|
|
},
|
|
"acquirerName": {
|
|
"$ref": "#/components/schemas/AcquirerName"
|
|
},
|
|
"weight": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"gatewayName",
|
|
"acquirerName",
|
|
"weight"
|
|
]
|
|
},
|
|
"example": "[\n {\"gatewayName\": \"RebillyProcessor\", \"acquirerName\": \"AIB\", \"weight\": 80},\n {\"gatewayName\": \"RebillyProcessor\", \"acquirerName\": \"B+S\", \"weight\": 20}\n"
|
|
}
|
|
},
|
|
"required": [
|
|
"weightedList"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"Rule": {
|
|
"type": "object",
|
|
"description": "The rule",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"$ref": "#/components/schemas/OnOff"
|
|
},
|
|
"final": {
|
|
"description": "Whether rule is final, meaning stop further matching rules if this is matched",
|
|
"type": "boolean",
|
|
"default": true
|
|
},
|
|
"criteria": {
|
|
"$ref": "#/components/schemas/Condition"
|
|
},
|
|
"actions": {
|
|
"type": "array",
|
|
"uniqueItems": true,
|
|
"items": {
|
|
"$ref": "#/components/schemas/RuleAction"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"actions"
|
|
]
|
|
},
|
|
"RuleAction": {
|
|
"type": "object",
|
|
"discriminator": {
|
|
"propertyName": "name"
|
|
},
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "The action name",
|
|
"enum": [
|
|
"blacklist",
|
|
"cancel-scheduled-payments",
|
|
"guess-payment-card-expiration",
|
|
"pick-gateway-account",
|
|
"schedule-payment-retry",
|
|
"schedule-payment",
|
|
"send-email",
|
|
"trigger-webhook",
|
|
"stop-subscriptions",
|
|
"add-risk-score"
|
|
]
|
|
},
|
|
"status": {
|
|
"$ref": "#/components/schemas/OnOff"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
]
|
|
},
|
|
"RuleSet": {
|
|
"type": "object",
|
|
"description": "Set of rules for particular event",
|
|
"properties": {
|
|
"version": {
|
|
"type": "integer",
|
|
"readOnly": true
|
|
},
|
|
"rules": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Rule"
|
|
}
|
|
},
|
|
"updatedTime": {
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"rules"
|
|
]
|
|
},
|
|
"RuleSetHistoryItem": {
|
|
"type": "object",
|
|
"description": "Version of rules",
|
|
"readOnly": true,
|
|
"properties": {
|
|
"version": {
|
|
"type": "integer"
|
|
},
|
|
"createdTime": {
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to a resource",
|
|
"readOnly": true,
|
|
"minItems": 2,
|
|
"maxItems": 2,
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/RuleSetVersionLink"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"RuleSetVersion": {
|
|
"type": "object",
|
|
"description": "Version of rules",
|
|
"readOnly": true,
|
|
"properties": {
|
|
"version": {
|
|
"type": "integer"
|
|
},
|
|
"rules": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Rule"
|
|
}
|
|
},
|
|
"createdTime": {
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Webhook": {
|
|
"type": "object",
|
|
"properties": {
|
|
"method": {
|
|
"type": "string",
|
|
"enum": [
|
|
"GET",
|
|
"POST",
|
|
"PUT",
|
|
"PATCH",
|
|
"DELETE"
|
|
]
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"format": "uri"
|
|
},
|
|
"query": {
|
|
"type": "object",
|
|
"description": "The URI parameters",
|
|
"additionalProperties": {
|
|
"type": "string",
|
|
"example": {
|
|
"param1": "value1",
|
|
"param2": "value2"
|
|
}
|
|
}
|
|
},
|
|
"body": {
|
|
"type": "string"
|
|
},
|
|
"credentialHash": {
|
|
"type": "string",
|
|
"description": "Webhook Credential identifier string."
|
|
},
|
|
"headers": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/WebhookHeader"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"method",
|
|
"url"
|
|
]
|
|
},
|
|
"WebhookHeader": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"$ref": "#/components/schemas/OnOff"
|
|
},
|
|
"value": {
|
|
"type": "string",
|
|
"example": {
|
|
"Header1": "value1",
|
|
"Header2": "value2;value3"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"value"
|
|
]
|
|
},
|
|
"CommonScheduleInstruction": {
|
|
"type": "object",
|
|
"description": "The calculation instruction of scheduled time",
|
|
"discriminator": {
|
|
"propertyName": "method"
|
|
},
|
|
"properties": {
|
|
"method": {
|
|
"type": "string",
|
|
"enum": [
|
|
"auto",
|
|
"immediately",
|
|
"date-interval",
|
|
"day-of-month",
|
|
"day-of-week"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"method"
|
|
]
|
|
},
|
|
"CustomEventScheduleInstruction": {
|
|
"type": "object",
|
|
"description": "The calculation instruction of scheduled time",
|
|
"discriminator": {
|
|
"propertyName": "method"
|
|
},
|
|
"properties": {
|
|
"method": {
|
|
"type": "string",
|
|
"enum": [
|
|
"date-interval",
|
|
"day-of-month",
|
|
"day-of-week"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"method"
|
|
]
|
|
},
|
|
"DayOfWeek": {
|
|
"type": "string",
|
|
"enum": [
|
|
"Sunday",
|
|
"Monday",
|
|
"Tuesday",
|
|
"Wednesday",
|
|
"Thursday",
|
|
"Friday",
|
|
"Saturday"
|
|
]
|
|
},
|
|
"auto": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/CommonScheduleInstruction"
|
|
}
|
|
]
|
|
},
|
|
"date-interval": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/CommonScheduleInstruction"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/CustomEventScheduleInstruction"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"duration": {
|
|
"type": "integer",
|
|
"description": "The number of the units",
|
|
"minimum": 1
|
|
},
|
|
"unit": {
|
|
"$ref": "#/components/schemas/TimeUnit"
|
|
}
|
|
},
|
|
"required": [
|
|
"duration",
|
|
"unit"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"day-of-month": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/CommonScheduleInstruction"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/CustomEventScheduleInstruction"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"day": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 31,
|
|
"description": "The day of the month when event will be scheduled.\nBe aware if the month has less days,\nthe last day of the month will be selected.\n"
|
|
},
|
|
"time": {
|
|
"$ref": "#/components/schemas/Time"
|
|
}
|
|
},
|
|
"required": [
|
|
"day"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"day-of-week": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/CommonScheduleInstruction"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/CustomEventScheduleInstruction"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"day": {
|
|
"$ref": "#/components/schemas/DayOfWeek"
|
|
},
|
|
"week": {
|
|
"type": "string",
|
|
"default": "next",
|
|
"enum": [
|
|
"next",
|
|
"first-in-month",
|
|
"last-in-month"
|
|
]
|
|
},
|
|
"time": {
|
|
"$ref": "#/components/schemas/Time"
|
|
}
|
|
},
|
|
"required": [
|
|
"day"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"immediately": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/CommonScheduleInstruction"
|
|
}
|
|
]
|
|
},
|
|
"Time": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"pattern": "^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](Z(\\+|\\-)([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9])?$"
|
|
},
|
|
"TimeUnit": {
|
|
"type": "string",
|
|
"enum": [
|
|
"second",
|
|
"seconds",
|
|
"minute",
|
|
"minutes",
|
|
"hour",
|
|
"hours",
|
|
"day",
|
|
"days",
|
|
"month",
|
|
"months",
|
|
"year",
|
|
"years"
|
|
]
|
|
},
|
|
"ServerTimestamp": {
|
|
"type": "string",
|
|
"description": "Read-only timestamp, automatically assigned on back-end.",
|
|
"format": "date-time",
|
|
"readOnly": true
|
|
},
|
|
"Session": {
|
|
"type": "object",
|
|
"required": [
|
|
"permissions"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "The session identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"token": {
|
|
"description": "The session's token used for authentication",
|
|
"type": "string"
|
|
},
|
|
"permissions": {
|
|
"description": "The session's permissions. See the format in example",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/UserPermissions"
|
|
}
|
|
]
|
|
},
|
|
"userId": {
|
|
"description": "The user identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"createdTime": {
|
|
"description": "Session created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "Session updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"expiredTime": {
|
|
"description": "Session expired time. Defaults to one hour",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"ShippingZone": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "The shipping zone identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"name": {
|
|
"description": "The shipping zone name",
|
|
"type": "string",
|
|
"maxLength": 255
|
|
},
|
|
"countries": {
|
|
"description": "Countries covered by the shipping zone. A country can only belong to one shipping zone (no overlapping).\nThis property can be empty or null to create a default shipping zone for countries that were not specified in other zones.\n",
|
|
"type": "array",
|
|
"items": {
|
|
"description": "Country ISO Alpha-2 code",
|
|
"type": "string",
|
|
"pattern": "^[A-Z]{2}$"
|
|
}
|
|
},
|
|
"rates": {
|
|
"description": "Price-based shipping rate instructions",
|
|
"type": "array",
|
|
"items": {
|
|
"description": "Price based shipping rate instruction",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PriceBasedShippingRate"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"isDefault": {
|
|
"description": "Is this Shipping Zone default",
|
|
"readOnly": true
|
|
},
|
|
"createdTime": {
|
|
"description": "The shipping zone created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "The shipping zone updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Signin": {
|
|
"type": "object",
|
|
"required": [
|
|
"email",
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"description": "Email",
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"description": "Password",
|
|
"type": "string",
|
|
"format": "password"
|
|
},
|
|
"expiredTime": {
|
|
"description": "Session expired time. Defaults to one hour",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
}
|
|
},
|
|
"Signup": {
|
|
"type": "object",
|
|
"required": [
|
|
"email",
|
|
"company",
|
|
"firstName",
|
|
"lastName",
|
|
"businessPhone",
|
|
"password",
|
|
"website"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"description": "The user email",
|
|
"type": "string",
|
|
"format": "email",
|
|
"maxLength": 100
|
|
},
|
|
"company": {
|
|
"description": "The user's company name",
|
|
"type": "string"
|
|
},
|
|
"firstName": {
|
|
"description": "The user first name",
|
|
"type": "string"
|
|
},
|
|
"lastName": {
|
|
"description": "The user last name",
|
|
"type": "string"
|
|
},
|
|
"businessPhone": {
|
|
"description": "The user business phone number",
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"description": "The user password",
|
|
"type": "string",
|
|
"format": "password"
|
|
},
|
|
"website": {
|
|
"description": "The user's website address",
|
|
"type": "string"
|
|
},
|
|
"currencies": {
|
|
"description": "An array of currencies codes",
|
|
"type": "array",
|
|
"default": [
|
|
"USD"
|
|
],
|
|
"items": {
|
|
"description": "3 letters ISO 4217 currency code",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"merchantCategoryCode": {
|
|
"description": "Merchant category code. Defaults to \"Computer Software Stores\"",
|
|
"type": "integer",
|
|
"default": 5734
|
|
}
|
|
}
|
|
},
|
|
"Status": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"description": "The API status. If everything is ok - value is 'ok'",
|
|
"type": "string",
|
|
"readOnly": true,
|
|
"enum": [
|
|
"ok"
|
|
]
|
|
},
|
|
"time": {
|
|
"description": "Current time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"Subscription": {
|
|
"type": "object",
|
|
"required": [
|
|
"customerId",
|
|
"planId",
|
|
"websiteId"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "The Subscription identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"customerId": {
|
|
"description": "Unique id for each customer",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"planId": {
|
|
"description": "Unique id for each plan",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"websiteId": {
|
|
"description": "Unique id for each website",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"initialInvoiceId": {
|
|
"description": "Unique id for the initial invoice",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"deliveryAddress": {
|
|
"description": "Delivery address",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ContactObject"
|
|
}
|
|
]
|
|
},
|
|
"billingAddress": {
|
|
"description": "Billing address",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ContactObject"
|
|
}
|
|
]
|
|
},
|
|
"status": {
|
|
"description": "Subscription status",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"quantity": {
|
|
"description": "Quantity for each subscription. Default value to 1",
|
|
"type": "integer"
|
|
},
|
|
"autopay": {
|
|
"description": "Autopay determines if a payment attempt will be automatic",
|
|
"type": "boolean",
|
|
"default": true
|
|
},
|
|
"inTrial": {
|
|
"description": "True if the subscription is currently in a trial period",
|
|
"type": "boolean",
|
|
"readOnly": true
|
|
},
|
|
"rebillNumber": {
|
|
"description": "The current period number",
|
|
"type": "integer",
|
|
"readOnly": true
|
|
},
|
|
"canceledBy": {
|
|
"description": "Canceled by",
|
|
"type": "string",
|
|
"readOnly": true,
|
|
"enum": [
|
|
"merchant",
|
|
"customer",
|
|
"rebilly"
|
|
]
|
|
},
|
|
"cancelCategory": {
|
|
"description": "Cancel category",
|
|
"type": "string",
|
|
"readOnly": true,
|
|
"enum": [
|
|
"billing-failure",
|
|
"did-not-use",
|
|
"did-not-want",
|
|
"missing-features",
|
|
"bugs-or-problems",
|
|
"do-not-remember",
|
|
"risk-warning",
|
|
"contract-expired",
|
|
"too-expensive",
|
|
"never-started",
|
|
"switched-plan",
|
|
"other"
|
|
]
|
|
},
|
|
"cancelDescription": {
|
|
"description": "Cancel reason description in free form",
|
|
"type": "string",
|
|
"readOnly": true,
|
|
"maxLength": 255
|
|
},
|
|
"riskMetadata": {
|
|
"description": "Risk metadata",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RiskMetadata"
|
|
}
|
|
]
|
|
},
|
|
"startTime": {
|
|
"description": "Subscription start time",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"activationTime": {
|
|
"description": "Subscription activation time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"endTime": {
|
|
"description": "Subscription end time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"renewalTime": {
|
|
"description": "Subscription renewal time",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"canceledTime": {
|
|
"description": "Subscription canceled time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"createdTime": {
|
|
"description": "Subscription created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "Subscription updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"customFields": {
|
|
"$ref": "#/components/schemas/ResourceCustomFields"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 6,
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/CustomerLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PlanLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/WebsiteLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/BillingContactLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/DeliveryContactLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/LeadSourceLink"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"SubscriptionCancel": {
|
|
"type": "object",
|
|
"required": [
|
|
"policy",
|
|
"canceledBy",
|
|
"cancelCategory"
|
|
],
|
|
"properties": {
|
|
"policy": {
|
|
"description": "Cancel policy",
|
|
"type": "string",
|
|
"enum": [
|
|
"at-next-renewal",
|
|
"now-with-prorata-credit",
|
|
"now"
|
|
]
|
|
},
|
|
"canceledBy": {
|
|
"description": "Canceled by",
|
|
"type": "string",
|
|
"enum": [
|
|
"merchant",
|
|
"customer"
|
|
]
|
|
},
|
|
"cancelCategory": {
|
|
"description": "Cancel category",
|
|
"type": "string",
|
|
"enum": [
|
|
"did-not-use",
|
|
"did-not-want",
|
|
"missing-features",
|
|
"bugs-or-problems",
|
|
"do-not-remember",
|
|
"risk-warning",
|
|
"contract-expired",
|
|
"too-expensive",
|
|
"other"
|
|
]
|
|
},
|
|
"cancelDescription": {
|
|
"description": "Cancel reason description in free form",
|
|
"type": "string",
|
|
"maxLength": 255
|
|
}
|
|
}
|
|
},
|
|
"SubscriptionSwitch": {
|
|
"type": "object",
|
|
"required": [
|
|
"planId",
|
|
"policy"
|
|
],
|
|
"properties": {
|
|
"planId": {
|
|
"description": "The plan identifier string",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"policy": {
|
|
"description": "Switch policy",
|
|
"type": "string",
|
|
"enum": [
|
|
"at-next-renewal",
|
|
"now-with-prorata-credit",
|
|
"now"
|
|
]
|
|
},
|
|
"websiteId": {
|
|
"description": "The website's ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"quantity": {
|
|
"description": "Quantity for each subscription. Default value to 1",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"TaxCategory": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "The tax category identifier string",
|
|
"type": "string",
|
|
"readOnly": true,
|
|
"maxLength": 50,
|
|
"enum": [
|
|
99999,
|
|
20010,
|
|
40030,
|
|
51020,
|
|
51010,
|
|
31000,
|
|
30070
|
|
]
|
|
},
|
|
"description": {
|
|
"description": "The tax category description",
|
|
"type": "string",
|
|
"maxLength": 512
|
|
},
|
|
"taxProvider": {
|
|
"description": "The tax category maps to a provider",
|
|
"type": "string",
|
|
"enum": [
|
|
"tax-jar"
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"ThreeDSecure": {
|
|
"type": "object",
|
|
"required": [
|
|
"enrolled",
|
|
"enrollmentEci",
|
|
"customerId",
|
|
"gatewayAccountId",
|
|
"paymentCardId",
|
|
"websiteId",
|
|
"currency",
|
|
"amount"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "The 3D Secure entry identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"customerId": {
|
|
"description": "Related customer ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"gatewayAccountId": {
|
|
"description": "Related gateway account ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"paymentCardId": {
|
|
"description": "Related payment card ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"websiteId": {
|
|
"description": "Related Website ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"enrolled": {
|
|
"description": "Is the cardholder enrolled in 3DSecure",
|
|
"type": "string",
|
|
"enum": [
|
|
"Y",
|
|
"N",
|
|
"U"
|
|
]
|
|
},
|
|
"enrollmentEci": {
|
|
"description": "The 3D Secure entry enrollment eci",
|
|
"type": "string"
|
|
},
|
|
"eci": {
|
|
"description": "The 3D Secure entry electronic commerce indicator",
|
|
"type": "integer"
|
|
},
|
|
"cavv": {
|
|
"description": "The 3D Secure entry cardholder authentication verification value",
|
|
"type": "string"
|
|
},
|
|
"xid": {
|
|
"description": "The 3D Secure entry transaction Id",
|
|
"type": "string"
|
|
},
|
|
"payerAuthResponseStatus": {
|
|
"description": "The 3D Secure entry Auth Response Status",
|
|
"type": "string",
|
|
"enum": [
|
|
"Y",
|
|
"N",
|
|
"U",
|
|
"A"
|
|
]
|
|
},
|
|
"signatureVerification": {
|
|
"description": "If signature was verified",
|
|
"type": "string",
|
|
"enum": [
|
|
"Y",
|
|
"N"
|
|
]
|
|
},
|
|
"amount": {
|
|
"description": "Transaction amount",
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"currency": {
|
|
"description": "The currency three letter code",
|
|
"type": "string"
|
|
},
|
|
"createdTime": {
|
|
"description": "The 3D Secure entry created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"ApiTracking": {
|
|
"type": "object",
|
|
"description": "Tracking API Requests.",
|
|
"readOnly": true,
|
|
"properties": {
|
|
"id": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"description": "HTTP response code"
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"description": "API request address"
|
|
},
|
|
"method": {
|
|
"type": "string",
|
|
"description": "HTTP method",
|
|
"enum": [
|
|
"HEAD",
|
|
"GET",
|
|
"POST",
|
|
"PUT",
|
|
"DELETE",
|
|
"PATCH"
|
|
]
|
|
},
|
|
"request": {
|
|
"type": "string",
|
|
"description": "Request JSON-string"
|
|
},
|
|
"response": {
|
|
"type": "string",
|
|
"description": "Response JSON-string"
|
|
},
|
|
"requestHeaders": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"example": {
|
|
"User-Agent": "Mozilla/5.0",
|
|
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
|
|
}
|
|
},
|
|
"responseHeaders": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"example": {
|
|
"Rate-Limit-Limit": 5000,
|
|
"Rate-Limit-Remaining": 4999,
|
|
"Rate-Limit-Reset": "Mon, 31 Jul 2017 04:16:00 +0000"
|
|
}
|
|
},
|
|
"user": {
|
|
"type": "object",
|
|
"description": "The user who has made a request",
|
|
"readOnly": true,
|
|
"properties": {
|
|
"userId": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"apiKeyId": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"email": {
|
|
"description": "The user email",
|
|
"type": "string",
|
|
"format": "email"
|
|
},
|
|
"firstName": {
|
|
"description": "The user first name",
|
|
"type": "string"
|
|
},
|
|
"lastName": {
|
|
"description": "The user last name",
|
|
"type": "string"
|
|
},
|
|
"ipAddress": {
|
|
"type": "string",
|
|
"description": "Client IP address",
|
|
"format": "ipv4"
|
|
},
|
|
"userAgent": {
|
|
"description": "The software that is acting on behalf of a user",
|
|
"type": "string"
|
|
},
|
|
"fingerprint": {
|
|
"description": "The user device fingerprint hash",
|
|
"type": "string"
|
|
},
|
|
"isSupport": {
|
|
"description": "If user from support",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"duration": {
|
|
"type": "integer",
|
|
"description": "Request duration in milliseconds"
|
|
},
|
|
"createdTime": {
|
|
"description": "The log created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"SubscriptionTracking": {
|
|
"type": "object",
|
|
"description": "Tracking subscription log",
|
|
"readOnly": true,
|
|
"properties": {
|
|
"id": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"subscriptionId": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"invoiceItemId": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"result": {
|
|
"type": "string",
|
|
"description": "Subscription's result",
|
|
"enum": [
|
|
"created",
|
|
"postponed",
|
|
"stopped",
|
|
"error"
|
|
]
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "It contains the transaction number and renewal time"
|
|
},
|
|
"createdTime": {
|
|
"description": "The log created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"WebhookTracking": {
|
|
"type": "object",
|
|
"description": "Webhook Tracking Requests.",
|
|
"readOnly": true,
|
|
"properties": {
|
|
"id": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"eventType": {
|
|
"$ref": "#/components/schemas/EventType"
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"description": "Url where webhook was sent"
|
|
},
|
|
"method": {
|
|
"type": "string",
|
|
"description": "HTTP method which was used to send webhook",
|
|
"example": "POST"
|
|
},
|
|
"headers": {
|
|
"type": "object",
|
|
"description": "HTTP headers which were used to send webhook",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"example": {
|
|
"My-Header": "Cool-Value"
|
|
}
|
|
},
|
|
"responseCode": {
|
|
"type": "integer",
|
|
"description": "HTTP code response"
|
|
},
|
|
"responseBody": {
|
|
"type": "string",
|
|
"description": "Response body received"
|
|
},
|
|
"payload": {
|
|
"type": "object",
|
|
"description": "Event's data information"
|
|
},
|
|
"sentTime": {
|
|
"description": "Sent time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"initiatedTime": {
|
|
"description": "Initiated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"createdTime": {
|
|
"description": "The log created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"WebsiteWebhookTracking": {
|
|
"type": "object",
|
|
"description": "Webhook Tracking Requests.",
|
|
"readOnly": true,
|
|
"properties": {
|
|
"id": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"websiteId": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"eventName": {
|
|
"type": "string",
|
|
"description": "Event name for which webhook was called"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "Event's status",
|
|
"enum": [
|
|
"fail",
|
|
"success"
|
|
]
|
|
},
|
|
"response": {
|
|
"type": "integer",
|
|
"description": "HTTP code response"
|
|
},
|
|
"pushData": {
|
|
"type": "string",
|
|
"description": "Event's data information JSON-string"
|
|
},
|
|
"sentTime": {
|
|
"description": "Sent time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"nextSendTime": {
|
|
"description": "Next send time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"createdTime": {
|
|
"description": "The log created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"TransactionGatewayLog": {
|
|
"type": "object",
|
|
"readOnly": true,
|
|
"properties": {
|
|
"headers": {
|
|
"description": "The request headers",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"url": {
|
|
"description": "The request URL",
|
|
"type": "string"
|
|
},
|
|
"request": {
|
|
"description": "The request body",
|
|
"type": "string"
|
|
},
|
|
"response": {
|
|
"description": "The response body",
|
|
"type": "string"
|
|
},
|
|
"duration": {
|
|
"description": "The request time, msec",
|
|
"type": "integer"
|
|
},
|
|
"createdTime": {
|
|
"description": "The log entry created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/TransactionLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"TransactionRefund": {
|
|
"type": "object",
|
|
"required": [
|
|
"amount"
|
|
],
|
|
"properties": {
|
|
"amount": {
|
|
"description": "Refund amount",
|
|
"type": "number",
|
|
"format": "double"
|
|
}
|
|
}
|
|
},
|
|
"RedirectUrls": {
|
|
"type": "object",
|
|
"description": "The redirect URIs",
|
|
"required": [
|
|
"error",
|
|
"success",
|
|
"decline",
|
|
"cancel"
|
|
],
|
|
"properties": {
|
|
"error": {
|
|
"type": "string",
|
|
"format": "url"
|
|
},
|
|
"success": {
|
|
"type": "string",
|
|
"format": "url"
|
|
},
|
|
"decline": {
|
|
"type": "string",
|
|
"format": "url"
|
|
},
|
|
"cancel": {
|
|
"type": "string",
|
|
"format": "url"
|
|
}
|
|
}
|
|
},
|
|
"ThreeDSecureResult": {
|
|
"type": "object",
|
|
"readOnly": true,
|
|
"required": [
|
|
"enrolled",
|
|
"authenticated",
|
|
"liability"
|
|
],
|
|
"properties": {
|
|
"enrolled": {
|
|
"description": "Is the cardholder enrolled in 3D Secure",
|
|
"type": "string",
|
|
"enum": [
|
|
"yes",
|
|
"no",
|
|
"invalid card/timeout",
|
|
"unavailable"
|
|
]
|
|
},
|
|
"authenticated": {
|
|
"description": "The 3D Secure entry Auth Response Status",
|
|
"type": "string",
|
|
"enum": [
|
|
"yes",
|
|
"no",
|
|
"not applicable",
|
|
"attempted"
|
|
]
|
|
},
|
|
"liability": {
|
|
"type": "string",
|
|
"enum": [
|
|
"protected",
|
|
"not protected",
|
|
"protected (attempt)"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"Transaction": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"description": "The transaction identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"type": {
|
|
"description": "Transaction type",
|
|
"type": "string",
|
|
"readOnly": true,
|
|
"enum": [
|
|
"authorize",
|
|
"capture",
|
|
"credit",
|
|
"refund",
|
|
"sale",
|
|
"void"
|
|
]
|
|
},
|
|
"status": {
|
|
"description": "Transaction status",
|
|
"type": "string",
|
|
"readOnly": true,
|
|
"enum": [
|
|
"completed",
|
|
"connection-error",
|
|
"never-sent",
|
|
"pending",
|
|
"sending",
|
|
"suspended",
|
|
"timeout",
|
|
"waiting-capture",
|
|
"waiting-refund"
|
|
]
|
|
},
|
|
"result": {
|
|
"description": "Transaction result",
|
|
"type": "string",
|
|
"readOnly": true,
|
|
"enum": [
|
|
"approved",
|
|
"canceled",
|
|
"declined",
|
|
"unknown"
|
|
]
|
|
},
|
|
"amount": {
|
|
"description": "The transactions's amount",
|
|
"type": "number",
|
|
"format": "double",
|
|
"readOnly": true
|
|
},
|
|
"currency": {
|
|
"description": "The transactions's currency",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"parentTransactionId": {
|
|
"description": "The transactions's parent ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
],
|
|
"readOnly": true
|
|
},
|
|
"childTransactions": {
|
|
"description": "The child transaction IDs",
|
|
"readOnly": true,
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
},
|
|
"invoiceIds": {
|
|
"description": "The invoice IDs related to transaction",
|
|
"readOnly": true,
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
},
|
|
"subscriptionIds": {
|
|
"description": "The subscription IDs related to transaction",
|
|
"readOnly": true,
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
},
|
|
"isRebill": {
|
|
"type": "boolean",
|
|
"readOnly": true
|
|
},
|
|
"rebillNumber": {
|
|
"description": "The transactions's rebill number",
|
|
"type": "integer",
|
|
"readOnly": true
|
|
},
|
|
"gatewayAccountId": {
|
|
"description": "The transactions's Gateway Account ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
],
|
|
"readOnly": true
|
|
},
|
|
"gatewayTransactionId": {
|
|
"description": "The gateway's transaction ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
],
|
|
"readOnly": true
|
|
},
|
|
"gateway": {
|
|
"type": "object",
|
|
"description": "The related gateway information",
|
|
"readOnly": true,
|
|
"properties": {
|
|
"response": {
|
|
"description": "The gateway's response",
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"description": "The gateway's response code",
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"description": "The gateway's response message",
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"description": "The gateway's response type",
|
|
"type": "string"
|
|
},
|
|
"originalCode": {
|
|
"description": "The raw, unmapped gateway's response code",
|
|
"type": "string"
|
|
},
|
|
"originalMessage": {
|
|
"description": "The raw, unmapped gateway's response message",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"avsResponse": {
|
|
"description": "The AVS gateway's response",
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"description": "The raw response code",
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"description": "The raw response message",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"cvvResponse": {
|
|
"description": "The CVV gateway's response",
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"description": "The raw response code",
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"description": "The raw response message",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"gatewayName": {
|
|
"description": "Payment Gateway name, available only when transaction use gateway, else null",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"acquirerName": {
|
|
"description": "Acquirer name, available only when transaction use gateway, else null",
|
|
"type": "string",
|
|
"readOnly": true
|
|
},
|
|
"websiteId": {
|
|
"description": "Website's ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
],
|
|
"readOnly": true
|
|
},
|
|
"customerId": {
|
|
"description": "Customer's ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
],
|
|
"readOnly": true
|
|
},
|
|
"method": {
|
|
"description": "Payment Method",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Method"
|
|
}
|
|
]
|
|
},
|
|
"velocity": {
|
|
"description": "The number of transactions by the same customer in the past 24 hours",
|
|
"type": "number",
|
|
"format": "integer"
|
|
},
|
|
"bin": {
|
|
"description": "Payment Card BIN",
|
|
"type": "string",
|
|
"format": "bin",
|
|
"readOnly": true
|
|
},
|
|
"paymentInstrument": {
|
|
"$ref": "#/components/schemas/PaymentInstrument"
|
|
},
|
|
"billingAddress": {
|
|
"description": "Billing Address",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ContactObject"
|
|
}
|
|
]
|
|
},
|
|
"has3ds": {
|
|
"type": "boolean",
|
|
"readOnly": true
|
|
},
|
|
"3ds": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ThreeDSecureResult"
|
|
}
|
|
]
|
|
},
|
|
"hasDcc": {
|
|
"description": "True if transaction has Dynamic Currency Conversion applied",
|
|
"type": "boolean",
|
|
"readOnly": true
|
|
},
|
|
"dcc": {
|
|
"description": "Dynamic Currency Conversion detailed information. Null if hasDcc is false",
|
|
"type": "object",
|
|
"readOnly": true,
|
|
"properties": {
|
|
"base": {
|
|
"type": "object",
|
|
"description": "Initial amount and currency to convert from",
|
|
"properties": {
|
|
"amount": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"quote": {
|
|
"type": "object",
|
|
"description": "Suggested amount and currency to convert to",
|
|
"properties": {
|
|
"amount": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"usdMarkup": {
|
|
"description": "The amount of markup translated to USD",
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"outcome": {
|
|
"type": "string",
|
|
"description": "Dynamic Currency Conversion outcome",
|
|
"enum": [
|
|
"rejected",
|
|
"selected",
|
|
"unknown"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"riskScore": {
|
|
"description": "The transactions's risk score",
|
|
"type": "number",
|
|
"format": "integer",
|
|
"readOnly": true
|
|
},
|
|
"riskMetadata": {
|
|
"description": "Risk metadata",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/RiskMetadata"
|
|
}
|
|
]
|
|
},
|
|
"redirectUrls": {
|
|
"$ref": "#/components/schemas/RedirectUrls"
|
|
},
|
|
"retryInstruction": {
|
|
"$ref": "#/components/schemas/PaymentRetry"
|
|
},
|
|
"retryNumber": {
|
|
"type": "integer",
|
|
"readOnly": true,
|
|
"description": "The position in the sequence of retries"
|
|
},
|
|
"retriedTransactionId": {
|
|
"readOnly": true,
|
|
"description": "The retried transaction ID",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "The payment description",
|
|
"maxLength": 255
|
|
},
|
|
"isDisputed": {
|
|
"description": "True if transaction is disputed",
|
|
"type": "boolean",
|
|
"readOnly": true
|
|
},
|
|
"customFields": {
|
|
"$ref": "#/components/schemas/ResourceCustomFields"
|
|
},
|
|
"scheduledTime": {
|
|
"type": "string",
|
|
"description": "The time the transaction is scheduled for collection",
|
|
"format": "date-time"
|
|
},
|
|
"processedTime": {
|
|
"description": "Transaction processed time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"createdTime": {
|
|
"description": "Transaction created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "Transaction updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 13,
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/GatewayAccountLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/CustomerLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/WebsiteLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/PaymentCardLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/ParentTransactionLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/RetriedTransactionLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/BillingContactLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/LeadSourceLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/ApprovalUrlLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/CancelUrlLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/RefundUrlLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/DisputeLink"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"UpdatePassword": {
|
|
"type": "object",
|
|
"properties": {
|
|
"currentPassword": {
|
|
"description": "Current user's password - used when requesting password change",
|
|
"type": "string",
|
|
"format": "password"
|
|
},
|
|
"newPassword": {
|
|
"description": "New user's password - used when requesting password change",
|
|
"type": "string",
|
|
"format": "password"
|
|
}
|
|
}
|
|
},
|
|
"User": {
|
|
"type": "object",
|
|
"required": [
|
|
"email",
|
|
"firstName",
|
|
"lastName"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "The user identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"email": {
|
|
"description": "The user email",
|
|
"type": "string",
|
|
"format": "email",
|
|
"maxLength": 100
|
|
},
|
|
"firstName": {
|
|
"description": "User's first name",
|
|
"type": "string"
|
|
},
|
|
"lastName": {
|
|
"description": "User's last name",
|
|
"type": "string"
|
|
},
|
|
"businessPhone": {
|
|
"description": "The user business phone number",
|
|
"type": "string"
|
|
},
|
|
"mobilePhone": {
|
|
"description": "The user mobile phone number",
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"description": "User's password. If not provided, password reset email will be sent",
|
|
"type": "string",
|
|
"format": "password"
|
|
},
|
|
"permissions": {
|
|
"description": "The user's permissions. See the format in example",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/UserPermissions"
|
|
}
|
|
]
|
|
},
|
|
"createdTime": {
|
|
"description": "The user created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "The user updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"loginTime": {
|
|
"description": "The user last login time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"reportingCurrency": {
|
|
"description": "The user's ISO Alpha-3 code used for reports",
|
|
"type": "string"
|
|
},
|
|
"availableCurrencies": {
|
|
"type": "array",
|
|
"description": "An array of reporting currencies enabled for the merchant",
|
|
"readOnly": true,
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"totpRequired": {
|
|
"description": "The user setting of two-factor authentification",
|
|
"type": "boolean"
|
|
},
|
|
"totpSecret": {
|
|
"description": "The user TOTP key for authentification app (if TOTP enabled)",
|
|
"type": "string"
|
|
},
|
|
"totpUrl": {
|
|
"description": "The user link to QR-code for TOTP authentification app (if TOTP enabled)",
|
|
"type": "string",
|
|
"format": "url"
|
|
},
|
|
"status": {
|
|
"description": "The user status",
|
|
"type": "string",
|
|
"enum": [
|
|
"active",
|
|
"inactive",
|
|
"pending-confirmation"
|
|
],
|
|
"readOnly": true
|
|
},
|
|
"country": {
|
|
"description": "The user country setting - two letter code",
|
|
"type": "string"
|
|
},
|
|
"preferences": {
|
|
"description": "User preferences like timezone, language and many more. This is an object with custom properties.",
|
|
"type": "object"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 1,
|
|
"items": {
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"UserPermissions": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"resourceName": {
|
|
"type": "string",
|
|
"enum": [
|
|
"3dsecure",
|
|
"api-keys",
|
|
"api-tracking",
|
|
"authentication-options",
|
|
"authentication-tokens",
|
|
"bank-accounts",
|
|
"blacklists",
|
|
"checkout-pages",
|
|
"contacts",
|
|
"coupons",
|
|
"coupons-redemptions",
|
|
"credentials",
|
|
"custom-events",
|
|
"custom-fields",
|
|
"customers",
|
|
"disputes",
|
|
"events",
|
|
"gateway-accounts",
|
|
"invoices",
|
|
"layouts",
|
|
"lead-sources",
|
|
"lists",
|
|
"matched-rules",
|
|
"notes",
|
|
"oct-batch",
|
|
"organizations",
|
|
"password-tokens",
|
|
"payments",
|
|
"payment-cards",
|
|
"payment-cards-migrations",
|
|
"paypal-accounts",
|
|
"plans",
|
|
"reports",
|
|
"reset-sandbox",
|
|
"rulesets",
|
|
"sessions",
|
|
"subscriptions",
|
|
"subscription-tracking",
|
|
"tokens",
|
|
"transactions",
|
|
"users",
|
|
"webhook",
|
|
"webhook-tracking",
|
|
"websites"
|
|
]
|
|
},
|
|
"methods": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"HEAD",
|
|
"GET",
|
|
"POST",
|
|
"PUT",
|
|
"DELETE",
|
|
"PATCH"
|
|
]
|
|
}
|
|
},
|
|
"resourceIds": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"example": [
|
|
{
|
|
"resourceName": "plans",
|
|
"methods": [
|
|
"GET",
|
|
"POST",
|
|
"PUT",
|
|
"HEAD",
|
|
"DELETE"
|
|
]
|
|
},
|
|
{
|
|
"resourceName": "invoices",
|
|
"methods": [
|
|
"GET",
|
|
"HEAD"
|
|
],
|
|
"resourceIds": [
|
|
"4f6cf35x-2c4y-483z-a0a9-158621f77a21",
|
|
"1586f35x-4f6c-483z-a0a9-2c4y21f77a21"
|
|
]
|
|
},
|
|
{
|
|
"resourceName": null,
|
|
"methods": null,
|
|
"resourceIds": null
|
|
}
|
|
]
|
|
},
|
|
"WebhookAuthorization": {
|
|
"type": "object",
|
|
"discriminator": {
|
|
"propertyName": "type"
|
|
},
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "The authorization type",
|
|
"enum": [
|
|
"none",
|
|
"basic",
|
|
"digest",
|
|
"oauth1"
|
|
],
|
|
"default": "none"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
]
|
|
},
|
|
"basic": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/WebhookAuthorization"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"username": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"username",
|
|
"password"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"digest": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/WebhookAuthorization"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"username": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"format": "password"
|
|
}
|
|
},
|
|
"required": [
|
|
"username",
|
|
"password"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"oauth1": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/WebhookAuthorization"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"consumerKey": {
|
|
"type": "string"
|
|
},
|
|
"consumerSecret": {
|
|
"type": "string"
|
|
},
|
|
"token": {
|
|
"type": "string"
|
|
},
|
|
"tokenSecret": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"consumerKey",
|
|
"consumerSecret",
|
|
"token",
|
|
"tokenSecret"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"WebhookCredential": {
|
|
"type": "object",
|
|
"description": "Webhook credential",
|
|
"properties": {
|
|
"hash": {
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"host": {
|
|
"type": "string",
|
|
"description": "The host name"
|
|
},
|
|
"auth": {
|
|
"$ref": "#/components/schemas/WebhookAuthorization"
|
|
}
|
|
},
|
|
"required": [
|
|
"host"
|
|
]
|
|
},
|
|
"Website": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"url",
|
|
"servicePhone",
|
|
"serviceEmail"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"description": "The website identifier string",
|
|
"readOnly": true,
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ResourceId"
|
|
}
|
|
]
|
|
},
|
|
"name": {
|
|
"description": "The website's name",
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"description": "The website's domain address",
|
|
"type": "string"
|
|
},
|
|
"servicePhone": {
|
|
"description": "The website's customer service phone number",
|
|
"type": "string"
|
|
},
|
|
"serviceEmail": {
|
|
"description": "The website's customer service email address",
|
|
"type": "string",
|
|
"format": "email"
|
|
},
|
|
"checkoutPageUri": {
|
|
"description": "Your own custom URI for this Checkout Page",
|
|
"type": "string"
|
|
},
|
|
"createdTime": {
|
|
"description": "Website created time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"updatedTime": {
|
|
"description": "Website updated time",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ServerTimestamp"
|
|
}
|
|
]
|
|
},
|
|
"customFields": {
|
|
"$ref": "#/components/schemas/ResourceCustomFields"
|
|
},
|
|
"_links": {
|
|
"type": "array",
|
|
"description": "The links related to resource",
|
|
"readOnly": true,
|
|
"minItems": 1,
|
|
"maxItems": 2,
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SelfLink"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/NotesLink"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"WebsiteWebhook": {
|
|
"type": "object",
|
|
"required": [
|
|
"webHookUrl",
|
|
"webHookUsername",
|
|
"webHookPassword"
|
|
],
|
|
"properties": {
|
|
"webHookUrl": {
|
|
"description": "Webhook Url",
|
|
"type": "string"
|
|
},
|
|
"webHookUsername": {
|
|
"description": "Webhook HTTP Authentication Username",
|
|
"type": "string"
|
|
},
|
|
"webHookPassword": {
|
|
"description": "Webhook HTTP Authentication Password. An empty string will be returned in the response",
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"AccessForbidden": {
|
|
"description": "Access forbidden, invalid API-KEY was used",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"NotFound": {
|
|
"description": "Resource was not found",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Conflict": {
|
|
"description": "Conflict",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"InvalidDataError": {
|
|
"description": "Invalid data was sent",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvalidError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": {
|
|
"resourceId": {
|
|
"name": "id",
|
|
"in": "path",
|
|
"description": "The resource identifier string",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"collectionLimit": {
|
|
"name": "limit",
|
|
"in": "query",
|
|
"description": "The collection items limit",
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 1000
|
|
}
|
|
},
|
|
"collectionOffset": {
|
|
"name": "offset",
|
|
"in": "query",
|
|
"description": "The collection items offset",
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
},
|
|
"collectionFilter": {
|
|
"name": "filter",
|
|
"in": "query",
|
|
"description": "The collection items filter requires a special format.\nUse \",\" for multiple allowed values. Use \";\" for multiple fields.\nSee the filter guide for more options and examples about this format.\n",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"collectionQuery": {
|
|
"name": "q",
|
|
"in": "query",
|
|
"description": "The partial search of the text fields.",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"collectionCriteria": {
|
|
"name": "criteria",
|
|
"in": "query",
|
|
"description": "The json criteria for collection",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"collectionSort": {
|
|
"name": "sort",
|
|
"in": "query",
|
|
"description": "The collection items sort field and order (prefix with \"-\" for descending sort).",
|
|
"style": "form",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"collectionFields": {
|
|
"name": "fields",
|
|
"in": "query",
|
|
"description": "Limit the returned fields to the list specified, separated by comma. Note that id is always returned.",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"collectionExpand": {
|
|
"name": "expand",
|
|
"in": "query",
|
|
"description": "Expand response to get full related object intead of ID. See the expand guide for more info.",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"systemEventType": {
|
|
"name": "eventType",
|
|
"in": "path",
|
|
"description": "The event type",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"rulesVersion": {
|
|
"name": "version",
|
|
"in": "path",
|
|
"required": true,
|
|
"description": "The rule set version. Expand response to get full related object instead of ID. See the expand guide for more info.",
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
}
|
|
},
|
|
"hash": {
|
|
"name": "hash",
|
|
"in": "path",
|
|
"description": "The token identifier string",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"mediaType": {
|
|
"name": "Accept",
|
|
"in": "header",
|
|
"description": "The response media type",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"application/json"
|
|
],
|
|
"default": "application/json"
|
|
}
|
|
}
|
|
},
|
|
"requestBodies": {
|
|
"ApiKey": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ApiKey"
|
|
}
|
|
}
|
|
},
|
|
"description": "ApiKey resource",
|
|
"required": true
|
|
},
|
|
"Attachment": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Attachment"
|
|
}
|
|
}
|
|
},
|
|
"description": "Attachment resource",
|
|
"required": true
|
|
},
|
|
"BankAccount": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BankAccount"
|
|
}
|
|
}
|
|
},
|
|
"description": "BankAccount resource",
|
|
"required": true
|
|
},
|
|
"Blacklist": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Blacklist"
|
|
}
|
|
}
|
|
},
|
|
"description": "Blacklist resource",
|
|
"required": true
|
|
},
|
|
"CheckoutPage": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CheckoutPage"
|
|
}
|
|
}
|
|
},
|
|
"description": "Checkout Page resource",
|
|
"required": true
|
|
},
|
|
"Contact": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Contact"
|
|
}
|
|
}
|
|
},
|
|
"description": "Contact resource",
|
|
"required": true
|
|
},
|
|
"Coupon": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Coupon"
|
|
}
|
|
}
|
|
},
|
|
"description": "Coupon resource",
|
|
"required": true
|
|
},
|
|
"Credential": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Credential"
|
|
}
|
|
}
|
|
},
|
|
"description": "Credential resource",
|
|
"required": true
|
|
},
|
|
"CustomEvent": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CustomEvent"
|
|
}
|
|
}
|
|
},
|
|
"description": "Custom event resource",
|
|
"required": true
|
|
},
|
|
"RuleSet": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RuleSet"
|
|
}
|
|
}
|
|
},
|
|
"description": "Set of rules resource",
|
|
"required": true
|
|
},
|
|
"Customer": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Customer"
|
|
}
|
|
}
|
|
},
|
|
"description": "Customer resource",
|
|
"required": true
|
|
},
|
|
"LeadSource": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/LeadSource"
|
|
}
|
|
}
|
|
},
|
|
"description": "Lead Source resource",
|
|
"required": true
|
|
},
|
|
"Dispute": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Dispute"
|
|
}
|
|
}
|
|
},
|
|
"description": "Dispute resource",
|
|
"required": true
|
|
},
|
|
"GatewayAccount": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GatewayAccount"
|
|
}
|
|
}
|
|
},
|
|
"description": "Gateway Account resource",
|
|
"required": true
|
|
},
|
|
"Invoice": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Invoice"
|
|
}
|
|
}
|
|
},
|
|
"description": "Invoice resource",
|
|
"required": true
|
|
},
|
|
"Layout": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Layout"
|
|
}
|
|
}
|
|
},
|
|
"description": "Layout resource",
|
|
"required": true
|
|
},
|
|
"List": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/List"
|
|
}
|
|
}
|
|
},
|
|
"description": "List resource",
|
|
"required": true
|
|
},
|
|
"Note": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Note"
|
|
}
|
|
}
|
|
},
|
|
"description": "Note resource",
|
|
"required": true
|
|
},
|
|
"Organization": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Organization"
|
|
}
|
|
}
|
|
},
|
|
"description": "Organization resource",
|
|
"required": true
|
|
},
|
|
"Payment": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Payment"
|
|
}
|
|
}
|
|
},
|
|
"description": "Payment resource",
|
|
"required": true
|
|
},
|
|
"Plan": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Plan"
|
|
}
|
|
}
|
|
},
|
|
"description": "Plan resource",
|
|
"required": true
|
|
},
|
|
"GlobalWebhook": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GlobalWebhook"
|
|
}
|
|
}
|
|
},
|
|
"description": "Webhook resource",
|
|
"required": true
|
|
},
|
|
"Product": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Product"
|
|
}
|
|
}
|
|
},
|
|
"description": "Product resource",
|
|
"required": true
|
|
},
|
|
"UpdatePassword": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UpdatePassword"
|
|
}
|
|
}
|
|
},
|
|
"description": "currentPassword and newPassword",
|
|
"required": true
|
|
},
|
|
"Subscription": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Subscription"
|
|
}
|
|
}
|
|
},
|
|
"description": "Subscription resource",
|
|
"required": true
|
|
},
|
|
"PaymentToken": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PaymentToken"
|
|
}
|
|
}
|
|
},
|
|
"description": "PaymentToken resource",
|
|
"required": true
|
|
},
|
|
"User": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
},
|
|
"description": "User resource",
|
|
"required": true
|
|
},
|
|
"Website": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Website"
|
|
}
|
|
}
|
|
},
|
|
"description": "Website resource",
|
|
"required": true
|
|
}
|
|
},
|
|
"securitySchemes": {
|
|
"ApiKey": {
|
|
"description": "When you sign up for an account, you are given your first API key.\nTo do so please follow this link: https://www.rebilly.com/site/signup/\nAlso you can generate additional API keys, and delete API keys (as you may\nneed to rotate your keys in the future).\n",
|
|
"name": "REB-APIKEY",
|
|
"type": "apiKey",
|
|
"in": "header"
|
|
},
|
|
"JWT": {
|
|
"description": "You can create a JSON Web Token (JWT) via our Sessions resource.\n",
|
|
"type": "http",
|
|
"scheme": "basic"
|
|
},
|
|
"RebAuth": {
|
|
"description": "Only for the Tokens resource.\nThe REB-AUTH value is created in this way\nGenerate a Nonce (random string), and a Timestamp (unix timestamp)\nConcatenate the values of ApiUser, Nonce, and Timestamp (in that order).\nUse that value as the input data when you calculate the HMAC-SHA1 with your secret key, called the signature.\nForming the four data points into a JSON object.\n\n```json\n{\n \"REB-APIUSER\": \"abcdefg\",\n \"REB-NONCE\": \"adfsjtreitou345fgkdafgj\",\n \"REB-TIMESTAMP\": \"1382591345\",\n \"REB-SIGNATURE\": \"a234fc95460401cfg09c9d09\"\n}\n```\n\nThen base64 encode that JSON object. This is the final value of the REB-AUTH HTTP header\n",
|
|
"name": "REB-AUTH",
|
|
"type": "apiKey",
|
|
"in": "header"
|
|
}
|
|
}
|
|
}
|
|
}
|