Skip to content

Latest commit

 

History

History
140 lines (103 loc) · 7.35 KB

File metadata and controls

140 lines (103 loc) · 7.35 KB

DigitalWallets.Domains

Overview

Available Operations

  • create - Register a digital wallet domain
  • delete - Remove a digital wallet domain

create

Register a digital wallet domain (Apple Pay only).

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Gr4vy;

$sdk = Gr4vy\SDK::builder()
    ->setMerchantAccountId('default')
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();

$digitalWalletDomain = new Gr4vy\DigitalWalletDomain(
    domainName: 'example.com',
);

$response = $sdk->digitalWallets->domains->create(
    digitalWalletId: '1808f5e6-b49c-4db9-94fa-22371ea352f5',
    digitalWalletDomain: $digitalWalletDomain

);

if ($response->any !== null) {
    // handle response
}

Parameters

Parameter Type Required Description Example
digitalWalletId string ✔️ The ID of the digital wallet to remove a domain for. 1808f5e6-b49c-4db9-94fa-22371ea352f5
digitalWalletDomain DigitalWalletDomain ✔️ N/A
merchantAccountId ?string The ID of the merchant account to use for this request. default

Response

?RegisterDigitalWalletDomainResponse

Errors

Error Type Status Code Content Type
Errors\Error400 400 application/json
Errors\Error401 401 application/json
Errors\Error403 403 application/json
Errors\Error404 404 application/json
Errors\Error405 405 application/json
Errors\Error409 409 application/json
Errors\HTTPValidationError 422 application/json
Errors\Error425 425 application/json
Errors\Error429 429 application/json
Errors\Error500 500 application/json
Errors\Error502 502 application/json
Errors\Error504 504 application/json
errors\APIException 4XX, 5XX */*

delete

Remove a digital wallet domain (Apple Pay only).

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Gr4vy;

$sdk = Gr4vy\SDK::builder()
    ->setMerchantAccountId('default')
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();

$digitalWalletDomain = new Gr4vy\DigitalWalletDomain(
    domainName: 'example.com',
);

$response = $sdk->digitalWallets->domains->delete(
    digitalWalletId: '',
    digitalWalletDomain: $digitalWalletDomain

);

if ($response->statusCode === 200) {
    // handle response
}

Parameters

Parameter Type Required Description Example
digitalWalletId string ✔️ N/A
digitalWalletDomain DigitalWalletDomain ✔️ N/A
merchantAccountId ?string The ID of the merchant account to use for this request. default

Response

?UnregisterDigitalWalletDomainResponse

Errors

Error Type Status Code Content Type
Errors\Error400 400 application/json
Errors\Error401 401 application/json
Errors\Error403 403 application/json
Errors\Error404 404 application/json
Errors\Error405 405 application/json
Errors\Error409 409 application/json
Errors\HTTPValidationError 422 application/json
Errors\Error425 425 application/json
Errors\Error429 429 application/json
Errors\Error500 500 application/json
Errors\Error502 502 application/json
Errors\Error504 504 application/json
errors\APIException 4XX, 5XX */*