Skip to content

Latest commit

 

History

History
807 lines (534 loc) · 19.2 KB

BillingApi.md

File metadata and controls

807 lines (534 loc) · 19.2 KB

OpenAPI\Client\BillingApi

All URIs are relative to https://api.wall.et, except if the operation defines another base path.

Method HTTP request Description
buyAddOn() POST /v2/billing/products/addOns/{productID} Fetch add-on products, or 1-time purchase products (non-subscription products)
buySpecialOffer() POST /v2/billing/products/specialOffers/{productID} Buy special offer
cancelPlan() DELETE /v2/billing/plan Cancel billing plan and revert to default
changePlan() PUT /v2/billing/plan Change billing plan
fetchAddOns() GET /v2/billing/products/addOns Fetch add-on products, or 1-time purchase products (non-subscription products)
fetchCustomerPaymentMethods() GET /v2/billing/paymentMethods/all Fetch customer payment methods
fetchIndustry() GET /v2/billing/industry Fetch merchant's industry
fetchInvoices() GET /v2/billing/invoices/all Fetch all invoices
fetchSpecialOffers() GET /v2/billing/products/specialOffers Fetch special offer products
fetchSubscription() GET /v2/billing/subscription Fetch subscription
fetchUsageSummary() GET /v2/billing/summary Fetch usage summary
savePaymentMethod() PUT /v2/billing/paymentMethod Save payment method
setDefaultPaymentMethod() POST /v2/billing/paymentMethod/default Verify payment method
upcomingInvoices() GET /v2/billing/invoices/upcoming Fetch upcoming invoices
verifyPaymentMethod() GET /v2/billing/paymentMethod Verify payment method

buyAddOn()

buyAddOn($product_id): mixed

Fetch add-on products, or 1-time purchase products (non-subscription products)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\BillingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$product_id = 'product_id_example'; // string

try {
    $result = $apiInstance->buyAddOn($product_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BillingApi->buyAddOn: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
product_id string

Return type

mixed

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

buySpecialOffer()

buySpecialOffer($product_id): mixed

Buy special offer

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\BillingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$product_id = 'product_id_example'; // string

try {
    $result = $apiInstance->buySpecialOffer($product_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BillingApi->buySpecialOffer: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
product_id string

Return type

mixed

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

cancelPlan()

cancelPlan(): mixed

Cancel billing plan and revert to default

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\BillingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $result = $apiInstance->cancelPlan();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BillingApi->cancelPlan: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

mixed

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

changePlan()

changePlan($wt_billing_change_plan): mixed

Change billing plan

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\BillingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$wt_billing_change_plan = new \OpenAPI\Client\Model\WTBillingChangePlan(); // \OpenAPI\Client\Model\WTBillingChangePlan

try {
    $result = $apiInstance->changePlan($wt_billing_change_plan);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BillingApi->changePlan: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
wt_billing_change_plan \OpenAPI\Client\Model\WTBillingChangePlan

Return type

mixed

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

fetchAddOns()

fetchAddOns(): mixed[]

Fetch add-on products, or 1-time purchase products (non-subscription products)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\BillingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $result = $apiInstance->fetchAddOns();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BillingApi->fetchAddOns: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

mixed[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

fetchCustomerPaymentMethods()

fetchCustomerPaymentMethods(): mixed

Fetch customer payment methods

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\BillingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $result = $apiInstance->fetchCustomerPaymentMethods();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BillingApi->fetchCustomerPaymentMethods: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

mixed

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

fetchIndustry()

fetchIndustry(): \OpenAPI\Client\Model\FetchIndustry200Response

Fetch merchant's industry

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\BillingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $result = $apiInstance->fetchIndustry();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BillingApi->fetchIndustry: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\OpenAPI\Client\Model\FetchIndustry200Response

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

fetchInvoices()

fetchInvoices(): mixed

Fetch all invoices

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\BillingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $result = $apiInstance->fetchInvoices();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BillingApi->fetchInvoices: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

mixed

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

fetchSpecialOffers()

fetchSpecialOffers(): mixed[]

Fetch special offer products

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\BillingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $result = $apiInstance->fetchSpecialOffers();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BillingApi->fetchSpecialOffers: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

mixed[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

fetchSubscription()

fetchSubscription(): mixed

Fetch subscription

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\BillingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $result = $apiInstance->fetchSubscription();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BillingApi->fetchSubscription: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

mixed

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

fetchUsageSummary()

fetchUsageSummary($start_date_time, $end_date_time): object

Fetch usage summary

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\BillingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$start_date_time = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime
$end_date_time = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime

try {
    $result = $apiInstance->fetchUsageSummary($start_date_time, $end_date_time);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BillingApi->fetchUsageSummary: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
start_date_time \DateTime [optional]
end_date_time \DateTime [optional]

Return type

object

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

savePaymentMethod()

savePaymentMethod($wt_billing_save_payment_method): mixed

Save payment method

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\BillingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$wt_billing_save_payment_method = new \OpenAPI\Client\Model\WTBillingSavePaymentMethod(); // \OpenAPI\Client\Model\WTBillingSavePaymentMethod

try {
    $result = $apiInstance->savePaymentMethod($wt_billing_save_payment_method);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BillingApi->savePaymentMethod: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
wt_billing_save_payment_method \OpenAPI\Client\Model\WTBillingSavePaymentMethod

Return type

mixed

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

setDefaultPaymentMethod()

setDefaultPaymentMethod($set_default_payment_method_request): \OpenAPI\Client\Model\Merchant

Verify payment method

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\BillingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$set_default_payment_method_request = new \OpenAPI\Client\Model\SetDefaultPaymentMethodRequest(); // \OpenAPI\Client\Model\SetDefaultPaymentMethodRequest

try {
    $result = $apiInstance->setDefaultPaymentMethod($set_default_payment_method_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BillingApi->setDefaultPaymentMethod: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
set_default_payment_method_request \OpenAPI\Client\Model\SetDefaultPaymentMethodRequest

Return type

\OpenAPI\Client\Model\Merchant

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

upcomingInvoices()

upcomingInvoices(): mixed

Fetch upcoming invoices

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\BillingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $result = $apiInstance->upcomingInvoices();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BillingApi->upcomingInvoices: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

mixed

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

verifyPaymentMethod()

verifyPaymentMethod(): \OpenAPI\Client\Model\WTBillingVerifyPaymentMethodResponse

Verify payment method

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new OpenAPI\Client\Api\BillingApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $result = $apiInstance->verifyPaymentMethod();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BillingApi->verifyPaymentMethod: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\OpenAPI\Client\Model\WTBillingVerifyPaymentMethodResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]