diff --git a/LICENSE b/LICENSE index b9181f72..b85cedd2 100644 --- a/LICENSE +++ b/LICENSE @@ -3,7 +3,7 @@ License: The MIT License (MIT) http://opensource.org/licenses/MIT -Copyright (c) 2014 - 2024 APIMATIC Limited +Copyright (c) 2014 - 2025 APIMATIC Limited Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 050555cb..a1464603 100644 --- a/README.md +++ b/README.md @@ -30,23 +30,23 @@ curl -u :x -H Accept:application/json -H Content-Type:application/json Run the following command to install the package and automatically add the dependency to your composer.json file: ```bash -composer require "maxio/advanced-billing-sdk:6.0.0" +composer require "maxio/advanced-billing-sdk:6.1.0" ``` Or add it to the composer.json file manually as given below: ```json "require": { - "maxio/advanced-billing-sdk": "6.0.0" + "maxio/advanced-billing-sdk": "6.1.0" } ``` You can also view the package at: -https://packagist.org/packages/maxio/advanced-billing-sdk#6.0.0 +https://packagist.org/packages/maxio/advanced-billing-sdk#6.1.0 ## Initialize the API Client -**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/client.md) +**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/client.md) The following parameters are configurable for the API Client: @@ -63,7 +63,7 @@ The following parameters are configurable for the API Client: | `retryOnTimeout` | `bool` | Whether to retry on request timeout.
*Default*: `true` | | `httpStatusCodesToRetry` | `array` | Http status codes to retry against.
*Default*: `408, 413, 429, 500, 502, 503, 504, 521, 522, 524` | | `httpMethodsToRetry` | `array` | Http methods to retry against.
*Default*: `'GET', 'PUT'` | -| `basicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication | +| `basicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication | The API client can be initialized as follows: @@ -95,46 +95,46 @@ The SDK can be configured to use a different environment for making API calls. A This API uses the following authentication schemes. -* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/auth/basic-authentication.md) +* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/auth/basic-authentication.md) ## List of APIs -* [API Exports](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/api-exports.md) -* [Advance Invoice](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/advance-invoice.md) -* [Billing Portal](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/billing-portal.md) -* [Component Price Points](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/component-price-points.md) -* [Custom Fields](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/custom-fields.md) -* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/events-based-billing-segments.md) -* [Payment Profiles](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/payment-profiles.md) -* [Product Families](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/product-families.md) -* [Product Price Points](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/product-price-points.md) -* [Proforma Invoices](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/proforma-invoices.md) -* [Reason Codes](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/reason-codes.md) -* [Referral Codes](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/referral-codes.md) -* [Sales Commissions](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/sales-commissions.md) -* [Subscription Components](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/subscription-components.md) -* [Subscription Groups](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/subscription-groups.md) -* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/subscription-group-invoice-account.md) -* [Subscription Group Status](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/subscription-group-status.md) -* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/subscription-invoice-account.md) -* [Subscription Notes](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/subscription-notes.md) -* [Subscription Products](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/subscription-products.md) -* [Subscription Status](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/subscription-status.md) -* [Coupons](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/coupons.md) -* [Components](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/components.md) -* [Customers](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/customers.md) -* [Events](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/events.md) -* [Insights](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/insights.md) -* [Invoices](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/invoices.md) -* [Offers](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/offers.md) -* [Products](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/products.md) -* [Sites](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/sites.md) -* [Subscriptions](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/subscriptions.md) -* [Webhooks](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/controllers/webhooks.md) +* [API Exports](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/api-exports.md) +* [Advance Invoice](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/advance-invoice.md) +* [Billing Portal](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/billing-portal.md) +* [Component Price Points](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/component-price-points.md) +* [Custom Fields](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/custom-fields.md) +* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/events-based-billing-segments.md) +* [Payment Profiles](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/payment-profiles.md) +* [Product Families](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/product-families.md) +* [Product Price Points](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/product-price-points.md) +* [Proforma Invoices](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/proforma-invoices.md) +* [Reason Codes](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/reason-codes.md) +* [Referral Codes](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/referral-codes.md) +* [Sales Commissions](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/sales-commissions.md) +* [Subscription Components](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/subscription-components.md) +* [Subscription Groups](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/subscription-groups.md) +* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/subscription-group-invoice-account.md) +* [Subscription Group Status](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/subscription-group-status.md) +* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/subscription-invoice-account.md) +* [Subscription Notes](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/subscription-notes.md) +* [Subscription Products](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/subscription-products.md) +* [Subscription Status](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/subscription-status.md) +* [Coupons](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/coupons.md) +* [Components](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/components.md) +* [Customers](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/customers.md) +* [Events](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/events.md) +* [Insights](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/insights.md) +* [Invoices](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/invoices.md) +* [Offers](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/offers.md) +* [Products](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/products.md) +* [Sites](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/sites.md) +* [Subscriptions](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/subscriptions.md) +* [Webhooks](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/controllers/webhooks.md) ## Classes Documentation -* [ApiException](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/api-exception.md) -* [HttpRequest](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/http-request.md) -* [HttpResponse](https://www.github.com/maxio-com/ab-php-sdk/tree/6.0.0/doc/http-response.md) +* [ApiException](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/api-exception.md) +* [HttpRequest](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/http-request.md) +* [HttpResponse](https://www.github.com/maxio-com/ab-php-sdk/tree/6.1.0/doc/http-response.md) diff --git a/composer.json b/composer.json index 0efb3a58..7b41a8f5 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "ext-json": "*", "apimatic/unirest-php": "^4.0.0", "apimatic/core-interfaces": "~0.1.5", - "apimatic/core": "~0.3.12" + "apimatic/core": "~0.3.13" }, "require-dev": { "squizlabs/php_codesniffer": "^3.5", diff --git a/composer.lock b/composer.lock index 9169eb2b..3a24a0c4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b9c62bb5256e88fbdc3fc93ac9cc4ef7", + "content-hash": "d7ccb2f1a1dfaaa9f6337d539afdc9a7", "packages": [ { "name": "apimatic/core", - "version": "0.3.12", + "version": "0.3.13", "source": { "type": "git", "url": "https://github.com/apimatic/core-lib-php.git", - "reference": "d3b3fb415c2a5eb851077a7522e14944c043ebba" + "reference": "944678aa7017457daacd9750b96962fb693ea81a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/apimatic/core-lib-php/zipball/d3b3fb415c2a5eb851077a7522e14944c043ebba", - "reference": "d3b3fb415c2a5eb851077a7522e14944c043ebba", + "url": "https://api.github.com/repos/apimatic/core-lib-php/zipball/944678aa7017457daacd9750b96962fb693ea81a", + "reference": "944678aa7017457daacd9750b96962fb693ea81a", "shasum": "" }, "require": { @@ -56,9 +56,9 @@ ], "support": { "issues": "https://github.com/apimatic/core-lib-php/issues", - "source": "https://github.com/apimatic/core-lib-php/tree/0.3.12" + "source": "https://github.com/apimatic/core-lib-php/tree/0.3.13" }, - "time": "2024-12-09T06:56:43+00:00" + "time": "2024-12-18T08:29:12+00:00" }, { "name": "apimatic/core-interfaces", @@ -357,13 +357,13 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - }, "phpstan": { "includes": [ "extension.neon" ] + }, + "branch-alias": { + "dev-main": "3.x-dev" } }, "autoload": { @@ -1245,47 +1245,46 @@ }, { "name": "symfony/console", - "version": "v6.4.15", + "version": "v7.2.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f1fc6f47283e27336e7cebb9e8946c8de7bff9bd" + "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f1fc6f47283e27336e7cebb9e8946c8de7bff9bd", - "reference": "f1fc6f47283e27336e7cebb9e8946c8de7bff9bd", + "url": "https://api.github.com/repos/symfony/console/zipball/fefcc18c0f5d0efe3ab3152f15857298868dc2c3", + "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^5.4|^6.0|^7.0" + "symfony/string": "^6.4|^7.0" }, "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", "symfony/http-foundation": "^6.4|^7.0", "symfony/http-kernel": "^6.4|^7.0", - "symfony/lock": "^5.4|^6.0|^7.0", - "symfony/messenger": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/stopwatch": "^5.4|^6.0|^7.0", - "symfony/var-dumper": "^5.4|^6.0|^7.0" + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1319,7 +1318,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.15" + "source": "https://github.com/symfony/console/tree/v7.2.1" }, "funding": [ { @@ -1335,7 +1334,7 @@ "type": "tidelift" } ], - "time": "2024-11-06T14:19:14+00:00" + "time": "2024-12-11T03:49:26+00:00" }, { "name": "symfony/deprecation-contracts", @@ -1356,12 +1355,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -1826,12 +1825,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -1887,20 +1886,20 @@ }, { "name": "symfony/string", - "version": "v6.4.15", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f" + "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f", - "reference": "73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f", + "url": "https://api.github.com/repos/symfony/string/zipball/446e0d146f991dde3e73f45f2c97a9faad773c82", + "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -1910,11 +1909,12 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0|^7.0", - "symfony/http-client": "^5.4|^6.0|^7.0", - "symfony/intl": "^6.2|^7.0", + "symfony/emoji": "^7.1", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^5.4|^6.0|^7.0" + "symfony/var-exporter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1953,7 +1953,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.15" + "source": "https://github.com/symfony/string/tree/v7.2.0" }, "funding": [ { @@ -1969,7 +1969,7 @@ "type": "tidelift" } ], - "time": "2024-11-13T13:31:12+00:00" + "time": "2024-11-13T13:31:26+00:00" }, { "name": "tysonandre/var_representation_polyfill", @@ -2094,13 +2094,13 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { "php": "^7.2 || ^8.0", "ext-json": "*" }, - "platform-dev": [], + "platform-dev": {}, "plugin-api-version": "2.6.0" } diff --git a/doc/controllers/sites.md b/doc/controllers/sites.md index a20d8e9d..7f25dfdd 100644 --- a/doc/controllers/sites.md +++ b/doc/controllers/sites.md @@ -62,6 +62,7 @@ $result = $sitesController->readSite(); "string" ], "relationship_invoicing_enabled": true, + "schedule_subscription_cancellation_enabled": true, "customer_hierarchy_enabled": true, "whopays_enabled": true, "whopays_default_payer": "string", diff --git a/doc/models/prepaid-product-price-point-filter.md b/doc/models/prepaid-product-price-point-filter.md index 08b8e92b..f0014175 100644 --- a/doc/models/prepaid-product-price-point-filter.md +++ b/doc/models/prepaid-product-price-point-filter.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | Getter | Setter | | --- | --- | --- | --- | --- | --- | -| `productPricePointId` | `string` | Required, Constant | Passed as a parameter to list methods to return only non null values.
**Default**: `'not_null'` | getProductPricePointId(): string | setProductPricePointId(string productPricePointId): void | +| `productPricePointId` | `string` | Required, Constant | Passed as a parameter to list methods to return only non null values.
**Value**: `'not_null'` | getProductPricePointId(): string | setProductPricePointId(string productPricePointId): void | ## Example (as JSON) diff --git a/doc/models/site.md b/doc/models/site.md index 5ec95e90..b1a9a4f1 100644 --- a/doc/models/site.md +++ b/doc/models/site.md @@ -16,6 +16,7 @@ | `sellerId` | `?int` | Optional | - | getSellerId(): ?int | setSellerId(?int sellerId): void | | `nonPrimaryCurrencies` | `?(string[])` | Optional | - | getNonPrimaryCurrencies(): ?array | setNonPrimaryCurrencies(?array nonPrimaryCurrencies): void | | `relationshipInvoicingEnabled` | `?bool` | Optional | - | getRelationshipInvoicingEnabled(): ?bool | setRelationshipInvoicingEnabled(?bool relationshipInvoicingEnabled): void | +| `scheduleSubscriptionCancellationEnabled` | `?bool` | Optional | - | getScheduleSubscriptionCancellationEnabled(): ?bool | setScheduleSubscriptionCancellationEnabled(?bool scheduleSubscriptionCancellationEnabled): void | | `customerHierarchyEnabled` | `?bool` | Optional | - | getCustomerHierarchyEnabled(): ?bool | setCustomerHierarchyEnabled(?bool customerHierarchyEnabled): void | | `whopaysEnabled` | `?bool` | Optional | - | getWhopaysEnabled(): ?bool | setWhopaysEnabled(?bool whopaysEnabled): void | | `whopaysDefaultPayer` | `?string` | Optional | - | getWhopaysDefaultPayer(): ?string | setWhopaysDefaultPayer(?string whopaysDefaultPayer): void | diff --git a/src/AdvancedBillingClient.php b/src/AdvancedBillingClient.php index cfc90a8c..a053209c 100644 --- a/src/AdvancedBillingClient.php +++ b/src/AdvancedBillingClient.php @@ -138,7 +138,7 @@ public function __construct(array $config = []) ->converter(new CompatibilityConverter()) ->jsonHelper(ApiHelper::getJsonHelper()) ->apiCallback($this->config['httpCallback'] ?? null) - ->userAgent('AB SDK PHP:6.0.0 on OS {os-info}') + ->userAgent('AB SDK PHP:6.1.0 on OS {os-info}') ->globalConfig($this->getGlobalConfiguration()) ->globalErrors($this->getGlobalErrors()) ->serverUrls(self::ENVIRONMENT_MAP[$this->getEnvironment()], Server::PRODUCTION) diff --git a/src/ApiHelper.php b/src/ApiHelper.php index 1e5bf157..9788673f 100644 --- a/src/ApiHelper.php +++ b/src/ApiHelper.php @@ -93,4 +93,19 @@ public static function deserialize(string $json) { return CoreHelper::deserialize($json); } + + /** + * Converts the properties to a human-readable string representation. + * + * Sample output: + * + * $prefix [$properties:key: $properties:value, $processedProperties] + */ + public static function stringify( + string $prefix, + array $properties, + string $processedProperties = '' + ): string { + return CoreHelper::stringify($prefix, $properties, $processedProperties); + } } diff --git a/src/Exceptions/ApiException.php b/src/Exceptions/ApiException.php index e549308e..8ba8cf7b 100644 --- a/src/Exceptions/ApiException.php +++ b/src/Exceptions/ApiException.php @@ -11,6 +11,7 @@ namespace AdvancedBillingLib\Exceptions; use CoreInterfaces\Sdk\ExceptionInterface; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Http\HttpResponse; use AdvancedBillingLib\Http\HttpRequest; @@ -68,4 +69,20 @@ public function hasResponse(): bool { return !\is_null($this->response); } + + /** + * Converts the ApiException object to a human-readable string representation. + * + * @return string The string representation of the ApiException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ApiException', + [ + 'statusCode' => $this->getCode(), + 'message' => $this->getMessage() + ] + ); + } } diff --git a/src/Exceptions/ComponentAllocationErrorException.php b/src/Exceptions/ComponentAllocationErrorException.php index 87f56c5f..9ccbb1f1 100644 --- a/src/Exceptions/ComponentAllocationErrorException.php +++ b/src/Exceptions/ComponentAllocationErrorException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class ComponentAllocationErrorException extends ApiException { /** @@ -39,6 +41,20 @@ public function setErrors(?array $errors): void $this->errors = $errors; } + /** + * Converts the ComponentAllocationErrorException object to a human-readable string representation. + * + * @return string The string representation of the ComponentAllocationErrorException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ComponentAllocationErrorException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/ComponentPricePointErrorException.php b/src/Exceptions/ComponentPricePointErrorException.php index d97d6be7..713695cc 100644 --- a/src/Exceptions/ComponentPricePointErrorException.php +++ b/src/Exceptions/ComponentPricePointErrorException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class ComponentPricePointErrorException extends ApiException { /** @@ -39,6 +41,20 @@ public function setErrors(?array $errors): void $this->errors = $errors; } + /** + * Converts the ComponentPricePointErrorException object to a human-readable string representation. + * + * @return string The string representation of the ComponentPricePointErrorException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ComponentPricePointErrorException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/CustomerErrorResponseException.php b/src/Exceptions/CustomerErrorResponseException.php index 1285aad3..1fed2435 100644 --- a/src/Exceptions/CustomerErrorResponseException.php +++ b/src/Exceptions/CustomerErrorResponseException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class CustomerErrorResponseException extends ApiException { /** @@ -40,6 +42,20 @@ public function setErrors($errors): void $this->errors = $errors; } + /** + * Converts the CustomerErrorResponseException object to a human-readable string representation. + * + * @return string The string representation of the CustomerErrorResponseException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CustomerErrorResponseException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/ErrorArrayMapResponseException.php b/src/Exceptions/ErrorArrayMapResponseException.php index dc804dbc..f0cc145e 100644 --- a/src/Exceptions/ErrorArrayMapResponseException.php +++ b/src/Exceptions/ErrorArrayMapResponseException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class ErrorArrayMapResponseException extends ApiException { /** @@ -35,6 +37,20 @@ public function setErrors(?array $errors): void $this->errors = $errors; } + /** + * Converts the ErrorArrayMapResponseException object to a human-readable string representation. + * + * @return string The string representation of the ErrorArrayMapResponseException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ErrorArrayMapResponseException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/ErrorListResponseException.php b/src/Exceptions/ErrorListResponseException.php index 253dbe76..78c69c44 100644 --- a/src/Exceptions/ErrorListResponseException.php +++ b/src/Exceptions/ErrorListResponseException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + /** * Error which contains list of messages. */ @@ -59,6 +61,20 @@ public function setErrors(array $errors): void $this->errors = $errors; } + /** + * Converts the ErrorListResponseException object to a human-readable string representation. + * + * @return string The string representation of the ErrorListResponseException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ErrorListResponseException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/ErrorStringMapResponseException.php b/src/Exceptions/ErrorStringMapResponseException.php index 5c9b42ea..00482112 100644 --- a/src/Exceptions/ErrorStringMapResponseException.php +++ b/src/Exceptions/ErrorStringMapResponseException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class ErrorStringMapResponseException extends ApiException { /** @@ -39,6 +41,20 @@ public function setErrors(?array $errors): void $this->errors = $errors; } + /** + * Converts the ErrorStringMapResponseException object to a human-readable string representation. + * + * @return string The string representation of the ErrorStringMapResponseException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ErrorStringMapResponseException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/EventBasedBillingListSegmentsErrorsException.php b/src/Exceptions/EventBasedBillingListSegmentsErrorsException.php index 71189e99..94b989b1 100644 --- a/src/Exceptions/EventBasedBillingListSegmentsErrorsException.php +++ b/src/Exceptions/EventBasedBillingListSegmentsErrorsException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class EventBasedBillingListSegmentsErrorsException extends ApiException { /** @@ -35,6 +37,21 @@ public function setErrors(?\AdvancedBillingLib\Models\Errors $errors): void $this->errors = $errors; } + /** + * Converts the EventBasedBillingListSegmentsErrorsException object to a human-readable string + * representation. + * + * @return string The string representation of the EventBasedBillingListSegmentsErrorsException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'EventBasedBillingListSegmentsErrorsException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/EventBasedBillingSegmentErrorsException.php b/src/Exceptions/EventBasedBillingSegmentErrorsException.php index ea918a24..44e0ca36 100644 --- a/src/Exceptions/EventBasedBillingSegmentErrorsException.php +++ b/src/Exceptions/EventBasedBillingSegmentErrorsException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class EventBasedBillingSegmentErrorsException extends ApiException { /** @@ -41,6 +43,21 @@ public function setErrors(?array $errors): void $this->errors = $errors; } + /** + * Converts the EventBasedBillingSegmentErrorsException object to a human-readable string + * representation. + * + * @return string The string representation of the EventBasedBillingSegmentErrorsException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'EventBasedBillingSegmentErrorsException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/EventBasedBillingSegmentException.php b/src/Exceptions/EventBasedBillingSegmentException.php index 2a25fee4..de352d31 100644 --- a/src/Exceptions/EventBasedBillingSegmentException.php +++ b/src/Exceptions/EventBasedBillingSegmentException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class EventBasedBillingSegmentException extends ApiException { /** @@ -52,6 +54,20 @@ public function setErrors(\AdvancedBillingLib\Models\EventBasedBillingSegmentErr $this->errors = $errors; } + /** + * Converts the EventBasedBillingSegmentException object to a human-readable string representation. + * + * @return string The string representation of the EventBasedBillingSegmentException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'EventBasedBillingSegmentException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/ProductPricePointErrorResponseException.php b/src/Exceptions/ProductPricePointErrorResponseException.php index 1870ee2e..35441797 100644 --- a/src/Exceptions/ProductPricePointErrorResponseException.php +++ b/src/Exceptions/ProductPricePointErrorResponseException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class ProductPricePointErrorResponseException extends ApiException { /** @@ -52,6 +54,21 @@ public function setErrors(\AdvancedBillingLib\Models\ProductPricePointErrors $er $this->errors = $errors; } + /** + * Converts the ProductPricePointErrorResponseException object to a human-readable string + * representation. + * + * @return string The string representation of the ProductPricePointErrorResponseException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ProductPricePointErrorResponseException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/ProformaBadRequestErrorResponseException.php b/src/Exceptions/ProformaBadRequestErrorResponseException.php index b7623420..7ce70bb3 100644 --- a/src/Exceptions/ProformaBadRequestErrorResponseException.php +++ b/src/Exceptions/ProformaBadRequestErrorResponseException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class ProformaBadRequestErrorResponseException extends ApiException { /** @@ -35,6 +37,21 @@ public function setErrors(?\AdvancedBillingLib\Models\ProformaError $errors): vo $this->errors = $errors; } + /** + * Converts the ProformaBadRequestErrorResponseException object to a human-readable string + * representation. + * + * @return string The string representation of the ProformaBadRequestErrorResponseException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ProformaBadRequestErrorResponseException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/RefundPrepaymentBaseErrorsResponseException.php b/src/Exceptions/RefundPrepaymentBaseErrorsResponseException.php index 07899978..2fc8e59a 100644 --- a/src/Exceptions/RefundPrepaymentBaseErrorsResponseException.php +++ b/src/Exceptions/RefundPrepaymentBaseErrorsResponseException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + /** * Errors returned on creating a refund prepayment when bad request */ @@ -38,6 +40,21 @@ public function setErrors(?\AdvancedBillingLib\Models\RefundPrepaymentBaseRefund $this->errors = $errors; } + /** + * Converts the RefundPrepaymentBaseErrorsResponseException object to a human-readable string + * representation. + * + * @return string The string representation of the RefundPrepaymentBaseErrorsResponseException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RefundPrepaymentBaseErrorsResponseException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/SingleErrorResponseException.php b/src/Exceptions/SingleErrorResponseException.php index 5a360c76..4a53d54a 100644 --- a/src/Exceptions/SingleErrorResponseException.php +++ b/src/Exceptions/SingleErrorResponseException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class SingleErrorResponseException extends ApiException { /** @@ -52,6 +54,20 @@ public function setError(string $error): void $this->error = $error; } + /** + * Converts the SingleErrorResponseException object to a human-readable string representation. + * + * @return string The string representation of the SingleErrorResponseException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SingleErrorResponseException', + ['error' => $this->error, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/SingleStringErrorResponseException.php b/src/Exceptions/SingleStringErrorResponseException.php index fd71adaf..de5bd40e 100644 --- a/src/Exceptions/SingleStringErrorResponseException.php +++ b/src/Exceptions/SingleStringErrorResponseException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class SingleStringErrorResponseException extends ApiException { /** @@ -35,6 +37,20 @@ public function setErrors(?string $errors): void $this->errors = $errors; } + /** + * Converts the SingleStringErrorResponseException object to a human-readable string representation. + * + * @return string The string representation of the SingleStringErrorResponseException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SingleStringErrorResponseException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/SubscriptionAddCouponErrorException.php b/src/Exceptions/SubscriptionAddCouponErrorException.php index e126d44e..939aa8da 100644 --- a/src/Exceptions/SubscriptionAddCouponErrorException.php +++ b/src/Exceptions/SubscriptionAddCouponErrorException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class SubscriptionAddCouponErrorException extends ApiException { /** @@ -120,6 +122,26 @@ public function setSubscription(?array $subscription): void $this->subscription = $subscription; } + /** + * Converts the SubscriptionAddCouponErrorException object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionAddCouponErrorException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionAddCouponErrorException', + [ + 'codes' => $this->codes, + 'couponCode' => $this->couponCode, + 'couponCodes' => $this->couponCodes, + 'subscription' => $this->subscription, + 'additionalProperties' => $this->additionalProperties + ], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/SubscriptionComponentAllocationErrorException.php b/src/Exceptions/SubscriptionComponentAllocationErrorException.php index 91efdaa6..d185cfd6 100644 --- a/src/Exceptions/SubscriptionComponentAllocationErrorException.php +++ b/src/Exceptions/SubscriptionComponentAllocationErrorException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class SubscriptionComponentAllocationErrorException extends ApiException { /** @@ -39,6 +41,21 @@ public function setErrors(?array $errors): void $this->errors = $errors; } + /** + * Converts the SubscriptionComponentAllocationErrorException object to a human-readable string + * representation. + * + * @return string The string representation of the SubscriptionComponentAllocationErrorException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionComponentAllocationErrorException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/SubscriptionGroupCreateErrorResponseException.php b/src/Exceptions/SubscriptionGroupCreateErrorResponseException.php index f5aa570a..992e4878 100644 --- a/src/Exceptions/SubscriptionGroupCreateErrorResponseException.php +++ b/src/Exceptions/SubscriptionGroupCreateErrorResponseException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class SubscriptionGroupCreateErrorResponseException extends ApiException { /** @@ -57,6 +59,21 @@ public function setErrors($errors): void $this->errors = $errors; } + /** + * Converts the SubscriptionGroupCreateErrorResponseException object to a human-readable string + * representation. + * + * @return string The string representation of the SubscriptionGroupCreateErrorResponseException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupCreateErrorResponseException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/SubscriptionGroupSignupErrorResponseException.php b/src/Exceptions/SubscriptionGroupSignupErrorResponseException.php index cd5e496e..faf37296 100644 --- a/src/Exceptions/SubscriptionGroupSignupErrorResponseException.php +++ b/src/Exceptions/SubscriptionGroupSignupErrorResponseException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class SubscriptionGroupSignupErrorResponseException extends ApiException { /** @@ -52,6 +54,21 @@ public function setErrors(\AdvancedBillingLib\Models\SubscriptionGroupSignupErro $this->errors = $errors; } + /** + * Converts the SubscriptionGroupSignupErrorResponseException object to a human-readable string + * representation. + * + * @return string The string representation of the SubscriptionGroupSignupErrorResponseException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupSignupErrorResponseException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/SubscriptionGroupUpdateErrorResponseException.php b/src/Exceptions/SubscriptionGroupUpdateErrorResponseException.php index 9792adc4..da863908 100644 --- a/src/Exceptions/SubscriptionGroupUpdateErrorResponseException.php +++ b/src/Exceptions/SubscriptionGroupUpdateErrorResponseException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class SubscriptionGroupUpdateErrorResponseException extends ApiException { /** @@ -35,6 +37,21 @@ public function setErrors(?\AdvancedBillingLib\Models\SubscriptionGroupUpdateErr $this->errors = $errors; } + /** + * Converts the SubscriptionGroupUpdateErrorResponseException object to a human-readable string + * representation. + * + * @return string The string representation of the SubscriptionGroupUpdateErrorResponseException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupUpdateErrorResponseException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/SubscriptionRemoveCouponErrorsException.php b/src/Exceptions/SubscriptionRemoveCouponErrorsException.php index eb5a3c30..a09b4490 100644 --- a/src/Exceptions/SubscriptionRemoveCouponErrorsException.php +++ b/src/Exceptions/SubscriptionRemoveCouponErrorsException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class SubscriptionRemoveCouponErrorsException extends ApiException { /** @@ -56,6 +58,21 @@ public function setSubscription(array $subscription): void $this->subscription = $subscription; } + /** + * Converts the SubscriptionRemoveCouponErrorsException object to a human-readable string + * representation. + * + * @return string The string representation of the SubscriptionRemoveCouponErrorsException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionRemoveCouponErrorsException', + ['subscription' => $this->subscription, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/SubscriptionResponseErrorException.php b/src/Exceptions/SubscriptionResponseErrorException.php index e7ec9e01..ef5d4af5 100644 --- a/src/Exceptions/SubscriptionResponseErrorException.php +++ b/src/Exceptions/SubscriptionResponseErrorException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class SubscriptionResponseErrorException extends ApiException { /** @@ -35,6 +37,20 @@ public function setSubscription(?\AdvancedBillingLib\Models\Subscription $subscr $this->subscription = $subscription; } + /** + * Converts the SubscriptionResponseErrorException object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionResponseErrorException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionResponseErrorException', + ['subscription' => $this->subscription, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/SubscriptionsMrrErrorResponseException.php b/src/Exceptions/SubscriptionsMrrErrorResponseException.php index 93f2e25b..5b9106fa 100644 --- a/src/Exceptions/SubscriptionsMrrErrorResponseException.php +++ b/src/Exceptions/SubscriptionsMrrErrorResponseException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class SubscriptionsMrrErrorResponseException extends ApiException { /** @@ -52,6 +54,20 @@ public function setErrors(\AdvancedBillingLib\Models\AttributeError $errors): vo $this->errors = $errors; } + /** + * Converts the SubscriptionsMrrErrorResponseException object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionsMrrErrorResponseException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionsMrrErrorResponseException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Exceptions/TooManyManagementLinkRequestsErrorException.php b/src/Exceptions/TooManyManagementLinkRequestsErrorException.php index 6e602531..35111d1b 100644 --- a/src/Exceptions/TooManyManagementLinkRequestsErrorException.php +++ b/src/Exceptions/TooManyManagementLinkRequestsErrorException.php @@ -10,6 +10,8 @@ namespace AdvancedBillingLib\Exceptions; +use AdvancedBillingLib\ApiHelper; + class TooManyManagementLinkRequestsErrorException extends ApiException { /** @@ -52,6 +54,21 @@ public function setErrors(\AdvancedBillingLib\Models\TooManyManagementLinkReques $this->errors = $errors; } + /** + * Converts the TooManyManagementLinkRequestsErrorException object to a human-readable string + * representation. + * + * @return string The string representation of the TooManyManagementLinkRequestsErrorException object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'TooManyManagementLinkRequestsErrorException', + ['errors' => $this->errors, 'additionalProperties' => $this->additionalProperties], + parent::__toString() + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ACHAgreement.php b/src/Models/ACHAgreement.php index 2df0f94b..a1a68296 100644 --- a/src/Models/ACHAgreement.php +++ b/src/Models/ACHAgreement.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -123,6 +124,25 @@ public function setIpAddress(?string $ipAddress): void $this->ipAddress = $ipAddress; } + /** + * Converts the ACHAgreement object to a human-readable string representation. + * + * @return string The string representation of the ACHAgreement object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ACHAgreement', + [ + 'agreementTerms' => $this->agreementTerms, + 'authorizerFirstName' => $this->authorizerFirstName, + 'authorizerLastName' => $this->authorizerLastName, + 'ipAddress' => $this->ipAddress, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/AccountBalance.php b/src/Models/AccountBalance.php index c8b6ce6f..aaa9e2f5 100644 --- a/src/Models/AccountBalance.php +++ b/src/Models/AccountBalance.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class AccountBalance implements \JsonSerializable @@ -113,6 +114,24 @@ public function unsetRemittanceBalanceInCents(): void $this->remittanceBalanceInCents = []; } + /** + * Converts the AccountBalance object to a human-readable string representation. + * + * @return string The string representation of the AccountBalance object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'AccountBalance', + [ + 'balanceInCents' => $this->balanceInCents, + 'automaticBalanceInCents' => $this->getAutomaticBalanceInCents(), + 'remittanceBalanceInCents' => $this->getRemittanceBalanceInCents(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/AccountBalances.php b/src/Models/AccountBalances.php index bfd03392..fbf9cdbe 100644 --- a/src/Models/AccountBalances.php +++ b/src/Models/AccountBalances.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class AccountBalances implements \JsonSerializable @@ -139,6 +140,26 @@ public function setPrepayments(?AccountBalance $prepayments): void $this->prepayments = $prepayments; } + /** + * Converts the AccountBalances object to a human-readable string representation. + * + * @return string The string representation of the AccountBalances object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'AccountBalances', + [ + 'openInvoices' => $this->openInvoices, + 'pendingInvoices' => $this->pendingInvoices, + 'pendingDiscounts' => $this->pendingDiscounts, + 'serviceCredits' => $this->serviceCredits, + 'prepayments' => $this->prepayments, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ActivateEventBasedComponent.php b/src/Models/ActivateEventBasedComponent.php index de714a67..5d4b1bf7 100644 --- a/src/Models/ActivateEventBasedComponent.php +++ b/src/Models/ActivateEventBasedComponent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ActivateEventBasedComponent implements \JsonSerializable @@ -93,6 +94,24 @@ public function setCustomPrice(?ComponentCustomPrice $customPrice): void $this->customPrice = $customPrice; } + /** + * Converts the ActivateEventBasedComponent object to a human-readable string representation. + * + * @return string The string representation of the ActivateEventBasedComponent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ActivateEventBasedComponent', + [ + 'pricePointId' => $this->pricePointId, + 'billingSchedule' => $this->billingSchedule, + 'customPrice' => $this->customPrice, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ActivateSubscriptionRequest.php b/src/Models/ActivateSubscriptionRequest.php index bad73f97..85a9ad89 100644 --- a/src/Models/ActivateSubscriptionRequest.php +++ b/src/Models/ActivateSubscriptionRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ActivateSubscriptionRequest implements \JsonSerializable @@ -60,6 +61,22 @@ public function unsetRevertOnFailure(): void $this->revertOnFailure = []; } + /** + * Converts the ActivateSubscriptionRequest object to a human-readable string representation. + * + * @return string The string representation of the ActivateSubscriptionRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ActivateSubscriptionRequest', + [ + 'revertOnFailure' => $this->getRevertOnFailure(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/AddCouponsRequest.php b/src/Models/AddCouponsRequest.php index 821f2fc0..ebf824cc 100644 --- a/src/Models/AddCouponsRequest.php +++ b/src/Models/AddCouponsRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class AddCouponsRequest implements \JsonSerializable @@ -41,6 +42,19 @@ public function setCodes(?array $codes): void $this->codes = $codes; } + /** + * Converts the AddCouponsRequest object to a human-readable string representation. + * + * @return string The string representation of the AddCouponsRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'AddCouponsRequest', + ['codes' => $this->codes, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/AddSubscriptionToAGroup.php b/src/Models/AddSubscriptionToAGroup.php index 71108bc5..30ebcd77 100644 --- a/src/Models/AddSubscriptionToAGroup.php +++ b/src/Models/AddSubscriptionToAGroup.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class AddSubscriptionToAGroup implements \JsonSerializable @@ -37,6 +38,19 @@ public function setGroup(?GroupSettings $group): void $this->group = $group; } + /** + * Converts the AddSubscriptionToAGroup object to a human-readable string representation. + * + * @return string The string representation of the AddSubscriptionToAGroup object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'AddSubscriptionToAGroup', + ['group' => $this->group, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/AddressChange.php b/src/Models/AddressChange.php index 01a48de5..574151e8 100644 --- a/src/Models/AddressChange.php +++ b/src/Models/AddressChange.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class AddressChange implements \JsonSerializable @@ -72,6 +73,23 @@ public function setAfter(InvoiceAddress $after): void $this->after = $after; } + /** + * Converts the AddressChange object to a human-readable string representation. + * + * @return string The string representation of the AddressChange object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'AddressChange', + [ + 'before' => $this->before, + 'after' => $this->after, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/AgreementAcceptance.php b/src/Models/AgreementAcceptance.php index cd9773b8..0f859363 100644 --- a/src/Models/AgreementAcceptance.php +++ b/src/Models/AgreementAcceptance.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -161,6 +162,27 @@ public function setSecureCheckoutPolicyUrl(?string $secureCheckoutPolicyUrl): vo $this->secureCheckoutPolicyUrl = $secureCheckoutPolicyUrl; } + /** + * Converts the AgreementAcceptance object to a human-readable string representation. + * + * @return string The string representation of the AgreementAcceptance object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'AgreementAcceptance', + [ + 'ipAddress' => $this->ipAddress, + 'termsUrl' => $this->termsUrl, + 'privacyPolicyUrl' => $this->privacyPolicyUrl, + 'returnRefundPolicyUrl' => $this->returnRefundPolicyUrl, + 'deliveryPolicyUrl' => $this->deliveryPolicyUrl, + 'secureCheckoutPolicyUrl' => $this->secureCheckoutPolicyUrl, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/AllocateComponents.php b/src/Models/AllocateComponents.php index 25ce5541..5ca6f86e 100644 --- a/src/Models/AllocateComponents.php +++ b/src/Models/AllocateComponents.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class AllocateComponents implements \JsonSerializable @@ -253,6 +254,29 @@ public function setInitiateDunning(?bool $initiateDunning): void $this->initiateDunning = $initiateDunning; } + /** + * Converts the AllocateComponents object to a human-readable string representation. + * + * @return string The string representation of the AllocateComponents object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'AllocateComponents', + [ + 'prorationUpgradeScheme' => $this->prorationUpgradeScheme, + 'prorationDowngradeScheme' => $this->prorationDowngradeScheme, + 'allocations' => $this->allocations, + 'accrueCharge' => $this->accrueCharge, + 'upgradeCharge' => $this->getUpgradeCharge(), + 'downgradeCredit' => $this->getDowngradeCredit(), + 'paymentCollectionMethod' => $this->paymentCollectionMethod, + 'initiateDunning' => $this->initiateDunning, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Allocation.php b/src/Models/Allocation.php index c141e2fe..bcc9716d 100644 --- a/src/Models/Allocation.php +++ b/src/Models/Allocation.php @@ -748,6 +748,46 @@ public function setChargeId(?int $chargeId): void $this->chargeId = $chargeId; } + /** + * Converts the Allocation object to a human-readable string representation. + * + * @return string The string representation of the Allocation object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Allocation', + [ + 'allocationId' => $this->allocationId, + 'componentId' => $this->componentId, + 'componentHandle' => $this->getComponentHandle(), + 'subscriptionId' => $this->subscriptionId, + 'quantity' => $this->quantity, + 'previousQuantity' => $this->previousQuantity, + 'memo' => $this->getMemo(), + 'timestamp' => $this->timestamp, + 'createdAt' => $this->createdAt, + 'prorationUpgradeScheme' => $this->prorationUpgradeScheme, + 'prorationDowngradeScheme' => $this->prorationDowngradeScheme, + 'pricePointId' => $this->pricePointId, + 'pricePointName' => $this->pricePointName, + 'pricePointHandle' => $this->pricePointHandle, + 'interval' => $this->interval, + 'intervalUnit' => $this->getIntervalUnit(), + 'previousPricePointId' => $this->previousPricePointId, + 'accrueCharge' => $this->accrueCharge, + 'initiateDunning' => $this->initiateDunning, + 'upgradeCharge' => $this->getUpgradeCharge(), + 'downgradeCredit' => $this->getDowngradeCredit(), + 'payment' => $this->getPayment(), + 'expiresAt' => $this->expiresAt, + 'usedQuantity' => $this->usedQuantity, + 'chargeId' => $this->chargeId, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/AllocationExpirationDate.php b/src/Models/AllocationExpirationDate.php index eea250d1..6b757faa 100644 --- a/src/Models/AllocationExpirationDate.php +++ b/src/Models/AllocationExpirationDate.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -39,6 +40,19 @@ public function setExpiresAt(?\DateTime $expiresAt): void $this->expiresAt = $expiresAt; } + /** + * Converts the AllocationExpirationDate object to a human-readable string representation. + * + * @return string The string representation of the AllocationExpirationDate object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'AllocationExpirationDate', + ['expiresAt' => $this->expiresAt, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/AllocationPreview.php b/src/Models/AllocationPreview.php index 47a014c7..f040b443 100644 --- a/src/Models/AllocationPreview.php +++ b/src/Models/AllocationPreview.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -327,6 +328,34 @@ public function setExistingBalanceInCents(?int $existingBalanceInCents): void $this->existingBalanceInCents = $existingBalanceInCents; } + /** + * Converts the AllocationPreview object to a human-readable string representation. + * + * @return string The string representation of the AllocationPreview object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'AllocationPreview', + [ + 'startDate' => $this->startDate, + 'endDate' => $this->endDate, + 'subtotalInCents' => $this->subtotalInCents, + 'totalTaxInCents' => $this->totalTaxInCents, + 'totalDiscountInCents' => $this->totalDiscountInCents, + 'totalInCents' => $this->totalInCents, + 'direction' => $this->direction, + 'prorationScheme' => $this->prorationScheme, + 'lineItems' => $this->lineItems, + 'accrueCharge' => $this->accrueCharge, + 'allocations' => $this->allocations, + 'periodType' => $this->periodType, + 'existingBalanceInCents' => $this->existingBalanceInCents, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/AllocationPreviewItem.php b/src/Models/AllocationPreviewItem.php index c6fd2841..b65ff900 100644 --- a/src/Models/AllocationPreviewItem.php +++ b/src/Models/AllocationPreviewItem.php @@ -538,6 +538,39 @@ public function unsetComponentHandle(): void $this->componentHandle = []; } + /** + * Converts the AllocationPreviewItem object to a human-readable string representation. + * + * @return string The string representation of the AllocationPreviewItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'AllocationPreviewItem', + [ + 'componentId' => $this->componentId, + 'subscriptionId' => $this->subscriptionId, + 'quantity' => $this->quantity, + 'previousQuantity' => $this->previousQuantity, + 'memo' => $this->getMemo(), + 'timestamp' => $this->getTimestamp(), + 'prorationUpgradeScheme' => $this->prorationUpgradeScheme, + 'prorationDowngradeScheme' => $this->prorationDowngradeScheme, + 'accrueCharge' => $this->accrueCharge, + 'upgradeCharge' => $this->getUpgradeCharge(), + 'downgradeCredit' => $this->getDowngradeCredit(), + 'pricePointId' => $this->pricePointId, + 'interval' => $this->interval, + 'intervalUnit' => $this->getIntervalUnit(), + 'previousPricePointId' => $this->previousPricePointId, + 'pricePointHandle' => $this->pricePointHandle, + 'pricePointName' => $this->pricePointName, + 'componentHandle' => $this->getComponentHandle(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/AllocationPreviewLineItem.php b/src/Models/AllocationPreviewLineItem.php index ae059ad5..968f7d14 100644 --- a/src/Models/AllocationPreviewLineItem.php +++ b/src/Models/AllocationPreviewLineItem.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class AllocationPreviewLineItem implements \JsonSerializable @@ -230,6 +231,30 @@ public function setDirection(?string $direction): void $this->direction = $direction; } + /** + * Converts the AllocationPreviewLineItem object to a human-readable string representation. + * + * @return string The string representation of the AllocationPreviewLineItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'AllocationPreviewLineItem', + [ + 'transactionType' => $this->transactionType, + 'kind' => $this->kind, + 'amountInCents' => $this->amountInCents, + 'memo' => $this->memo, + 'discountAmountInCents' => $this->discountAmountInCents, + 'taxableAmountInCents' => $this->taxableAmountInCents, + 'componentId' => $this->componentId, + 'componentHandle' => $this->componentHandle, + 'direction' => $this->direction, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/AllocationPreviewResponse.php b/src/Models/AllocationPreviewResponse.php index 785dfdab..cfa88b3f 100644 --- a/src/Models/AllocationPreviewResponse.php +++ b/src/Models/AllocationPreviewResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class AllocationPreviewResponse implements \JsonSerializable @@ -46,6 +47,22 @@ public function setAllocationPreview(AllocationPreview $allocationPreview): void $this->allocationPreview = $allocationPreview; } + /** + * Converts the AllocationPreviewResponse object to a human-readable string representation. + * + * @return string The string representation of the AllocationPreviewResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'AllocationPreviewResponse', + [ + 'allocationPreview' => $this->allocationPreview, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/AllocationResponse.php b/src/Models/AllocationResponse.php index df8d6157..1fa076aa 100644 --- a/src/Models/AllocationResponse.php +++ b/src/Models/AllocationResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class AllocationResponse implements \JsonSerializable @@ -37,6 +38,19 @@ public function setAllocation(?Allocation $allocation): void $this->allocation = $allocation; } + /** + * Converts the AllocationResponse object to a human-readable string representation. + * + * @return string The string representation of the AllocationResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'AllocationResponse', + ['allocation' => $this->allocation, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/AllocationSettings.php b/src/Models/AllocationSettings.php index fbc90bad..1fbb720c 100644 --- a/src/Models/AllocationSettings.php +++ b/src/Models/AllocationSettings.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class AllocationSettings implements \JsonSerializable @@ -127,6 +128,24 @@ public function setAccrueCharge(?string $accrueCharge): void $this->accrueCharge = $accrueCharge; } + /** + * Converts the AllocationSettings object to a human-readable string representation. + * + * @return string The string representation of the AllocationSettings object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'AllocationSettings', + [ + 'upgradeCharge' => $this->getUpgradeCharge(), + 'downgradeCredit' => $this->getDowngradeCredit(), + 'accrueCharge' => $this->accrueCharge, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ApplePayPaymentProfile.php b/src/Models/ApplePayPaymentProfile.php index 2442d5f0..42482dd6 100644 --- a/src/Models/ApplePayPaymentProfile.php +++ b/src/Models/ApplePayPaymentProfile.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ApplePayPaymentProfile implements \JsonSerializable @@ -522,6 +523,37 @@ public function unsetGatewayHandle(): void $this->gatewayHandle = []; } + /** + * Converts the ApplePayPaymentProfile object to a human-readable string representation. + * + * @return string The string representation of the ApplePayPaymentProfile object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ApplePayPaymentProfile', + [ + 'id' => $this->id, + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'customerId' => $this->customerId, + 'currentVault' => $this->currentVault, + 'vaultToken' => $this->vaultToken, + 'billingAddress' => $this->getBillingAddress(), + 'billingCity' => $this->getBillingCity(), + 'billingState' => $this->getBillingState(), + 'billingZip' => $this->getBillingZip(), + 'billingCountry' => $this->getBillingCountry(), + 'customerVaultToken' => $this->getCustomerVaultToken(), + 'billingAddress2' => $this->getBillingAddress2(), + 'paymentType' => $this->paymentType, + 'siteGatewaySettingId' => $this->getSiteGatewaySettingId(), + 'gatewayHandle' => $this->getGatewayHandle(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/AppliedCreditNoteData.php b/src/Models/AppliedCreditNoteData.php index 44e350b0..a32e36b5 100644 --- a/src/Models/AppliedCreditNoteData.php +++ b/src/Models/AppliedCreditNoteData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class AppliedCreditNoteData implements \JsonSerializable @@ -64,6 +65,19 @@ public function setNumber(?string $number): void $this->number = $number; } + /** + * Converts the AppliedCreditNoteData object to a human-readable string representation. + * + * @return string The string representation of the AppliedCreditNoteData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'AppliedCreditNoteData', + ['uid' => $this->uid, 'number' => $this->number, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ApplyCreditNoteEvent.php b/src/Models/ApplyCreditNoteEvent.php index ba9cd858..8847f4d5 100644 --- a/src/Models/ApplyCreditNoteEvent.php +++ b/src/Models/ApplyCreditNoteEvent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -160,6 +161,26 @@ public function setEventData(ApplyCreditNoteEventData $eventData): void $this->eventData = $eventData; } + /** + * Converts the ApplyCreditNoteEvent object to a human-readable string representation. + * + * @return string The string representation of the ApplyCreditNoteEvent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ApplyCreditNoteEvent', + [ + 'id' => $this->id, + 'timestamp' => $this->timestamp, + 'invoice' => $this->invoice, + 'eventType' => $this->eventType, + 'eventData' => $this->eventData, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ApplyCreditNoteEventData.php b/src/Models/ApplyCreditNoteEventData.php index c0643253..92554046 100644 --- a/src/Models/ApplyCreditNoteEventData.php +++ b/src/Models/ApplyCreditNoteEventData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -315,6 +316,31 @@ public function setAppliedCreditNotes(?array $appliedCreditNotes): void $this->appliedCreditNotes = $appliedCreditNotes; } + /** + * Converts the ApplyCreditNoteEventData object to a human-readable string representation. + * + * @return string The string representation of the ApplyCreditNoteEventData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ApplyCreditNoteEventData', + [ + 'uid' => $this->uid, + 'creditNoteNumber' => $this->creditNoteNumber, + 'creditNoteUid' => $this->creditNoteUid, + 'originalAmount' => $this->originalAmount, + 'appliedAmount' => $this->appliedAmount, + 'transactionTime' => $this->transactionTime, + 'memo' => $this->getMemo(), + 'role' => $this->role, + 'consolidatedInvoice' => $this->consolidatedInvoice, + 'appliedCreditNotes' => $this->appliedCreditNotes, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ApplyDebitNoteEvent.php b/src/Models/ApplyDebitNoteEvent.php index a1ebbcf0..d1483081 100644 --- a/src/Models/ApplyDebitNoteEvent.php +++ b/src/Models/ApplyDebitNoteEvent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -160,6 +161,26 @@ public function setEventData(ApplyDebitNoteEventData $eventData): void $this->eventData = $eventData; } + /** + * Converts the ApplyDebitNoteEvent object to a human-readable string representation. + * + * @return string The string representation of the ApplyDebitNoteEvent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ApplyDebitNoteEvent', + [ + 'id' => $this->id, + 'timestamp' => $this->timestamp, + 'invoice' => $this->invoice, + 'eventType' => $this->eventType, + 'eventData' => $this->eventData, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ApplyDebitNoteEventData.php b/src/Models/ApplyDebitNoteEventData.php index 25001cd7..5f7adb9b 100644 --- a/src/Models/ApplyDebitNoteEventData.php +++ b/src/Models/ApplyDebitNoteEventData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -217,6 +218,27 @@ public function unsetTransactionTime(): void $this->transactionTime = []; } + /** + * Converts the ApplyDebitNoteEventData object to a human-readable string representation. + * + * @return string The string representation of the ApplyDebitNoteEventData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ApplyDebitNoteEventData', + [ + 'debitNoteNumber' => $this->debitNoteNumber, + 'debitNoteUid' => $this->debitNoteUid, + 'originalAmount' => $this->originalAmount, + 'appliedAmount' => $this->appliedAmount, + 'memo' => $this->getMemo(), + 'transactionTime' => $this->getTransactionTime(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ApplyPaymentEvent.php b/src/Models/ApplyPaymentEvent.php index 51589bdc..b0e76f71 100644 --- a/src/Models/ApplyPaymentEvent.php +++ b/src/Models/ApplyPaymentEvent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -160,6 +161,26 @@ public function setEventData(ApplyPaymentEventData $eventData): void $this->eventData = $eventData; } + /** + * Converts the ApplyPaymentEvent object to a human-readable string representation. + * + * @return string The string representation of the ApplyPaymentEvent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ApplyPaymentEvent', + [ + 'id' => $this->id, + 'timestamp' => $this->timestamp, + 'invoice' => $this->invoice, + 'eventType' => $this->eventType, + 'eventData' => $this->eventData, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ApplyPaymentEventData.php b/src/Models/ApplyPaymentEventData.php index 2854df54..42ef02a8 100644 --- a/src/Models/ApplyPaymentEventData.php +++ b/src/Models/ApplyPaymentEventData.php @@ -353,6 +353,32 @@ public function setExternal(?bool $external): void $this->external = $external; } + /** + * Converts the ApplyPaymentEventData object to a human-readable string representation. + * + * @return string The string representation of the ApplyPaymentEventData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ApplyPaymentEventData', + [ + 'consolidationLevel' => $this->consolidationLevel, + 'memo' => $this->memo, + 'originalAmount' => $this->originalAmount, + 'appliedAmount' => $this->appliedAmount, + 'transactionTime' => $this->transactionTime, + 'paymentMethod' => $this->paymentMethod, + 'transactionId' => $this->transactionId, + 'parentInvoiceNumber' => $this->getParentInvoiceNumber(), + 'remainingPrepaymentAmount' => $this->getRemainingPrepaymentAmount(), + 'prepayment' => $this->prepayment, + 'external' => $this->external, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/AttributeError.php b/src/Models/AttributeError.php index 1c542221..57cc52df 100644 --- a/src/Models/AttributeError.php +++ b/src/Models/AttributeError.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class AttributeError implements \JsonSerializable @@ -50,6 +51,19 @@ public function setAttribute(array $attribute): void $this->attribute = $attribute; } + /** + * Converts the AttributeError object to a human-readable string representation. + * + * @return string The string representation of the AttributeError object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'AttributeError', + ['attribute' => $this->attribute, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/AutoResume.php b/src/Models/AutoResume.php index d8877835..897149ae 100644 --- a/src/Models/AutoResume.php +++ b/src/Models/AutoResume.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -50,6 +51,22 @@ public function unsetAutomaticallyResumeAt(): void $this->automaticallyResumeAt = []; } + /** + * Converts the AutoResume object to a human-readable string representation. + * + * @return string The string representation of the AutoResume object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'AutoResume', + [ + 'automaticallyResumeAt' => $this->getAutomaticallyResumeAt(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/BackportInvoiceEvent.php b/src/Models/BackportInvoiceEvent.php index 0b1217e9..a8532f89 100644 --- a/src/Models/BackportInvoiceEvent.php +++ b/src/Models/BackportInvoiceEvent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -155,6 +156,26 @@ public function setEventData(Invoice $eventData): void $this->eventData = $eventData; } + /** + * Converts the BackportInvoiceEvent object to a human-readable string representation. + * + * @return string The string representation of the BackportInvoiceEvent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BackportInvoiceEvent', + [ + 'id' => $this->id, + 'timestamp' => $this->timestamp, + 'invoice' => $this->invoice, + 'eventType' => $this->eventType, + 'eventData' => $this->eventData, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/BankAccountAttributes.php b/src/Models/BankAccountAttributes.php index 2f43a6c0..dcc3f7a3 100644 --- a/src/Models/BankAccountAttributes.php +++ b/src/Models/BankAccountAttributes.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class BankAccountAttributes implements \JsonSerializable @@ -324,6 +325,33 @@ public function setCustomerVaultToken(?string $customerVaultToken): void $this->customerVaultToken = $customerVaultToken; } + /** + * Converts the BankAccountAttributes object to a human-readable string representation. + * + * @return string The string representation of the BankAccountAttributes object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BankAccountAttributes', + [ + 'chargifyToken' => $this->chargifyToken, + 'bankName' => $this->bankName, + 'bankRoutingNumber' => $this->bankRoutingNumber, + 'bankAccountNumber' => $this->bankAccountNumber, + 'bankAccountType' => $this->bankAccountType, + 'bankBranchCode' => $this->bankBranchCode, + 'bankIban' => $this->bankIban, + 'bankAccountHolderType' => $this->bankAccountHolderType, + 'paymentType' => $this->paymentType, + 'currentVault' => $this->currentVault, + 'vaultToken' => $this->vaultToken, + 'customerVaultToken' => $this->customerVaultToken, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/BankAccountPaymentProfile.php b/src/Models/BankAccountPaymentProfile.php index 11dd67fb..c28a033f 100644 --- a/src/Models/BankAccountPaymentProfile.php +++ b/src/Models/BankAccountPaymentProfile.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class BankAccountPaymentProfile implements \JsonSerializable @@ -693,6 +694,43 @@ public function unsetGatewayHandle(): void $this->gatewayHandle = []; } + /** + * Converts the BankAccountPaymentProfile object to a human-readable string representation. + * + * @return string The string representation of the BankAccountPaymentProfile object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BankAccountPaymentProfile', + [ + 'id' => $this->id, + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'customerId' => $this->customerId, + 'currentVault' => $this->currentVault, + 'vaultToken' => $this->vaultToken, + 'billingAddress' => $this->getBillingAddress(), + 'billingCity' => $this->getBillingCity(), + 'billingState' => $this->getBillingState(), + 'billingZip' => $this->getBillingZip(), + 'billingCountry' => $this->getBillingCountry(), + 'customerVaultToken' => $this->getCustomerVaultToken(), + 'billingAddress2' => $this->getBillingAddress2(), + 'bankName' => $this->bankName, + 'maskedBankRoutingNumber' => $this->maskedBankRoutingNumber, + 'maskedBankAccountNumber' => $this->maskedBankAccountNumber, + 'bankAccountType' => $this->bankAccountType, + 'bankAccountHolderType' => $this->bankAccountHolderType, + 'paymentType' => $this->paymentType, + 'verified' => $this->verified, + 'siteGatewaySettingId' => $this->getSiteGatewaySettingId(), + 'gatewayHandle' => $this->getGatewayHandle(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/BankAccountResponse.php b/src/Models/BankAccountResponse.php index a61588b2..c0a410be 100644 --- a/src/Models/BankAccountResponse.php +++ b/src/Models/BankAccountResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class BankAccountResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setPaymentProfile(BankAccountPaymentProfile $paymentProfile): vo $this->paymentProfile = $paymentProfile; } + /** + * Converts the BankAccountResponse object to a human-readable string representation. + * + * @return string The string representation of the BankAccountResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BankAccountResponse', + ['paymentProfile' => $this->paymentProfile, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/BankAccountVerification.php b/src/Models/BankAccountVerification.php index 7599cbff..70dad7c5 100644 --- a/src/Models/BankAccountVerification.php +++ b/src/Models/BankAccountVerification.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class BankAccountVerification implements \JsonSerializable @@ -60,6 +61,23 @@ public function setDeposit2InCents(?int $deposit2InCents): void $this->deposit2InCents = $deposit2InCents; } + /** + * Converts the BankAccountVerification object to a human-readable string representation. + * + * @return string The string representation of the BankAccountVerification object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BankAccountVerification', + [ + 'deposit1InCents' => $this->deposit1InCents, + 'deposit2InCents' => $this->deposit2InCents, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/BankAccountVerificationRequest.php b/src/Models/BankAccountVerificationRequest.php index bff73f69..5e0f774e 100644 --- a/src/Models/BankAccountVerificationRequest.php +++ b/src/Models/BankAccountVerificationRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class BankAccountVerificationRequest implements \JsonSerializable @@ -46,6 +47,22 @@ public function setBankAccountVerification(BankAccountVerification $bankAccountV $this->bankAccountVerification = $bankAccountVerification; } + /** + * Converts the BankAccountVerificationRequest object to a human-readable string representation. + * + * @return string The string representation of the BankAccountVerificationRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BankAccountVerificationRequest', + [ + 'bankAccountVerification' => $this->bankAccountVerification, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/BaseRefundError.php b/src/Models/BaseRefundError.php index 96491895..3478f759 100644 --- a/src/Models/BaseRefundError.php +++ b/src/Models/BaseRefundError.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class BaseRefundError implements \JsonSerializable @@ -41,6 +42,19 @@ public function setBase(?array $base): void $this->base = $base; } + /** + * Converts the BaseRefundError object to a human-readable string representation. + * + * @return string The string representation of the BaseRefundError object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BaseRefundError', + ['base' => $this->base, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/BaseStringError.php b/src/Models/BaseStringError.php index cf8fceb2..1f8c627c 100644 --- a/src/Models/BaseStringError.php +++ b/src/Models/BaseStringError.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -44,6 +45,19 @@ public function setBase(?array $base): void $this->base = $base; } + /** + * Converts the BaseStringError object to a human-readable string representation. + * + * @return string The string representation of the BaseStringError object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BaseStringError', + ['base' => $this->base, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/BatchJob.php b/src/Models/BatchJob.php index 8dbeebb9..7d7ff485 100644 --- a/src/Models/BatchJob.php +++ b/src/Models/BatchJob.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -165,6 +166,26 @@ public function setCompleted(?string $completed): void $this->completed = $completed; } + /** + * Converts the BatchJob object to a human-readable string representation. + * + * @return string The string representation of the BatchJob object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BatchJob', + [ + 'id' => $this->id, + 'finishedAt' => $this->getFinishedAt(), + 'rowCount' => $this->getRowCount(), + 'createdAt' => $this->getCreatedAt(), + 'completed' => $this->completed, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/BatchJobResponse.php b/src/Models/BatchJobResponse.php index 4d1acccc..dfe59823 100644 --- a/src/Models/BatchJobResponse.php +++ b/src/Models/BatchJobResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class BatchJobResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setBatchjob(BatchJob $batchjob): void $this->batchjob = $batchjob; } + /** + * Converts the BatchJobResponse object to a human-readable string representation. + * + * @return string The string representation of the BatchJobResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BatchJobResponse', + ['batchjob' => $this->batchjob, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/BillingManifest.php b/src/Models/BillingManifest.php index 752b7a53..76177657 100644 --- a/src/Models/BillingManifest.php +++ b/src/Models/BillingManifest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -261,6 +262,30 @@ public function setExistingBalanceInCents(?int $existingBalanceInCents): void $this->existingBalanceInCents = $existingBalanceInCents; } + /** + * Converts the BillingManifest object to a human-readable string representation. + * + * @return string The string representation of the BillingManifest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BillingManifest', + [ + 'lineItems' => $this->lineItems, + 'totalInCents' => $this->totalInCents, + 'totalDiscountInCents' => $this->totalDiscountInCents, + 'totalTaxInCents' => $this->totalTaxInCents, + 'subtotalInCents' => $this->subtotalInCents, + 'startDate' => $this->getStartDate(), + 'endDate' => $this->getEndDate(), + 'periodType' => $this->getPeriodType(), + 'existingBalanceInCents' => $this->existingBalanceInCents, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/BillingManifestItem.php b/src/Models/BillingManifestItem.php index a3cddf14..ff39cddb 100644 --- a/src/Models/BillingManifestItem.php +++ b/src/Models/BillingManifestItem.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class BillingManifestItem implements \JsonSerializable @@ -342,6 +343,35 @@ public function setPeriodRangeEnd(?string $periodRangeEnd): void $this->periodRangeEnd = $periodRangeEnd; } + /** + * Converts the BillingManifestItem object to a human-readable string representation. + * + * @return string The string representation of the BillingManifestItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BillingManifestItem', + [ + 'transactionType' => $this->transactionType, + 'kind' => $this->kind, + 'amountInCents' => $this->amountInCents, + 'memo' => $this->memo, + 'discountAmountInCents' => $this->discountAmountInCents, + 'taxableAmountInCents' => $this->taxableAmountInCents, + 'componentId' => $this->componentId, + 'componentHandle' => $this->componentHandle, + 'componentName' => $this->componentName, + 'productId' => $this->productId, + 'productHandle' => $this->productHandle, + 'productName' => $this->productName, + 'periodRangeStart' => $this->periodRangeStart, + 'periodRangeEnd' => $this->periodRangeEnd, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/BillingSchedule.php b/src/Models/BillingSchedule.php index e480b617..262a7141 100644 --- a/src/Models/BillingSchedule.php +++ b/src/Models/BillingSchedule.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -50,6 +51,19 @@ public function setInitialBillingAt(?\DateTime $initialBillingAt): void $this->initialBillingAt = $initialBillingAt; } + /** + * Converts the BillingSchedule object to a human-readable string representation. + * + * @return string The string representation of the BillingSchedule object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BillingSchedule', + ['initialBillingAt' => $this->initialBillingAt, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Breakouts.php b/src/Models/Breakouts.php index ce77ec37..42ecb07e 100644 --- a/src/Models/Breakouts.php +++ b/src/Models/Breakouts.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class Breakouts implements \JsonSerializable @@ -106,6 +107,25 @@ public function setUsageAmountFormatted(?string $usageAmountFormatted): void $this->usageAmountFormatted = $usageAmountFormatted; } + /** + * Converts the Breakouts object to a human-readable string representation. + * + * @return string The string representation of the Breakouts object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Breakouts', + [ + 'planAmountInCents' => $this->planAmountInCents, + 'planAmountFormatted' => $this->planAmountFormatted, + 'usageAmountInCents' => $this->usageAmountInCents, + 'usageAmountFormatted' => $this->usageAmountFormatted, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Builders/SiteBuilder.php b/src/Models/Builders/SiteBuilder.php index ac7235b1..4ac99569 100644 --- a/src/Models/Builders/SiteBuilder.php +++ b/src/Models/Builders/SiteBuilder.php @@ -119,6 +119,17 @@ public function relationshipInvoicingEnabled(?bool $value): self return $this; } + /** + * Sets schedule subscription cancellation enabled field. + * + * @param bool|null $value + */ + public function scheduleSubscriptionCancellationEnabled(?bool $value): self + { + $this->instance->setScheduleSubscriptionCancellationEnabled($value); + return $this; + } + /** * Sets customer hierarchy enabled field. * diff --git a/src/Models/BulkComponentsPricePointAssignment.php b/src/Models/BulkComponentsPricePointAssignment.php index d46f02b0..70b44d85 100644 --- a/src/Models/BulkComponentsPricePointAssignment.php +++ b/src/Models/BulkComponentsPricePointAssignment.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class BulkComponentsPricePointAssignment implements \JsonSerializable @@ -41,6 +42,19 @@ public function setComponents(?array $components): void $this->components = $components; } + /** + * Converts the BulkComponentsPricePointAssignment object to a human-readable string representation. + * + * @return string The string representation of the BulkComponentsPricePointAssignment object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BulkComponentsPricePointAssignment', + ['components' => $this->components, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/BulkCreateProductPricePointsRequest.php b/src/Models/BulkCreateProductPricePointsRequest.php index 6a6c23e4..07efb756 100644 --- a/src/Models/BulkCreateProductPricePointsRequest.php +++ b/src/Models/BulkCreateProductPricePointsRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class BulkCreateProductPricePointsRequest implements \JsonSerializable @@ -50,6 +51,19 @@ public function setPricePoints(array $pricePoints): void $this->pricePoints = $pricePoints; } + /** + * Converts the BulkCreateProductPricePointsRequest object to a human-readable string representation. + * + * @return string The string representation of the BulkCreateProductPricePointsRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BulkCreateProductPricePointsRequest', + ['pricePoints' => $this->pricePoints, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/BulkCreateProductPricePointsResponse.php b/src/Models/BulkCreateProductPricePointsResponse.php index e81d46db..7488b7a3 100644 --- a/src/Models/BulkCreateProductPricePointsResponse.php +++ b/src/Models/BulkCreateProductPricePointsResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class BulkCreateProductPricePointsResponse implements \JsonSerializable @@ -41,6 +42,19 @@ public function setPricePoints(?array $pricePoints): void $this->pricePoints = $pricePoints; } + /** + * Converts the BulkCreateProductPricePointsResponse object to a human-readable string representation. + * + * @return string The string representation of the BulkCreateProductPricePointsResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BulkCreateProductPricePointsResponse', + ['pricePoints' => $this->pricePoints, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/BulkCreateSegments.php b/src/Models/BulkCreateSegments.php index caf2a197..474505ff 100644 --- a/src/Models/BulkCreateSegments.php +++ b/src/Models/BulkCreateSegments.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class BulkCreateSegments implements \JsonSerializable @@ -41,6 +42,19 @@ public function setSegments(?array $segments): void $this->segments = $segments; } + /** + * Converts the BulkCreateSegments object to a human-readable string representation. + * + * @return string The string representation of the BulkCreateSegments object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BulkCreateSegments', + ['segments' => $this->segments, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/BulkUpdateSegments.php b/src/Models/BulkUpdateSegments.php index d9e8bc30..5302ed8b 100644 --- a/src/Models/BulkUpdateSegments.php +++ b/src/Models/BulkUpdateSegments.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class BulkUpdateSegments implements \JsonSerializable @@ -41,6 +42,19 @@ public function setSegments(?array $segments): void $this->segments = $segments; } + /** + * Converts the BulkUpdateSegments object to a human-readable string representation. + * + * @return string The string representation of the BulkUpdateSegments object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BulkUpdateSegments', + ['segments' => $this->segments, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/BulkUpdateSegmentsItem.php b/src/Models/BulkUpdateSegmentsItem.php index 809d7e38..85b2f58c 100644 --- a/src/Models/BulkUpdateSegmentsItem.php +++ b/src/Models/BulkUpdateSegmentsItem.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class BulkUpdateSegmentsItem implements \JsonSerializable @@ -109,6 +110,24 @@ public function setPrices(array $prices): void $this->prices = $prices; } + /** + * Converts the BulkUpdateSegmentsItem object to a human-readable string representation. + * + * @return string The string representation of the BulkUpdateSegmentsItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'BulkUpdateSegmentsItem', + [ + 'id' => $this->id, + 'pricingScheme' => $this->pricingScheme, + 'prices' => $this->prices, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CalendarBilling.php b/src/Models/CalendarBilling.php index c3cf1397..b597c56a 100644 --- a/src/Models/CalendarBilling.php +++ b/src/Models/CalendarBilling.php @@ -72,6 +72,23 @@ public function setCalendarBillingFirstCharge(?string $calendarBillingFirstCharg $this->calendarBillingFirstCharge = $calendarBillingFirstCharge; } + /** + * Converts the CalendarBilling object to a human-readable string representation. + * + * @return string The string representation of the CalendarBilling object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CalendarBilling', + [ + 'snapDay' => $this->snapDay, + 'calendarBillingFirstCharge' => $this->calendarBillingFirstCharge, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CancelGroupedSubscriptionsRequest.php b/src/Models/CancelGroupedSubscriptionsRequest.php index cf34397b..9cc49ca3 100644 --- a/src/Models/CancelGroupedSubscriptionsRequest.php +++ b/src/Models/CancelGroupedSubscriptionsRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CancelGroupedSubscriptionsRequest implements \JsonSerializable @@ -37,6 +38,22 @@ public function setChargeUnbilledUsage(?bool $chargeUnbilledUsage): void $this->chargeUnbilledUsage = $chargeUnbilledUsage; } + /** + * Converts the CancelGroupedSubscriptionsRequest object to a human-readable string representation. + * + * @return string The string representation of the CancelGroupedSubscriptionsRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CancelGroupedSubscriptionsRequest', + [ + 'chargeUnbilledUsage' => $this->chargeUnbilledUsage, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CancellationOptions.php b/src/Models/CancellationOptions.php index 47175bf3..be828e80 100644 --- a/src/Models/CancellationOptions.php +++ b/src/Models/CancellationOptions.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CancellationOptions implements \JsonSerializable @@ -66,6 +67,23 @@ public function setReasonCode(?string $reasonCode): void $this->reasonCode = $reasonCode; } + /** + * Converts the CancellationOptions object to a human-readable string representation. + * + * @return string The string representation of the CancellationOptions object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CancellationOptions', + [ + 'cancellationMessage' => $this->cancellationMessage, + 'reasonCode' => $this->reasonCode, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CancellationRequest.php b/src/Models/CancellationRequest.php index 76fb89a8..c9b28cc1 100644 --- a/src/Models/CancellationRequest.php +++ b/src/Models/CancellationRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CancellationRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setSubscription(CancellationOptions $subscription): void $this->subscription = $subscription; } + /** + * Converts the CancellationRequest object to a human-readable string representation. + * + * @return string The string representation of the CancellationRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CancellationRequest', + ['subscription' => $this->subscription, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ChangeChargebackStatusEvent.php b/src/Models/ChangeChargebackStatusEvent.php index 7d63bf07..b8fb1240 100644 --- a/src/Models/ChangeChargebackStatusEvent.php +++ b/src/Models/ChangeChargebackStatusEvent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -160,6 +161,26 @@ public function setEventData(ChangeChargebackStatusEventData $eventData): void $this->eventData = $eventData; } + /** + * Converts the ChangeChargebackStatusEvent object to a human-readable string representation. + * + * @return string The string representation of the ChangeChargebackStatusEvent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ChangeChargebackStatusEvent', + [ + 'id' => $this->id, + 'timestamp' => $this->timestamp, + 'invoice' => $this->invoice, + 'eventType' => $this->eventType, + 'eventData' => $this->eventData, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ChangeChargebackStatusEventData.php b/src/Models/ChangeChargebackStatusEventData.php index 688529b6..8465d403 100644 --- a/src/Models/ChangeChargebackStatusEventData.php +++ b/src/Models/ChangeChargebackStatusEventData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -50,6 +51,19 @@ public function setChargebackStatus(string $chargebackStatus): void $this->chargebackStatus = $chargebackStatus; } + /** + * Converts the ChangeChargebackStatusEventData object to a human-readable string representation. + * + * @return string The string representation of the ChangeChargebackStatusEventData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ChangeChargebackStatusEventData', + ['chargebackStatus' => $this->chargebackStatus, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ChangeInvoiceCollectionMethodEvent.php b/src/Models/ChangeInvoiceCollectionMethodEvent.php index 33531de0..3b8da441 100644 --- a/src/Models/ChangeInvoiceCollectionMethodEvent.php +++ b/src/Models/ChangeInvoiceCollectionMethodEvent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -160,6 +161,26 @@ public function setEventData(ChangeInvoiceCollectionMethodEventData $eventData): $this->eventData = $eventData; } + /** + * Converts the ChangeInvoiceCollectionMethodEvent object to a human-readable string representation. + * + * @return string The string representation of the ChangeInvoiceCollectionMethodEvent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ChangeInvoiceCollectionMethodEvent', + [ + 'id' => $this->id, + 'timestamp' => $this->timestamp, + 'invoice' => $this->invoice, + 'eventType' => $this->eventType, + 'eventData' => $this->eventData, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ChangeInvoiceCollectionMethodEventData.php b/src/Models/ChangeInvoiceCollectionMethodEventData.php index 342dfbe2..0dfbef27 100644 --- a/src/Models/ChangeInvoiceCollectionMethodEventData.php +++ b/src/Models/ChangeInvoiceCollectionMethodEventData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -79,6 +80,23 @@ public function setToCollectionMethod(string $toCollectionMethod): void $this->toCollectionMethod = $toCollectionMethod; } + /** + * Converts the ChangeInvoiceCollectionMethodEventData object to a human-readable string representation. + * + * @return string The string representation of the ChangeInvoiceCollectionMethodEventData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ChangeInvoiceCollectionMethodEventData', + [ + 'fromCollectionMethod' => $this->fromCollectionMethod, + 'toCollectionMethod' => $this->toCollectionMethod, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ChangeInvoiceStatusEvent.php b/src/Models/ChangeInvoiceStatusEvent.php index bad89500..2d42aa22 100644 --- a/src/Models/ChangeInvoiceStatusEvent.php +++ b/src/Models/ChangeInvoiceStatusEvent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -160,6 +161,26 @@ public function setEventData(ChangeInvoiceStatusEventData $eventData): void $this->eventData = $eventData; } + /** + * Converts the ChangeInvoiceStatusEvent object to a human-readable string representation. + * + * @return string The string representation of the ChangeInvoiceStatusEvent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ChangeInvoiceStatusEvent', + [ + 'id' => $this->id, + 'timestamp' => $this->timestamp, + 'invoice' => $this->invoice, + 'eventType' => $this->eventType, + 'eventData' => $this->eventData, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ChangeInvoiceStatusEventData.php b/src/Models/ChangeInvoiceStatusEventData.php index 8fd3fbc0..80b20898 100644 --- a/src/Models/ChangeInvoiceStatusEventData.php +++ b/src/Models/ChangeInvoiceStatusEventData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -161,6 +162,26 @@ public function setConsolidationLevel(?string $consolidationLevel): void $this->consolidationLevel = $consolidationLevel; } + /** + * Converts the ChangeInvoiceStatusEventData object to a human-readable string representation. + * + * @return string The string representation of the ChangeInvoiceStatusEventData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ChangeInvoiceStatusEventData', + [ + 'gatewayTransId' => $this->gatewayTransId, + 'amount' => $this->amount, + 'fromStatus' => $this->fromStatus, + 'toStatus' => $this->toStatus, + 'consolidationLevel' => $this->consolidationLevel, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ChargifyEBB.php b/src/Models/ChargifyEBB.php index f880a217..bf51d352 100644 --- a/src/Models/ChargifyEBB.php +++ b/src/Models/ChargifyEBB.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -187,6 +188,27 @@ public function setSubscriptionReference(?string $subscriptionReference): void $this->subscriptionReference = $subscriptionReference; } + /** + * Converts the ChargifyEBB object to a human-readable string representation. + * + * @return string The string representation of the ChargifyEBB object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ChargifyEBB', + [ + 'timestamp' => $this->timestamp, + 'id' => $this->id, + 'createdAt' => $this->createdAt, + 'uniquenessToken' => $this->uniquenessToken, + 'subscriptionId' => $this->subscriptionId, + 'subscriptionReference' => $this->subscriptionReference, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Component.php b/src/Models/Component.php index 8c7cc477..5b33a14e 100644 --- a/src/Models/Component.php +++ b/src/Models/Component.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -1105,6 +1106,55 @@ public function unsetIntervalUnit(): void $this->intervalUnit = []; } + /** + * Converts the Component object to a human-readable string representation. + * + * @return string The string representation of the Component object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Component', + [ + 'id' => $this->id, + 'name' => $this->name, + 'handle' => $this->getHandle(), + 'pricingScheme' => $this->getPricingScheme(), + 'unitName' => $this->unitName, + 'unitPrice' => $this->getUnitPrice(), + 'productFamilyId' => $this->productFamilyId, + 'productFamilyName' => $this->productFamilyName, + 'pricePerUnitInCents' => $this->getPricePerUnitInCents(), + 'kind' => $this->kind, + 'archived' => $this->archived, + 'taxable' => $this->taxable, + 'description' => $this->getDescription(), + 'defaultPricePointId' => $this->getDefaultPricePointId(), + 'overagePrices' => $this->getOveragePrices(), + 'prices' => $this->getPrices(), + 'pricePointCount' => $this->pricePointCount, + 'pricePointsUrl' => $this->getPricePointsUrl(), + 'defaultPricePointName' => $this->defaultPricePointName, + 'taxCode' => $this->getTaxCode(), + 'recurring' => $this->recurring, + 'upgradeCharge' => $this->getUpgradeCharge(), + 'downgradeCredit' => $this->getDowngradeCredit(), + 'createdAt' => $this->createdAt, + 'updatedAt' => $this->updatedAt, + 'archivedAt' => $this->getArchivedAt(), + 'hideDateRangeOnInvoice' => $this->hideDateRangeOnInvoice, + 'allowFractionalQuantities' => $this->allowFractionalQuantities, + 'itemCategory' => $this->getItemCategory(), + 'useSiteExchangeRate' => $this->getUseSiteExchangeRate(), + 'accountingCode' => $this->getAccountingCode(), + 'eventBasedBillingMetricId' => $this->eventBasedBillingMetricId, + 'interval' => $this->interval, + 'intervalUnit' => $this->getIntervalUnit(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ComponentAllocationChange.php b/src/Models/ComponentAllocationChange.php index 0a167ba8..5b3315d5 100644 --- a/src/Models/ComponentAllocationChange.php +++ b/src/Models/ComponentAllocationChange.php @@ -211,6 +211,28 @@ public function setAllocatedQuantity($allocatedQuantity): void $this->allocatedQuantity = $allocatedQuantity; } + /** + * Converts the ComponentAllocationChange object to a human-readable string representation. + * + * @return string The string representation of the ComponentAllocationChange object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ComponentAllocationChange', + [ + 'previousAllocation' => $this->previousAllocation, + 'newAllocation' => $this->newAllocation, + 'componentId' => $this->componentId, + 'componentHandle' => $this->componentHandle, + 'memo' => $this->memo, + 'allocationId' => $this->allocationId, + 'allocatedQuantity' => $this->allocatedQuantity, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ComponentAllocationErrorItem.php b/src/Models/ComponentAllocationErrorItem.php index 26f72ffc..a083bead 100644 --- a/src/Models/ComponentAllocationErrorItem.php +++ b/src/Models/ComponentAllocationErrorItem.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ComponentAllocationErrorItem implements \JsonSerializable @@ -106,6 +107,25 @@ public function setOn(?string $on): void $this->on = $on; } + /** + * Converts the ComponentAllocationErrorItem object to a human-readable string representation. + * + * @return string The string representation of the ComponentAllocationErrorItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ComponentAllocationErrorItem', + [ + 'componentId' => $this->componentId, + 'message' => $this->message, + 'kind' => $this->kind, + 'on' => $this->on, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ComponentCostData.php b/src/Models/ComponentCostData.php index 0221f40c..27234ee7 100644 --- a/src/Models/ComponentCostData.php +++ b/src/Models/ComponentCostData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ComponentCostData implements \JsonSerializable @@ -195,6 +196,28 @@ public function setTiers(?array $tiers): void $this->tiers = $tiers; } + /** + * Converts the ComponentCostData object to a human-readable string representation. + * + * @return string The string representation of the ComponentCostData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ComponentCostData', + [ + 'componentCodeId' => $this->getComponentCodeId(), + 'pricePointId' => $this->pricePointId, + 'productId' => $this->productId, + 'quantity' => $this->quantity, + 'amount' => $this->amount, + 'pricingScheme' => $this->pricingScheme, + 'tiers' => $this->tiers, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ComponentCostDataRateTier.php b/src/Models/ComponentCostDataRateTier.php index ded14f39..3d1d37f6 100644 --- a/src/Models/ComponentCostDataRateTier.php +++ b/src/Models/ComponentCostDataRateTier.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ComponentCostDataRateTier implements \JsonSerializable @@ -140,6 +141,26 @@ public function setAmount(?string $amount): void $this->amount = $amount; } + /** + * Converts the ComponentCostDataRateTier object to a human-readable string representation. + * + * @return string The string representation of the ComponentCostDataRateTier object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ComponentCostDataRateTier', + [ + 'startingQuantity' => $this->startingQuantity, + 'endingQuantity' => $this->getEndingQuantity(), + 'quantity' => $this->quantity, + 'unitPrice' => $this->unitPrice, + 'amount' => $this->amount, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ComponentCurrencyPrice.php b/src/Models/ComponentCurrencyPrice.php index 09e68357..d0461771 100644 --- a/src/Models/ComponentCurrencyPrice.php +++ b/src/Models/ComponentCurrencyPrice.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ComponentCurrencyPrice implements \JsonSerializable @@ -152,6 +153,27 @@ public function setPricePointId(?int $pricePointId): void $this->pricePointId = $pricePointId; } + /** + * Converts the ComponentCurrencyPrice object to a human-readable string representation. + * + * @return string The string representation of the ComponentCurrencyPrice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ComponentCurrencyPrice', + [ + 'id' => $this->id, + 'currency' => $this->currency, + 'price' => $this->price, + 'formattedPrice' => $this->formattedPrice, + 'priceId' => $this->priceId, + 'pricePointId' => $this->pricePointId, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ComponentCurrencyPricesResponse.php b/src/Models/ComponentCurrencyPricesResponse.php index 3e6233e9..08904c0b 100644 --- a/src/Models/ComponentCurrencyPricesResponse.php +++ b/src/Models/ComponentCurrencyPricesResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ComponentCurrencyPricesResponse implements \JsonSerializable @@ -50,6 +51,19 @@ public function setCurrencyPrices(array $currencyPrices): void $this->currencyPrices = $currencyPrices; } + /** + * Converts the ComponentCurrencyPricesResponse object to a human-readable string representation. + * + * @return string The string representation of the ComponentCurrencyPricesResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ComponentCurrencyPricesResponse', + ['currencyPrices' => $this->currencyPrices, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ComponentCustomPrice.php b/src/Models/ComponentCustomPrice.php index 7fcfea7c..08911ce9 100644 --- a/src/Models/ComponentCustomPrice.php +++ b/src/Models/ComponentCustomPrice.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -176,6 +177,26 @@ public function setPrices(array $prices): void $this->prices = $prices; } + /** + * Converts the ComponentCustomPrice object to a human-readable string representation. + * + * @return string The string representation of the ComponentCustomPrice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ComponentCustomPrice', + [ + 'taxIncluded' => $this->taxIncluded, + 'pricingScheme' => $this->pricingScheme, + 'interval' => $this->interval, + 'intervalUnit' => $this->getIntervalUnit(), + 'prices' => $this->prices, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ComponentPrice.php b/src/Models/ComponentPrice.php index c607b052..3ff20237 100644 --- a/src/Models/ComponentPrice.php +++ b/src/Models/ComponentPrice.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ComponentPrice implements \JsonSerializable @@ -220,6 +221,29 @@ public function unsetSegmentId(): void $this->segmentId = []; } + /** + * Converts the ComponentPrice object to a human-readable string representation. + * + * @return string The string representation of the ComponentPrice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ComponentPrice', + [ + 'id' => $this->id, + 'componentId' => $this->componentId, + 'startingQuantity' => $this->startingQuantity, + 'endingQuantity' => $this->getEndingQuantity(), + 'unitPrice' => $this->unitPrice, + 'pricePointId' => $this->pricePointId, + 'formattedUnitPrice' => $this->formattedUnitPrice, + 'segmentId' => $this->getSegmentId(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ComponentPricePoint.php b/src/Models/ComponentPricePoint.php index 2599a16c..66c328f2 100644 --- a/src/Models/ComponentPricePoint.php +++ b/src/Models/ComponentPricePoint.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -699,6 +700,44 @@ public function unsetExpirationIntervalUnit(): void $this->expirationIntervalUnit = []; } + /** + * Converts the ComponentPricePoint object to a human-readable string representation. + * + * @return string The string representation of the ComponentPricePoint object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ComponentPricePoint', + [ + 'id' => $this->id, + 'type' => $this->type, + 'default' => $this->default, + 'name' => $this->name, + 'pricingScheme' => $this->pricingScheme, + 'componentId' => $this->componentId, + 'handle' => $this->getHandle(), + 'archivedAt' => $this->getArchivedAt(), + 'createdAt' => $this->createdAt, + 'updatedAt' => $this->updatedAt, + 'prices' => $this->prices, + 'useSiteExchangeRate' => $this->useSiteExchangeRate, + 'subscriptionId' => $this->subscriptionId, + 'taxIncluded' => $this->taxIncluded, + 'interval' => $this->getInterval(), + 'intervalUnit' => $this->getIntervalUnit(), + 'currencyPrices' => $this->currencyPrices, + 'overagePrices' => $this->overagePrices, + 'overagePricingScheme' => $this->overagePricingScheme, + 'renewPrepaidAllocation' => $this->renewPrepaidAllocation, + 'rolloverPrepaidRemainder' => $this->rolloverPrepaidRemainder, + 'expirationInterval' => $this->getExpirationInterval(), + 'expirationIntervalUnit' => $this->getExpirationIntervalUnit(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ComponentPricePointAssignment.php b/src/Models/ComponentPricePointAssignment.php index 4975bebb..77c82d9d 100644 --- a/src/Models/ComponentPricePointAssignment.php +++ b/src/Models/ComponentPricePointAssignment.php @@ -66,6 +66,23 @@ public function setPricePoint($pricePoint): void $this->pricePoint = $pricePoint; } + /** + * Converts the ComponentPricePointAssignment object to a human-readable string representation. + * + * @return string The string representation of the ComponentPricePointAssignment object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ComponentPricePointAssignment', + [ + 'componentId' => $this->componentId, + 'pricePoint' => $this->pricePoint, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ComponentPricePointErrorItem.php b/src/Models/ComponentPricePointErrorItem.php index c218c83a..7f1beb17 100644 --- a/src/Models/ComponentPricePointErrorItem.php +++ b/src/Models/ComponentPricePointErrorItem.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ComponentPricePointErrorItem implements \JsonSerializable @@ -83,6 +84,24 @@ public function setPricePoint(?int $pricePoint): void $this->pricePoint = $pricePoint; } + /** + * Converts the ComponentPricePointErrorItem object to a human-readable string representation. + * + * @return string The string representation of the ComponentPricePointErrorItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ComponentPricePointErrorItem', + [ + 'componentId' => $this->componentId, + 'message' => $this->message, + 'pricePoint' => $this->pricePoint, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ComponentPricePointItem.php b/src/Models/ComponentPricePointItem.php index 71f86968..687c0dc9 100644 --- a/src/Models/ComponentPricePointItem.php +++ b/src/Models/ComponentPricePointItem.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ComponentPricePointItem implements \JsonSerializable @@ -185,6 +186,27 @@ public function setPrices(?array $prices): void $this->prices = $prices; } + /** + * Converts the ComponentPricePointItem object to a human-readable string representation. + * + * @return string The string representation of the ComponentPricePointItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ComponentPricePointItem', + [ + 'name' => $this->name, + 'handle' => $this->handle, + 'pricingScheme' => $this->pricingScheme, + 'interval' => $this->interval, + 'intervalUnit' => $this->getIntervalUnit(), + 'prices' => $this->prices, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ComponentPricePointResponse.php b/src/Models/ComponentPricePointResponse.php index 00c8139e..d47b4c75 100644 --- a/src/Models/ComponentPricePointResponse.php +++ b/src/Models/ComponentPricePointResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ComponentPricePointResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setPricePoint(ComponentPricePoint $pricePoint): void $this->pricePoint = $pricePoint; } + /** + * Converts the ComponentPricePointResponse object to a human-readable string representation. + * + * @return string The string representation of the ComponentPricePointResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ComponentPricePointResponse', + ['pricePoint' => $this->pricePoint, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ComponentPricePointsResponse.php b/src/Models/ComponentPricePointsResponse.php index df458f33..c672619a 100644 --- a/src/Models/ComponentPricePointsResponse.php +++ b/src/Models/ComponentPricePointsResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ComponentPricePointsResponse implements \JsonSerializable @@ -64,6 +65,23 @@ public function setMeta(?ListPublicKeysMeta $meta): void $this->meta = $meta; } + /** + * Converts the ComponentPricePointsResponse object to a human-readable string representation. + * + * @return string The string representation of the ComponentPricePointsResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ComponentPricePointsResponse', + [ + 'pricePoints' => $this->pricePoints, + 'meta' => $this->meta, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ComponentResponse.php b/src/Models/ComponentResponse.php index 0421d52c..ae706185 100644 --- a/src/Models/ComponentResponse.php +++ b/src/Models/ComponentResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ComponentResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setComponent(Component $component): void $this->component = $component; } + /** + * Converts the ComponentResponse object to a human-readable string representation. + * + * @return string The string representation of the ComponentResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ComponentResponse', + ['component' => $this->component, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ConsolidatedInvoice.php b/src/Models/ConsolidatedInvoice.php index c800fcb8..7d457240 100644 --- a/src/Models/ConsolidatedInvoice.php +++ b/src/Models/ConsolidatedInvoice.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ConsolidatedInvoice implements \JsonSerializable @@ -41,6 +42,19 @@ public function setInvoices(?array $invoices): void $this->invoices = $invoices; } + /** + * Converts the ConsolidatedInvoice object to a human-readable string representation. + * + * @return string The string representation of the ConsolidatedInvoice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ConsolidatedInvoice', + ['invoices' => $this->invoices, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CountResponse.php b/src/Models/CountResponse.php index eed4a16b..7f4dae0e 100644 --- a/src/Models/CountResponse.php +++ b/src/Models/CountResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CountResponse implements \JsonSerializable @@ -37,6 +38,19 @@ public function setCount(?int $count): void $this->count = $count; } + /** + * Converts the CountResponse object to a human-readable string representation. + * + * @return string The string representation of the CountResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CountResponse', + ['count' => $this->count, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Coupon.php b/src/Models/Coupon.php index fea932ed..9ae10552 100644 --- a/src/Models/Coupon.php +++ b/src/Models/Coupon.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -900,6 +901,52 @@ public function setCurrencyPrices(?array $currencyPrices): void $this->currencyPrices = $currencyPrices; } + /** + * Converts the Coupon object to a human-readable string representation. + * + * @return string The string representation of the Coupon object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Coupon', + [ + 'id' => $this->id, + 'name' => $this->name, + 'code' => $this->code, + 'description' => $this->description, + 'amount' => $this->getAmount(), + 'amountInCents' => $this->getAmountInCents(), + 'productFamilyId' => $this->productFamilyId, + 'productFamilyName' => $this->getProductFamilyName(), + 'startDate' => $this->startDate, + 'endDate' => $this->getEndDate(), + 'percentage' => $this->getPercentage(), + 'recurring' => $this->recurring, + 'recurringScheme' => $this->recurringScheme, + 'durationPeriodCount' => $this->getDurationPeriodCount(), + 'durationInterval' => $this->getDurationInterval(), + 'durationIntervalUnit' => $this->getDurationIntervalUnit(), + 'durationIntervalSpan' => $this->getDurationIntervalSpan(), + 'allowNegativeBalance' => $this->allowNegativeBalance, + 'archivedAt' => $this->getArchivedAt(), + 'conversionLimit' => $this->getConversionLimit(), + 'stackable' => $this->stackable, + 'compoundingStrategy' => $this->getCompoundingStrategy(), + 'useSiteExchangeRate' => $this->useSiteExchangeRate, + 'createdAt' => $this->createdAt, + 'updatedAt' => $this->updatedAt, + 'discountType' => $this->discountType, + 'excludeMidPeriodAllocations' => $this->excludeMidPeriodAllocations, + 'applyOnCancelAtEndOfPeriod' => $this->applyOnCancelAtEndOfPeriod, + 'applyOnSubscriptionExpiration' => $this->applyOnSubscriptionExpiration, + 'couponRestrictions' => $this->couponRestrictions, + 'currencyPrices' => $this->currencyPrices, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CouponCurrency.php b/src/Models/CouponCurrency.php index 9cb18796..44abf488 100644 --- a/src/Models/CouponCurrency.php +++ b/src/Models/CouponCurrency.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CouponCurrency implements \JsonSerializable @@ -128,6 +129,25 @@ public function setCouponId(?int $couponId): void $this->couponId = $couponId; } + /** + * Converts the CouponCurrency object to a human-readable string representation. + * + * @return string The string representation of the CouponCurrency object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CouponCurrency', + [ + 'id' => $this->getId(), + 'currency' => $this->currency, + 'price' => $this->getPrice(), + 'couponId' => $this->couponId, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CouponCurrencyRequest.php b/src/Models/CouponCurrencyRequest.php index 5130e563..a1de4dda 100644 --- a/src/Models/CouponCurrencyRequest.php +++ b/src/Models/CouponCurrencyRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CouponCurrencyRequest implements \JsonSerializable @@ -50,6 +51,19 @@ public function setCurrencyPrices(array $currencyPrices): void $this->currencyPrices = $currencyPrices; } + /** + * Converts the CouponCurrencyRequest object to a human-readable string representation. + * + * @return string The string representation of the CouponCurrencyRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CouponCurrencyRequest', + ['currencyPrices' => $this->currencyPrices, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CouponCurrencyResponse.php b/src/Models/CouponCurrencyResponse.php index ef4b5d04..8aecc940 100644 --- a/src/Models/CouponCurrencyResponse.php +++ b/src/Models/CouponCurrencyResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CouponCurrencyResponse implements \JsonSerializable @@ -41,6 +42,19 @@ public function setCurrencyPrices(?array $currencyPrices): void $this->currencyPrices = $currencyPrices; } + /** + * Converts the CouponCurrencyResponse object to a human-readable string representation. + * + * @return string The string representation of the CouponCurrencyResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CouponCurrencyResponse', + ['currencyPrices' => $this->currencyPrices, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CouponPayload.php b/src/Models/CouponPayload.php index 2640b532..5e25ad92 100644 --- a/src/Models/CouponPayload.php +++ b/src/Models/CouponPayload.php @@ -385,6 +385,35 @@ public function setApplyOnSubscriptionExpiration(?bool $applyOnSubscriptionExpir $this->applyOnSubscriptionExpiration = $applyOnSubscriptionExpiration; } + /** + * Converts the CouponPayload object to a human-readable string representation. + * + * @return string The string representation of the CouponPayload object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CouponPayload', + [ + 'name' => $this->name, + 'code' => $this->code, + 'description' => $this->description, + 'percentage' => $this->percentage, + 'amountInCents' => $this->amountInCents, + 'allowNegativeBalance' => $this->allowNegativeBalance, + 'recurring' => $this->recurring, + 'endDate' => $this->endDate, + 'productFamilyId' => $this->productFamilyId, + 'stackable' => $this->stackable, + 'compoundingStrategy' => $this->compoundingStrategy, + 'excludeMidPeriodAllocations' => $this->excludeMidPeriodAllocations, + 'applyOnCancelAtEndOfPeriod' => $this->applyOnCancelAtEndOfPeriod, + 'applyOnSubscriptionExpiration' => $this->applyOnSubscriptionExpiration, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CouponRequest.php b/src/Models/CouponRequest.php index ecf38241..485adb66 100644 --- a/src/Models/CouponRequest.php +++ b/src/Models/CouponRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CouponRequest implements \JsonSerializable @@ -99,6 +100,24 @@ public function setRestrictedComponents(?array $restrictedComponents): void $this->restrictedComponents = $restrictedComponents; } + /** + * Converts the CouponRequest object to a human-readable string representation. + * + * @return string The string representation of the CouponRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CouponRequest', + [ + 'coupon' => $this->coupon, + 'restrictedProducts' => $this->restrictedProducts, + 'restrictedComponents' => $this->restrictedComponents, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CouponResponse.php b/src/Models/CouponResponse.php index f98ac240..56ab5d9d 100644 --- a/src/Models/CouponResponse.php +++ b/src/Models/CouponResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CouponResponse implements \JsonSerializable @@ -37,6 +38,19 @@ public function setCoupon(?Coupon $coupon): void $this->coupon = $coupon; } + /** + * Converts the CouponResponse object to a human-readable string representation. + * + * @return string The string representation of the CouponResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CouponResponse', + ['coupon' => $this->coupon, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CouponRestriction.php b/src/Models/CouponRestriction.php index 957490b1..5236da04 100644 --- a/src/Models/CouponRestriction.php +++ b/src/Models/CouponRestriction.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CouponRestriction implements \JsonSerializable @@ -141,6 +142,26 @@ public function unsetHandle(): void $this->handle = []; } + /** + * Converts the CouponRestriction object to a human-readable string representation. + * + * @return string The string representation of the CouponRestriction object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CouponRestriction', + [ + 'id' => $this->id, + 'itemType' => $this->itemType, + 'itemId' => $this->itemId, + 'name' => $this->name, + 'handle' => $this->getHandle(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CouponSubcodes.php b/src/Models/CouponSubcodes.php index b2fcc437..5995f19d 100644 --- a/src/Models/CouponSubcodes.php +++ b/src/Models/CouponSubcodes.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CouponSubcodes implements \JsonSerializable @@ -41,6 +42,19 @@ public function setCodes(?array $codes): void $this->codes = $codes; } + /** + * Converts the CouponSubcodes object to a human-readable string representation. + * + * @return string The string representation of the CouponSubcodes object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CouponSubcodes', + ['codes' => $this->codes, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CouponSubcodesResponse.php b/src/Models/CouponSubcodesResponse.php index 2ac4c07a..4373ab31 100644 --- a/src/Models/CouponSubcodesResponse.php +++ b/src/Models/CouponSubcodesResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CouponSubcodesResponse implements \JsonSerializable @@ -95,6 +96,24 @@ public function setInvalidCodes(?array $invalidCodes): void $this->invalidCodes = $invalidCodes; } + /** + * Converts the CouponSubcodesResponse object to a human-readable string representation. + * + * @return string The string representation of the CouponSubcodesResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CouponSubcodesResponse', + [ + 'createdCodes' => $this->createdCodes, + 'duplicateCodes' => $this->duplicateCodes, + 'invalidCodes' => $this->invalidCodes, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CouponUsage.php b/src/Models/CouponUsage.php index 956e2f65..7cf33ca8 100644 --- a/src/Models/CouponUsage.php +++ b/src/Models/CouponUsage.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CouponUsage implements \JsonSerializable @@ -225,6 +226,28 @@ public function setRevenueInCents(?int $revenueInCents): void $this->revenueInCents = $revenueInCents; } + /** + * Converts the CouponUsage object to a human-readable string representation. + * + * @return string The string representation of the CouponUsage object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CouponUsage', + [ + 'id' => $this->id, + 'name' => $this->name, + 'signups' => $this->signups, + 'savings' => $this->getSavings(), + 'savingsInCents' => $this->getSavingsInCents(), + 'revenue' => $this->getRevenue(), + 'revenueInCents' => $this->revenueInCents, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateAllocation.php b/src/Models/CreateAllocation.php index 6b4a0cef..e3ed137b 100644 --- a/src/Models/CreateAllocation.php +++ b/src/Models/CreateAllocation.php @@ -371,6 +371,32 @@ public function setBillingSchedule(?BillingSchedule $billingSchedule): void $this->billingSchedule = $billingSchedule; } + /** + * Converts the CreateAllocation object to a human-readable string representation. + * + * @return string The string representation of the CreateAllocation object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateAllocation', + [ + 'quantity' => $this->quantity, + 'componentId' => $this->componentId, + 'memo' => $this->memo, + 'prorationDowngradeScheme' => $this->prorationDowngradeScheme, + 'prorationUpgradeScheme' => $this->prorationUpgradeScheme, + 'accrueCharge' => $this->accrueCharge, + 'downgradeCredit' => $this->getDowngradeCredit(), + 'upgradeCharge' => $this->getUpgradeCharge(), + 'initiateDunning' => $this->initiateDunning, + 'pricePointId' => $this->getPricePointId(), + 'billingSchedule' => $this->billingSchedule, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateAllocationRequest.php b/src/Models/CreateAllocationRequest.php index 88e06a7f..cffd4edf 100644 --- a/src/Models/CreateAllocationRequest.php +++ b/src/Models/CreateAllocationRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateAllocationRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setAllocation(CreateAllocation $allocation): void $this->allocation = $allocation; } + /** + * Converts the CreateAllocationRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateAllocationRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateAllocationRequest', + ['allocation' => $this->allocation, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateComponentPricePoint.php b/src/Models/CreateComponentPricePoint.php index ab807cf9..ec60ccad 100644 --- a/src/Models/CreateComponentPricePoint.php +++ b/src/Models/CreateComponentPricePoint.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateComponentPricePoint implements \JsonSerializable @@ -254,6 +255,29 @@ public function unsetIntervalUnit(): void $this->intervalUnit = []; } + /** + * Converts the CreateComponentPricePoint object to a human-readable string representation. + * + * @return string The string representation of the CreateComponentPricePoint object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateComponentPricePoint', + [ + 'name' => $this->name, + 'handle' => $this->handle, + 'pricingScheme' => $this->pricingScheme, + 'prices' => $this->prices, + 'useSiteExchangeRate' => $this->useSiteExchangeRate, + 'taxIncluded' => $this->taxIncluded, + 'interval' => $this->interval, + 'intervalUnit' => $this->getIntervalUnit(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateComponentPricePointRequest.php b/src/Models/CreateComponentPricePointRequest.php index 7bf20712..2e953e9a 100644 --- a/src/Models/CreateComponentPricePointRequest.php +++ b/src/Models/CreateComponentPricePointRequest.php @@ -52,6 +52,19 @@ public function setPricePoint($pricePoint): void $this->pricePoint = $pricePoint; } + /** + * Converts the CreateComponentPricePointRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateComponentPricePointRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateComponentPricePointRequest', + ['pricePoint' => $this->pricePoint, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateComponentPricePointsRequest.php b/src/Models/CreateComponentPricePointsRequest.php index 62718acd..ab214e05 100644 --- a/src/Models/CreateComponentPricePointsRequest.php +++ b/src/Models/CreateComponentPricePointsRequest.php @@ -52,6 +52,19 @@ public function setPricePoints(array $pricePoints): void $this->pricePoints = $pricePoints; } + /** + * Converts the CreateComponentPricePointsRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateComponentPricePointsRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateComponentPricePointsRequest', + ['pricePoints' => $this->pricePoints, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateCreditNoteEvent.php b/src/Models/CreateCreditNoteEvent.php index 0b9f3df9..d135e94d 100644 --- a/src/Models/CreateCreditNoteEvent.php +++ b/src/Models/CreateCreditNoteEvent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -160,6 +161,26 @@ public function setEventData(CreditNote $eventData): void $this->eventData = $eventData; } + /** + * Converts the CreateCreditNoteEvent object to a human-readable string representation. + * + * @return string The string representation of the CreateCreditNoteEvent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateCreditNoteEvent', + [ + 'id' => $this->id, + 'timestamp' => $this->timestamp, + 'invoice' => $this->invoice, + 'eventType' => $this->eventType, + 'eventData' => $this->eventData, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateCurrencyPrice.php b/src/Models/CreateCurrencyPrice.php index 92b91deb..c532cd48 100644 --- a/src/Models/CreateCurrencyPrice.php +++ b/src/Models/CreateCurrencyPrice.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateCurrencyPrice implements \JsonSerializable @@ -89,6 +90,24 @@ public function setPriceId(?int $priceId): void $this->priceId = $priceId; } + /** + * Converts the CreateCurrencyPrice object to a human-readable string representation. + * + * @return string The string representation of the CreateCurrencyPrice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateCurrencyPrice', + [ + 'currency' => $this->currency, + 'price' => $this->price, + 'priceId' => $this->priceId, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateCurrencyPricesRequest.php b/src/Models/CreateCurrencyPricesRequest.php index 5db13eda..392e2aee 100644 --- a/src/Models/CreateCurrencyPricesRequest.php +++ b/src/Models/CreateCurrencyPricesRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateCurrencyPricesRequest implements \JsonSerializable @@ -50,6 +51,19 @@ public function setCurrencyPrices(array $currencyPrices): void $this->currencyPrices = $currencyPrices; } + /** + * Converts the CreateCurrencyPricesRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateCurrencyPricesRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateCurrencyPricesRequest', + ['currencyPrices' => $this->currencyPrices, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateCustomer.php b/src/Models/CreateCustomer.php index 7b72f2d5..0aa566b5 100644 --- a/src/Models/CreateCustomer.php +++ b/src/Models/CreateCustomer.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateCustomer implements \JsonSerializable @@ -496,6 +497,40 @@ public function unsetSalesforceId(): void $this->salesforceId = []; } + /** + * Converts the CreateCustomer object to a human-readable string representation. + * + * @return string The string representation of the CreateCustomer object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateCustomer', + [ + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'email' => $this->email, + 'ccEmails' => $this->ccEmails, + 'organization' => $this->organization, + 'reference' => $this->reference, + 'address' => $this->address, + 'address2' => $this->address2, + 'city' => $this->city, + 'state' => $this->state, + 'zip' => $this->zip, + 'country' => $this->country, + 'phone' => $this->phone, + 'locale' => $this->locale, + 'vatNumber' => $this->vatNumber, + 'taxExempt' => $this->taxExempt, + 'taxExemptReason' => $this->taxExemptReason, + 'parentId' => $this->getParentId(), + 'salesforceId' => $this->getSalesforceId(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateCustomerRequest.php b/src/Models/CreateCustomerRequest.php index dcfdef9f..57dac048 100644 --- a/src/Models/CreateCustomerRequest.php +++ b/src/Models/CreateCustomerRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateCustomerRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setCustomer(CreateCustomer $customer): void $this->customer = $customer; } + /** + * Converts the CreateCustomerRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateCustomerRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateCustomerRequest', + ['customer' => $this->customer, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateDebitNoteEvent.php b/src/Models/CreateDebitNoteEvent.php index d83f3718..851d9601 100644 --- a/src/Models/CreateDebitNoteEvent.php +++ b/src/Models/CreateDebitNoteEvent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -160,6 +161,26 @@ public function setEventData(DebitNote $eventData): void $this->eventData = $eventData; } + /** + * Converts the CreateDebitNoteEvent object to a human-readable string representation. + * + * @return string The string representation of the CreateDebitNoteEvent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateDebitNoteEvent', + [ + 'id' => $this->id, + 'timestamp' => $this->timestamp, + 'invoice' => $this->invoice, + 'eventType' => $this->eventType, + 'eventData' => $this->eventData, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateEBBComponent.php b/src/Models/CreateEBBComponent.php index 40853071..2e75819c 100644 --- a/src/Models/CreateEBBComponent.php +++ b/src/Models/CreateEBBComponent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateEBBComponent implements \JsonSerializable @@ -46,6 +47,22 @@ public function setEventBasedComponent(EBBComponent $eventBasedComponent): void $this->eventBasedComponent = $eventBasedComponent; } + /** + * Converts the CreateEBBComponent object to a human-readable string representation. + * + * @return string The string representation of the CreateEBBComponent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateEBBComponent', + [ + 'eventBasedComponent' => $this->eventBasedComponent, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateInvoice.php b/src/Models/CreateInvoice.php index 75378694..f041316b 100644 --- a/src/Models/CreateInvoice.php +++ b/src/Models/CreateInvoice.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -269,6 +270,31 @@ public function setStatus(?string $status): void $this->status = $status; } + /** + * Converts the CreateInvoice object to a human-readable string representation. + * + * @return string The string representation of the CreateInvoice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateInvoice', + [ + 'lineItems' => $this->lineItems, + 'issueDate' => $this->issueDate, + 'netTerms' => $this->netTerms, + 'paymentInstructions' => $this->paymentInstructions, + 'memo' => $this->memo, + 'sellerAddress' => $this->sellerAddress, + 'billingAddress' => $this->billingAddress, + 'shippingAddress' => $this->shippingAddress, + 'coupons' => $this->coupons, + 'status' => $this->status, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateInvoiceAddress.php b/src/Models/CreateInvoiceAddress.php index c24c8ada..cf17ca01 100644 --- a/src/Models/CreateInvoiceAddress.php +++ b/src/Models/CreateInvoiceAddress.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -224,6 +225,30 @@ public function setCountry(?string $country): void $this->country = $country; } + /** + * Converts the CreateInvoiceAddress object to a human-readable string representation. + * + * @return string The string representation of the CreateInvoiceAddress object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateInvoiceAddress', + [ + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'phone' => $this->phone, + 'address' => $this->address, + 'address2' => $this->address2, + 'city' => $this->city, + 'state' => $this->state, + 'zip' => $this->zip, + 'country' => $this->country, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateInvoiceCoupon.php b/src/Models/CreateInvoiceCoupon.php index bae4284f..fd6ff532 100644 --- a/src/Models/CreateInvoiceCoupon.php +++ b/src/Models/CreateInvoiceCoupon.php @@ -177,6 +177,27 @@ public function setCompoundingStrategy(?string $compoundingStrategy): void $this->compoundingStrategy = $compoundingStrategy; } + /** + * Converts the CreateInvoiceCoupon object to a human-readable string representation. + * + * @return string The string representation of the CreateInvoiceCoupon object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateInvoiceCoupon', + [ + 'code' => $this->code, + 'percentage' => $this->percentage, + 'amount' => $this->amount, + 'description' => $this->description, + 'productFamilyId' => $this->productFamilyId, + 'compoundingStrategy' => $this->compoundingStrategy, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateInvoiceItem.php b/src/Models/CreateInvoiceItem.php index 39e73c3c..7fcf4aa0 100644 --- a/src/Models/CreateInvoiceItem.php +++ b/src/Models/CreateInvoiceItem.php @@ -345,6 +345,33 @@ public function setDescription(?string $description): void $this->description = $description; } + /** + * Converts the CreateInvoiceItem object to a human-readable string representation. + * + * @return string The string representation of the CreateInvoiceItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateInvoiceItem', + [ + 'title' => $this->title, + 'quantity' => $this->quantity, + 'unitPrice' => $this->unitPrice, + 'taxable' => $this->taxable, + 'taxCode' => $this->taxCode, + 'periodRangeStart' => $this->periodRangeStart, + 'periodRangeEnd' => $this->periodRangeEnd, + 'productId' => $this->productId, + 'componentId' => $this->componentId, + 'pricePointId' => $this->pricePointId, + 'productPricePointId' => $this->productPricePointId, + 'description' => $this->description, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateInvoicePayment.php b/src/Models/CreateInvoicePayment.php index 66da4533..08a0d341 100644 --- a/src/Models/CreateInvoicePayment.php +++ b/src/Models/CreateInvoicePayment.php @@ -179,6 +179,27 @@ public function setReceivedOn(?\DateTime $receivedOn): void $this->receivedOn = $receivedOn; } + /** + * Converts the CreateInvoicePayment object to a human-readable string representation. + * + * @return string The string representation of the CreateInvoicePayment object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateInvoicePayment', + [ + 'amount' => $this->amount, + 'memo' => $this->memo, + 'method' => $this->method, + 'details' => $this->details, + 'paymentProfileId' => $this->paymentProfileId, + 'receivedOn' => $this->receivedOn, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateInvoicePaymentApplication.php b/src/Models/CreateInvoicePaymentApplication.php index c2c63451..a3c93e84 100644 --- a/src/Models/CreateInvoicePaymentApplication.php +++ b/src/Models/CreateInvoicePaymentApplication.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateInvoicePaymentApplication implements \JsonSerializable @@ -76,6 +77,23 @@ public function setAmount(string $amount): void $this->amount = $amount; } + /** + * Converts the CreateInvoicePaymentApplication object to a human-readable string representation. + * + * @return string The string representation of the CreateInvoicePaymentApplication object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateInvoicePaymentApplication', + [ + 'invoiceUid' => $this->invoiceUid, + 'amount' => $this->amount, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateInvoicePaymentRequest.php b/src/Models/CreateInvoicePaymentRequest.php index c525a74a..9d50d76a 100644 --- a/src/Models/CreateInvoicePaymentRequest.php +++ b/src/Models/CreateInvoicePaymentRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateInvoicePaymentRequest implements \JsonSerializable @@ -72,6 +73,23 @@ public function setType(?string $type): void $this->type = $type; } + /** + * Converts the CreateInvoicePaymentRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateInvoicePaymentRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateInvoicePaymentRequest', + [ + 'payment' => $this->payment, + 'type' => $this->type, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateInvoiceRequest.php b/src/Models/CreateInvoiceRequest.php index 724c24ce..2baa50ac 100644 --- a/src/Models/CreateInvoiceRequest.php +++ b/src/Models/CreateInvoiceRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateInvoiceRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setInvoice(CreateInvoice $invoice): void $this->invoice = $invoice; } + /** + * Converts the CreateInvoiceRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateInvoiceRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateInvoiceRequest', + ['invoice' => $this->invoice, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateMetadata.php b/src/Models/CreateMetadata.php index 1147bd35..fee800c1 100644 --- a/src/Models/CreateMetadata.php +++ b/src/Models/CreateMetadata.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateMetadata implements \JsonSerializable @@ -60,6 +61,19 @@ public function setValue(?string $value): void $this->value = $value; } + /** + * Converts the CreateMetadata object to a human-readable string representation. + * + * @return string The string representation of the CreateMetadata object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateMetadata', + ['name' => $this->name, 'value' => $this->value, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateMetadataRequest.php b/src/Models/CreateMetadataRequest.php index 34180ac3..233de849 100644 --- a/src/Models/CreateMetadataRequest.php +++ b/src/Models/CreateMetadataRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateMetadataRequest implements \JsonSerializable @@ -50,6 +51,19 @@ public function setMetadata(array $metadata): void $this->metadata = $metadata; } + /** + * Converts the CreateMetadataRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateMetadataRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateMetadataRequest', + ['metadata' => $this->metadata, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateMetafield.php b/src/Models/CreateMetafield.php index 27e84305..fc913db3 100644 --- a/src/Models/CreateMetafield.php +++ b/src/Models/CreateMetafield.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateMetafield implements \JsonSerializable @@ -125,6 +126,25 @@ public function setEnum(?array $enum): void $this->enum = $enum; } + /** + * Converts the CreateMetafield object to a human-readable string representation. + * + * @return string The string representation of the CreateMetafield object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateMetafield', + [ + 'name' => $this->name, + 'scope' => $this->scope, + 'inputType' => $this->inputType, + 'enum' => $this->enum, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateMetafieldsRequest.php b/src/Models/CreateMetafieldsRequest.php index 575fa5cd..b27e2186 100644 --- a/src/Models/CreateMetafieldsRequest.php +++ b/src/Models/CreateMetafieldsRequest.php @@ -52,6 +52,19 @@ public function setMetafields($metafields): void $this->metafields = $metafields; } + /** + * Converts the CreateMetafieldsRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateMetafieldsRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateMetafieldsRequest', + ['metafields' => $this->metafields, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateMeteredComponent.php b/src/Models/CreateMeteredComponent.php index 807efe98..c4a334c5 100644 --- a/src/Models/CreateMeteredComponent.php +++ b/src/Models/CreateMeteredComponent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateMeteredComponent implements \JsonSerializable @@ -46,6 +47,19 @@ public function setMeteredComponent(MeteredComponent $meteredComponent): void $this->meteredComponent = $meteredComponent; } + /** + * Converts the CreateMeteredComponent object to a human-readable string representation. + * + * @return string The string representation of the CreateMeteredComponent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateMeteredComponent', + ['meteredComponent' => $this->meteredComponent, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateMultiInvoicePayment.php b/src/Models/CreateMultiInvoicePayment.php index 9a06dd91..a764bbd0 100644 --- a/src/Models/CreateMultiInvoicePayment.php +++ b/src/Models/CreateMultiInvoicePayment.php @@ -185,6 +185,27 @@ public function setApplications(array $applications): void $this->applications = $applications; } + /** + * Converts the CreateMultiInvoicePayment object to a human-readable string representation. + * + * @return string The string representation of the CreateMultiInvoicePayment object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateMultiInvoicePayment', + [ + 'memo' => $this->memo, + 'details' => $this->details, + 'method' => $this->method, + 'amount' => $this->amount, + 'receivedOn' => $this->receivedOn, + 'applications' => $this->applications, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateMultiInvoicePaymentRequest.php b/src/Models/CreateMultiInvoicePaymentRequest.php index aaf9c164..d364ad8f 100644 --- a/src/Models/CreateMultiInvoicePaymentRequest.php +++ b/src/Models/CreateMultiInvoicePaymentRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateMultiInvoicePaymentRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setPayment(CreateMultiInvoicePayment $payment): void $this->payment = $payment; } + /** + * Converts the CreateMultiInvoicePaymentRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateMultiInvoicePaymentRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateMultiInvoicePaymentRequest', + ['payment' => $this->payment, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateOffer.php b/src/Models/CreateOffer.php index 15a00eb3..3cf5d896 100644 --- a/src/Models/CreateOffer.php +++ b/src/Models/CreateOffer.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateOffer implements \JsonSerializable @@ -198,6 +199,28 @@ public function setCoupons(?array $coupons): void $this->coupons = $coupons; } + /** + * Converts the CreateOffer object to a human-readable string representation. + * + * @return string The string representation of the CreateOffer object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateOffer', + [ + 'name' => $this->name, + 'handle' => $this->handle, + 'description' => $this->description, + 'productId' => $this->productId, + 'productPricePointId' => $this->productPricePointId, + 'components' => $this->components, + 'coupons' => $this->coupons, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateOfferComponent.php b/src/Models/CreateOfferComponent.php index 14000b00..ffc3a161 100644 --- a/src/Models/CreateOfferComponent.php +++ b/src/Models/CreateOfferComponent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateOfferComponent implements \JsonSerializable @@ -83,6 +84,24 @@ public function setStartingQuantity(?int $startingQuantity): void $this->startingQuantity = $startingQuantity; } + /** + * Converts the CreateOfferComponent object to a human-readable string representation. + * + * @return string The string representation of the CreateOfferComponent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateOfferComponent', + [ + 'componentId' => $this->componentId, + 'pricePointId' => $this->pricePointId, + 'startingQuantity' => $this->startingQuantity, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateOfferRequest.php b/src/Models/CreateOfferRequest.php index 305aa977..e670a429 100644 --- a/src/Models/CreateOfferRequest.php +++ b/src/Models/CreateOfferRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateOfferRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setOffer(CreateOffer $offer): void $this->offer = $offer; } + /** + * Converts the CreateOfferRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateOfferRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateOfferRequest', + ['offer' => $this->offer, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateOnOffComponent.php b/src/Models/CreateOnOffComponent.php index df92bfbb..96ff6786 100644 --- a/src/Models/CreateOnOffComponent.php +++ b/src/Models/CreateOnOffComponent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateOnOffComponent implements \JsonSerializable @@ -46,6 +47,19 @@ public function setOnOffComponent(OnOffComponent $onOffComponent): void $this->onOffComponent = $onOffComponent; } + /** + * Converts the CreateOnOffComponent object to a human-readable string representation. + * + * @return string The string representation of the CreateOnOffComponent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateOnOffComponent', + ['onOffComponent' => $this->onOffComponent, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateOrUpdateEndpoint.php b/src/Models/CreateOrUpdateEndpoint.php index 20d59f9b..0c90d274 100644 --- a/src/Models/CreateOrUpdateEndpoint.php +++ b/src/Models/CreateOrUpdateEndpoint.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -80,6 +81,23 @@ public function setWebhookSubscriptions(array $webhookSubscriptions): void $this->webhookSubscriptions = $webhookSubscriptions; } + /** + * Converts the CreateOrUpdateEndpoint object to a human-readable string representation. + * + * @return string The string representation of the CreateOrUpdateEndpoint object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateOrUpdateEndpoint', + [ + 'url' => $this->url, + 'webhookSubscriptions' => $this->webhookSubscriptions, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateOrUpdateEndpointRequest.php b/src/Models/CreateOrUpdateEndpointRequest.php index 4528c11b..53b06c4c 100644 --- a/src/Models/CreateOrUpdateEndpointRequest.php +++ b/src/Models/CreateOrUpdateEndpointRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -51,6 +52,19 @@ public function setEndpoint(CreateOrUpdateEndpoint $endpoint): void $this->endpoint = $endpoint; } + /** + * Converts the CreateOrUpdateEndpointRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateOrUpdateEndpointRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateOrUpdateEndpointRequest', + ['endpoint' => $this->endpoint, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateOrUpdateProduct.php b/src/Models/CreateOrUpdateProduct.php index 5a2e94bc..449cd171 100644 --- a/src/Models/CreateOrUpdateProduct.php +++ b/src/Models/CreateOrUpdateProduct.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateOrUpdateProduct implements \JsonSerializable @@ -473,6 +474,37 @@ public function setTaxCode(?string $taxCode): void $this->taxCode = $taxCode; } + /** + * Converts the CreateOrUpdateProduct object to a human-readable string representation. + * + * @return string The string representation of the CreateOrUpdateProduct object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateOrUpdateProduct', + [ + 'name' => $this->name, + 'handle' => $this->handle, + 'description' => $this->description, + 'accountingCode' => $this->accountingCode, + 'requireCreditCard' => $this->requireCreditCard, + 'priceInCents' => $this->priceInCents, + 'interval' => $this->interval, + 'intervalUnit' => $this->intervalUnit, + 'trialPriceInCents' => $this->trialPriceInCents, + 'trialInterval' => $this->trialInterval, + 'trialIntervalUnit' => $this->getTrialIntervalUnit(), + 'trialType' => $this->trialType, + 'expirationInterval' => $this->expirationInterval, + 'expirationIntervalUnit' => $this->getExpirationIntervalUnit(), + 'autoCreateSignupPage' => $this->autoCreateSignupPage, + 'taxCode' => $this->taxCode, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateOrUpdateProductRequest.php b/src/Models/CreateOrUpdateProductRequest.php index 8655d486..238f609c 100644 --- a/src/Models/CreateOrUpdateProductRequest.php +++ b/src/Models/CreateOrUpdateProductRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateOrUpdateProductRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setProduct(CreateOrUpdateProduct $product): void $this->product = $product; } + /** + * Converts the CreateOrUpdateProductRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateOrUpdateProductRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateOrUpdateProductRequest', + ['product' => $this->product, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateOrUpdateSegmentPrice.php b/src/Models/CreateOrUpdateSegmentPrice.php index 9ff216bb..894afa74 100644 --- a/src/Models/CreateOrUpdateSegmentPrice.php +++ b/src/Models/CreateOrUpdateSegmentPrice.php @@ -100,6 +100,24 @@ public function setUnitPrice($unitPrice): void $this->unitPrice = $unitPrice; } + /** + * Converts the CreateOrUpdateSegmentPrice object to a human-readable string representation. + * + * @return string The string representation of the CreateOrUpdateSegmentPrice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateOrUpdateSegmentPrice', + [ + 'startingQuantity' => $this->startingQuantity, + 'endingQuantity' => $this->endingQuantity, + 'unitPrice' => $this->unitPrice, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreatePayment.php b/src/Models/CreatePayment.php index 0e9602ec..758cc5b3 100644 --- a/src/Models/CreatePayment.php +++ b/src/Models/CreatePayment.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreatePayment implements \JsonSerializable @@ -127,6 +128,25 @@ public function setPaymentMethod(string $paymentMethod): void $this->paymentMethod = $paymentMethod; } + /** + * Converts the CreatePayment object to a human-readable string representation. + * + * @return string The string representation of the CreatePayment object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreatePayment', + [ + 'amount' => $this->amount, + 'memo' => $this->memo, + 'paymentDetails' => $this->paymentDetails, + 'paymentMethod' => $this->paymentMethod, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreatePaymentProfile.php b/src/Models/CreatePaymentProfile.php index d05c5904..a649bf81 100644 --- a/src/Models/CreatePaymentProfile.php +++ b/src/Models/CreatePaymentProfile.php @@ -886,6 +886,53 @@ public function setLastFour(?string $lastFour): void $this->lastFour = $lastFour; } + /** + * Converts the CreatePaymentProfile object to a human-readable string representation. + * + * @return string The string representation of the CreatePaymentProfile object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreatePaymentProfile', + [ + 'chargifyToken' => $this->chargifyToken, + 'id' => $this->id, + 'paymentType' => $this->paymentType, + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'maskedCardNumber' => $this->maskedCardNumber, + 'fullNumber' => $this->fullNumber, + 'cardType' => $this->cardType, + 'expirationMonth' => $this->expirationMonth, + 'expirationYear' => $this->expirationYear, + 'billingAddress' => $this->billingAddress, + 'billingAddress2' => $this->getBillingAddress2(), + 'billingCity' => $this->billingCity, + 'billingState' => $this->billingState, + 'billingCountry' => $this->billingCountry, + 'billingZip' => $this->billingZip, + 'currentVault' => $this->currentVault, + 'vaultToken' => $this->vaultToken, + 'customerVaultToken' => $this->customerVaultToken, + 'customerId' => $this->customerId, + 'paypalEmail' => $this->paypalEmail, + 'paymentMethodNonce' => $this->paymentMethodNonce, + 'gatewayHandle' => $this->gatewayHandle, + 'cvv' => $this->cvv, + 'bankName' => $this->bankName, + 'bankIban' => $this->bankIban, + 'bankRoutingNumber' => $this->bankRoutingNumber, + 'bankAccountNumber' => $this->bankAccountNumber, + 'bankBranchCode' => $this->bankBranchCode, + 'bankAccountType' => $this->bankAccountType, + 'bankAccountHolderType' => $this->bankAccountHolderType, + 'lastFour' => $this->lastFour, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreatePaymentProfileRequest.php b/src/Models/CreatePaymentProfileRequest.php index 3dbc4392..176cda1f 100644 --- a/src/Models/CreatePaymentProfileRequest.php +++ b/src/Models/CreatePaymentProfileRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreatePaymentProfileRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setPaymentProfile(CreatePaymentProfile $paymentProfile): void $this->paymentProfile = $paymentProfile; } + /** + * Converts the CreatePaymentProfileRequest object to a human-readable string representation. + * + * @return string The string representation of the CreatePaymentProfileRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreatePaymentProfileRequest', + ['paymentProfile' => $this->paymentProfile, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreatePrepaidComponent.php b/src/Models/CreatePrepaidComponent.php index 8c182717..58f0efd8 100644 --- a/src/Models/CreatePrepaidComponent.php +++ b/src/Models/CreatePrepaidComponent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreatePrepaidComponent implements \JsonSerializable @@ -46,6 +47,22 @@ public function setPrepaidUsageComponent(PrepaidUsageComponent $prepaidUsageComp $this->prepaidUsageComponent = $prepaidUsageComponent; } + /** + * Converts the CreatePrepaidComponent object to a human-readable string representation. + * + * @return string The string representation of the CreatePrepaidComponent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreatePrepaidComponent', + [ + 'prepaidUsageComponent' => $this->prepaidUsageComponent, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreatePrepaidUsageComponentPricePoint.php b/src/Models/CreatePrepaidUsageComponentPricePoint.php index 4ad64cb9..44bdfea6 100644 --- a/src/Models/CreatePrepaidUsageComponentPricePoint.php +++ b/src/Models/CreatePrepaidUsageComponentPricePoint.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreatePrepaidUsageComponentPricePoint implements \JsonSerializable @@ -305,6 +306,31 @@ public function unsetExpirationIntervalUnit(): void $this->expirationIntervalUnit = []; } + /** + * Converts the CreatePrepaidUsageComponentPricePoint object to a human-readable string representation. + * + * @return string The string representation of the CreatePrepaidUsageComponentPricePoint object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreatePrepaidUsageComponentPricePoint', + [ + 'name' => $this->name, + 'handle' => $this->handle, + 'pricingScheme' => $this->pricingScheme, + 'prices' => $this->prices, + 'overagePricing' => $this->overagePricing, + 'useSiteExchangeRate' => $this->useSiteExchangeRate, + 'rolloverPrepaidRemainder' => $this->rolloverPrepaidRemainder, + 'renewPrepaidAllocation' => $this->renewPrepaidAllocation, + 'expirationInterval' => $this->expirationInterval, + 'expirationIntervalUnit' => $this->getExpirationIntervalUnit(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreatePrepayment.php b/src/Models/CreatePrepayment.php index aa555b18..f242cc9c 100644 --- a/src/Models/CreatePrepayment.php +++ b/src/Models/CreatePrepayment.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreatePrepayment implements \JsonSerializable @@ -154,6 +155,26 @@ public function setPaymentProfileId(?int $paymentProfileId): void $this->paymentProfileId = $paymentProfileId; } + /** + * Converts the CreatePrepayment object to a human-readable string representation. + * + * @return string The string representation of the CreatePrepayment object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreatePrepayment', + [ + 'amount' => $this->amount, + 'details' => $this->details, + 'memo' => $this->memo, + 'method' => $this->method, + 'paymentProfileId' => $this->paymentProfileId, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreatePrepaymentRequest.php b/src/Models/CreatePrepaymentRequest.php index 83198898..18b8690f 100644 --- a/src/Models/CreatePrepaymentRequest.php +++ b/src/Models/CreatePrepaymentRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreatePrepaymentRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setPrepayment(CreatePrepayment $prepayment): void $this->prepayment = $prepayment; } + /** + * Converts the CreatePrepaymentRequest object to a human-readable string representation. + * + * @return string The string representation of the CreatePrepaymentRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreatePrepaymentRequest', + ['prepayment' => $this->prepayment, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreatePrepaymentResponse.php b/src/Models/CreatePrepaymentResponse.php index eb4959e4..d7236df6 100644 --- a/src/Models/CreatePrepaymentResponse.php +++ b/src/Models/CreatePrepaymentResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreatePrepaymentResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setPrepayment(CreatedPrepayment $prepayment): void $this->prepayment = $prepayment; } + /** + * Converts the CreatePrepaymentResponse object to a human-readable string representation. + * + * @return string The string representation of the CreatePrepaymentResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreatePrepaymentResponse', + ['prepayment' => $this->prepayment, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateProductCurrencyPrice.php b/src/Models/CreateProductCurrencyPrice.php index 02f10b67..1e675bba 100644 --- a/src/Models/CreateProductCurrencyPrice.php +++ b/src/Models/CreateProductCurrencyPrice.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateProductCurrencyPrice implements \JsonSerializable @@ -105,6 +106,24 @@ public function setRole(string $role): void $this->role = $role; } + /** + * Converts the CreateProductCurrencyPrice object to a human-readable string representation. + * + * @return string The string representation of the CreateProductCurrencyPrice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateProductCurrencyPrice', + [ + 'currency' => $this->currency, + 'price' => $this->price, + 'role' => $this->role, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateProductCurrencyPricesRequest.php b/src/Models/CreateProductCurrencyPricesRequest.php index 1311201a..0d0e1b2b 100644 --- a/src/Models/CreateProductCurrencyPricesRequest.php +++ b/src/Models/CreateProductCurrencyPricesRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateProductCurrencyPricesRequest implements \JsonSerializable @@ -50,6 +51,19 @@ public function setCurrencyPrices(array $currencyPrices): void $this->currencyPrices = $currencyPrices; } + /** + * Converts the CreateProductCurrencyPricesRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateProductCurrencyPricesRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateProductCurrencyPricesRequest', + ['currencyPrices' => $this->currencyPrices, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateProductFamily.php b/src/Models/CreateProductFamily.php index 86796583..f74b28e1 100644 --- a/src/Models/CreateProductFamily.php +++ b/src/Models/CreateProductFamily.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateProductFamily implements \JsonSerializable @@ -114,6 +115,24 @@ public function unsetDescription(): void $this->description = []; } + /** + * Converts the CreateProductFamily object to a human-readable string representation. + * + * @return string The string representation of the CreateProductFamily object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateProductFamily', + [ + 'name' => $this->name, + 'handle' => $this->getHandle(), + 'description' => $this->getDescription(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateProductFamilyRequest.php b/src/Models/CreateProductFamilyRequest.php index 37c831b2..8c072c38 100644 --- a/src/Models/CreateProductFamilyRequest.php +++ b/src/Models/CreateProductFamilyRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateProductFamilyRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setProductFamily(CreateProductFamily $productFamily): void $this->productFamily = $productFamily; } + /** + * Converts the CreateProductFamilyRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateProductFamilyRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateProductFamilyRequest', + ['productFamily' => $this->productFamily, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateProductPricePoint.php b/src/Models/CreateProductPricePoint.php index 2491995b..7585106b 100644 --- a/src/Models/CreateProductPricePoint.php +++ b/src/Models/CreateProductPricePoint.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateProductPricePoint implements \JsonSerializable @@ -404,6 +405,35 @@ public function setUseSiteExchangeRate(?bool $useSiteExchangeRate): void $this->useSiteExchangeRate = $useSiteExchangeRate; } + /** + * Converts the CreateProductPricePoint object to a human-readable string representation. + * + * @return string The string representation of the CreateProductPricePoint object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateProductPricePoint', + [ + 'name' => $this->name, + 'handle' => $this->handle, + 'priceInCents' => $this->priceInCents, + 'interval' => $this->interval, + 'intervalUnit' => $this->intervalUnit, + 'trialPriceInCents' => $this->trialPriceInCents, + 'trialInterval' => $this->trialInterval, + 'trialIntervalUnit' => $this->trialIntervalUnit, + 'trialType' => $this->trialType, + 'initialChargeInCents' => $this->initialChargeInCents, + 'initialChargeAfterTrial' => $this->initialChargeAfterTrial, + 'expirationInterval' => $this->expirationInterval, + 'expirationIntervalUnit' => $this->getExpirationIntervalUnit(), + 'useSiteExchangeRate' => $this->useSiteExchangeRate, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateProductPricePointRequest.php b/src/Models/CreateProductPricePointRequest.php index 20f1b7f2..8cb9ea7a 100644 --- a/src/Models/CreateProductPricePointRequest.php +++ b/src/Models/CreateProductPricePointRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateProductPricePointRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setPricePoint(CreateProductPricePoint $pricePoint): void $this->pricePoint = $pricePoint; } + /** + * Converts the CreateProductPricePointRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateProductPricePointRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateProductPricePointRequest', + ['pricePoint' => $this->pricePoint, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateQuantityBasedComponent.php b/src/Models/CreateQuantityBasedComponent.php index f9565189..ff3d4501 100644 --- a/src/Models/CreateQuantityBasedComponent.php +++ b/src/Models/CreateQuantityBasedComponent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateQuantityBasedComponent implements \JsonSerializable @@ -46,6 +47,22 @@ public function setQuantityBasedComponent(QuantityBasedComponent $quantityBasedC $this->quantityBasedComponent = $quantityBasedComponent; } + /** + * Converts the CreateQuantityBasedComponent object to a human-readable string representation. + * + * @return string The string representation of the CreateQuantityBasedComponent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateQuantityBasedComponent', + [ + 'quantityBasedComponent' => $this->quantityBasedComponent, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateReasonCode.php b/src/Models/CreateReasonCode.php index 20c57abd..c2a47807 100644 --- a/src/Models/CreateReasonCode.php +++ b/src/Models/CreateReasonCode.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateReasonCode implements \JsonSerializable @@ -101,6 +102,24 @@ public function setPosition(?int $position): void $this->position = $position; } + /** + * Converts the CreateReasonCode object to a human-readable string representation. + * + * @return string The string representation of the CreateReasonCode object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateReasonCode', + [ + 'code' => $this->code, + 'description' => $this->description, + 'position' => $this->position, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateReasonCodeRequest.php b/src/Models/CreateReasonCodeRequest.php index f1265642..d7a6ff30 100644 --- a/src/Models/CreateReasonCodeRequest.php +++ b/src/Models/CreateReasonCodeRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateReasonCodeRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setReasonCode(CreateReasonCode $reasonCode): void $this->reasonCode = $reasonCode; } + /** + * Converts the CreateReasonCodeRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateReasonCodeRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateReasonCodeRequest', + ['reasonCode' => $this->reasonCode, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateSegment.php b/src/Models/CreateSegment.php index 6b009273..07ddcb36 100644 --- a/src/Models/CreateSegment.php +++ b/src/Models/CreateSegment.php @@ -207,6 +207,27 @@ public function setPrices(?array $prices): void $this->prices = $prices; } + /** + * Converts the CreateSegment object to a human-readable string representation. + * + * @return string The string representation of the CreateSegment object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateSegment', + [ + 'segmentProperty1Value' => $this->segmentProperty1Value, + 'segmentProperty2Value' => $this->segmentProperty2Value, + 'segmentProperty3Value' => $this->segmentProperty3Value, + 'segmentProperty4Value' => $this->segmentProperty4Value, + 'pricingScheme' => $this->pricingScheme, + 'prices' => $this->prices, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateSegmentRequest.php b/src/Models/CreateSegmentRequest.php index 6d33dc43..6a266af2 100644 --- a/src/Models/CreateSegmentRequest.php +++ b/src/Models/CreateSegmentRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateSegmentRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setSegment(CreateSegment $segment): void $this->segment = $segment; } + /** + * Converts the CreateSegmentRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateSegmentRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateSegmentRequest', + ['segment' => $this->segment, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateSubscription.php b/src/Models/CreateSubscription.php index 5539f2f2..f2539ad4 100644 --- a/src/Models/CreateSubscription.php +++ b/src/Models/CreateSubscription.php @@ -1387,6 +1387,70 @@ public function setSkipBillingManifestTaxes(?bool $skipBillingManifestTaxes): vo $this->skipBillingManifestTaxes = $skipBillingManifestTaxes; } + /** + * Converts the CreateSubscription object to a human-readable string representation. + * + * @return string The string representation of the CreateSubscription object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateSubscription', + [ + 'productHandle' => $this->productHandle, + 'productId' => $this->productId, + 'productPricePointHandle' => $this->productPricePointHandle, + 'productPricePointId' => $this->productPricePointId, + 'customPrice' => $this->customPrice, + 'couponCode' => $this->couponCode, + 'couponCodes' => $this->couponCodes, + 'paymentCollectionMethod' => $this->paymentCollectionMethod, + 'receivesInvoiceEmails' => $this->receivesInvoiceEmails, + 'netTerms' => $this->netTerms, + 'customerId' => $this->customerId, + 'nextBillingAt' => $this->nextBillingAt, + 'initialBillingAt' => $this->initialBillingAt, + 'storedCredentialTransactionId' => $this->storedCredentialTransactionId, + 'salesRepId' => $this->salesRepId, + 'paymentProfileId' => $this->paymentProfileId, + 'reference' => $this->reference, + 'customerAttributes' => $this->customerAttributes, + 'paymentProfileAttributes' => $this->paymentProfileAttributes, + 'creditCardAttributes' => $this->creditCardAttributes, + 'bankAccountAttributes' => $this->bankAccountAttributes, + 'components' => $this->components, + 'calendarBilling' => $this->calendarBilling, + 'metafields' => $this->metafields, + 'customerReference' => $this->customerReference, + 'group' => $this->group, + 'ref' => $this->ref, + 'cancellationMessage' => $this->cancellationMessage, + 'cancellationMethod' => $this->cancellationMethod, + 'currency' => $this->currency, + 'expiresAt' => $this->expiresAt, + 'expirationTracksNextBillingChange' => $this->expirationTracksNextBillingChange, + 'agreementTerms' => $this->agreementTerms, + 'authorizerFirstName' => $this->authorizerFirstName, + 'authorizerLastName' => $this->authorizerLastName, + 'calendarBillingFirstCharge' => $this->calendarBillingFirstCharge, + 'reasonCode' => $this->reasonCode, + 'productChangeDelayed' => $this->productChangeDelayed, + 'offerId' => $this->offerId, + 'prepaidConfiguration' => $this->prepaidConfiguration, + 'previousBillingAt' => $this->previousBillingAt, + 'importMrr' => $this->importMrr, + 'canceledAt' => $this->canceledAt, + 'activatedAt' => $this->activatedAt, + 'agreementAcceptance' => $this->agreementAcceptance, + 'achAgreement' => $this->achAgreement, + 'dunningCommunicationDelayEnabled' => $this->dunningCommunicationDelayEnabled, + 'dunningCommunicationDelayTimeZone' => $this->getDunningCommunicationDelayTimeZone(), + 'skipBillingManifestTaxes' => $this->skipBillingManifestTaxes, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateSubscriptionComponent.php b/src/Models/CreateSubscriptionComponent.php index 4b3c2ba9..e3efbb5a 100644 --- a/src/Models/CreateSubscriptionComponent.php +++ b/src/Models/CreateSubscriptionComponent.php @@ -201,6 +201,28 @@ public function setCustomPrice(?ComponentCustomPrice $customPrice): void $this->customPrice = $customPrice; } + /** + * Converts the CreateSubscriptionComponent object to a human-readable string representation. + * + * @return string The string representation of the CreateSubscriptionComponent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateSubscriptionComponent', + [ + 'componentId' => $this->componentId, + 'enabled' => $this->enabled, + 'unitBalance' => $this->unitBalance, + 'allocatedQuantity' => $this->allocatedQuantity, + 'quantity' => $this->quantity, + 'pricePointId' => $this->pricePointId, + 'customPrice' => $this->customPrice, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateSubscriptionGroup.php b/src/Models/CreateSubscriptionGroup.php index 360a657f..668569de 100644 --- a/src/Models/CreateSubscriptionGroup.php +++ b/src/Models/CreateSubscriptionGroup.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateSubscriptionGroup implements \JsonSerializable @@ -73,6 +74,23 @@ public function setMemberIds(?array $memberIds): void $this->memberIds = $memberIds; } + /** + * Converts the CreateSubscriptionGroup object to a human-readable string representation. + * + * @return string The string representation of the CreateSubscriptionGroup object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateSubscriptionGroup', + [ + 'subscriptionId' => $this->subscriptionId, + 'memberIds' => $this->memberIds, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateSubscriptionGroupRequest.php b/src/Models/CreateSubscriptionGroupRequest.php index 8fbd1ed8..5a8e8fc5 100644 --- a/src/Models/CreateSubscriptionGroupRequest.php +++ b/src/Models/CreateSubscriptionGroupRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateSubscriptionGroupRequest implements \JsonSerializable @@ -46,6 +47,22 @@ public function setSubscriptionGroup(CreateSubscriptionGroup $subscriptionGroup) $this->subscriptionGroup = $subscriptionGroup; } + /** + * Converts the CreateSubscriptionGroupRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateSubscriptionGroupRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateSubscriptionGroupRequest', + [ + 'subscriptionGroup' => $this->subscriptionGroup, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateSubscriptionRequest.php b/src/Models/CreateSubscriptionRequest.php index 56c7a080..e3604af6 100644 --- a/src/Models/CreateSubscriptionRequest.php +++ b/src/Models/CreateSubscriptionRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateSubscriptionRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setSubscription(CreateSubscription $subscription): void $this->subscription = $subscription; } + /** + * Converts the CreateSubscriptionRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateSubscriptionRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateSubscriptionRequest', + ['subscription' => $this->subscription, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateUsage.php b/src/Models/CreateUsage.php index 92ffca67..3e160eb1 100644 --- a/src/Models/CreateUsage.php +++ b/src/Models/CreateUsage.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateUsage implements \JsonSerializable @@ -114,6 +115,25 @@ public function setBillingSchedule(?BillingSchedule $billingSchedule): void $this->billingSchedule = $billingSchedule; } + /** + * Converts the CreateUsage object to a human-readable string representation. + * + * @return string The string representation of the CreateUsage object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateUsage', + [ + 'quantity' => $this->quantity, + 'pricePointId' => $this->pricePointId, + 'memo' => $this->memo, + 'billingSchedule' => $this->billingSchedule, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreateUsageRequest.php b/src/Models/CreateUsageRequest.php index f32d9e49..46feff6e 100644 --- a/src/Models/CreateUsageRequest.php +++ b/src/Models/CreateUsageRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreateUsageRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setUsage(CreateUsage $usage): void $this->usage = $usage; } + /** + * Converts the CreateUsageRequest object to a human-readable string representation. + * + * @return string The string representation of the CreateUsageRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreateUsageRequest', + ['usage' => $this->usage, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreatedPrepayment.php b/src/Models/CreatedPrepayment.php index bf84b218..749ff497 100644 --- a/src/Models/CreatedPrepayment.php +++ b/src/Models/CreatedPrepayment.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -177,6 +178,28 @@ public function setEndingBalanceInCents(?int $endingBalanceInCents): void $this->endingBalanceInCents = $endingBalanceInCents; } + /** + * Converts the CreatedPrepayment object to a human-readable string representation. + * + * @return string The string representation of the CreatedPrepayment object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreatedPrepayment', + [ + 'id' => $this->id, + 'subscriptionId' => $this->subscriptionId, + 'amountInCents' => $this->amountInCents, + 'memo' => $this->memo, + 'createdAt' => $this->createdAt, + 'startingBalanceInCents' => $this->startingBalanceInCents, + 'endingBalanceInCents' => $this->endingBalanceInCents, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreditAccountBalanceChanged.php b/src/Models/CreditAccountBalanceChanged.php index e0bb596e..fd87e41c 100644 --- a/src/Models/CreditAccountBalanceChanged.php +++ b/src/Models/CreditAccountBalanceChanged.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -157,6 +158,26 @@ public function setAtTime(\DateTime $atTime): void $this->atTime = $atTime; } + /** + * Converts the CreditAccountBalanceChanged object to a human-readable string representation. + * + * @return string The string representation of the CreditAccountBalanceChanged object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreditAccountBalanceChanged', + [ + 'reason' => $this->reason, + 'serviceCreditAccountBalanceInCents' => $this->serviceCreditAccountBalanceInCents, + 'serviceCreditBalanceChangeInCents' => $this->serviceCreditBalanceChangeInCents, + 'currencyCode' => $this->currencyCode, + 'atTime' => $this->atTime, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreditCardAttributes.php b/src/Models/CreditCardAttributes.php index 16fa2e7a..1f794a7f 100644 --- a/src/Models/CreditCardAttributes.php +++ b/src/Models/CreditCardAttributes.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreditCardAttributes implements \JsonSerializable @@ -83,6 +84,24 @@ public function setExpirationYear(?string $expirationYear): void $this->expirationYear = $expirationYear; } + /** + * Converts the CreditCardAttributes object to a human-readable string representation. + * + * @return string The string representation of the CreditCardAttributes object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreditCardAttributes', + [ + 'fullNumber' => $this->fullNumber, + 'expirationMonth' => $this->expirationMonth, + 'expirationYear' => $this->expirationYear, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreditCardPaymentProfile.php b/src/Models/CreditCardPaymentProfile.php index 22b9db81..d30ead77 100644 --- a/src/Models/CreditCardPaymentProfile.php +++ b/src/Models/CreditCardPaymentProfile.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreditCardPaymentProfile implements \JsonSerializable @@ -700,6 +701,43 @@ public function unsetGatewayHandle(): void $this->gatewayHandle = []; } + /** + * Converts the CreditCardPaymentProfile object to a human-readable string representation. + * + * @return string The string representation of the CreditCardPaymentProfile object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreditCardPaymentProfile', + [ + 'id' => $this->id, + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'maskedCardNumber' => $this->maskedCardNumber, + 'cardType' => $this->cardType, + 'expirationMonth' => $this->expirationMonth, + 'expirationYear' => $this->expirationYear, + 'customerId' => $this->customerId, + 'currentVault' => $this->currentVault, + 'vaultToken' => $this->getVaultToken(), + 'billingAddress' => $this->getBillingAddress(), + 'billingCity' => $this->getBillingCity(), + 'billingState' => $this->getBillingState(), + 'billingZip' => $this->getBillingZip(), + 'billingCountry' => $this->getBillingCountry(), + 'customerVaultToken' => $this->getCustomerVaultToken(), + 'billingAddress2' => $this->getBillingAddress2(), + 'paymentType' => $this->paymentType, + 'disabled' => $this->disabled, + 'chargifyToken' => $this->chargifyToken, + 'siteGatewaySettingId' => $this->getSiteGatewaySettingId(), + 'gatewayHandle' => $this->getGatewayHandle(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreditNote.php b/src/Models/CreditNote.php index d24056f7..fdb45095 100644 --- a/src/Models/CreditNote.php +++ b/src/Models/CreditNote.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -759,6 +760,48 @@ public function setOriginInvoices(?array $originInvoices): void $this->originInvoices = $originInvoices; } + /** + * Converts the CreditNote object to a human-readable string representation. + * + * @return string The string representation of the CreditNote object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreditNote', + [ + 'uid' => $this->uid, + 'siteId' => $this->siteId, + 'customerId' => $this->customerId, + 'subscriptionId' => $this->subscriptionId, + 'number' => $this->number, + 'sequenceNumber' => $this->sequenceNumber, + 'issueDate' => $this->issueDate, + 'appliedDate' => $this->appliedDate, + 'status' => $this->status, + 'currency' => $this->currency, + 'memo' => $this->memo, + 'seller' => $this->seller, + 'customer' => $this->customer, + 'billingAddress' => $this->billingAddress, + 'shippingAddress' => $this->shippingAddress, + 'subtotalAmount' => $this->subtotalAmount, + 'discountAmount' => $this->discountAmount, + 'taxAmount' => $this->taxAmount, + 'totalAmount' => $this->totalAmount, + 'appliedAmount' => $this->appliedAmount, + 'remainingAmount' => $this->remainingAmount, + 'lineItems' => $this->lineItems, + 'discounts' => $this->discounts, + 'taxes' => $this->taxes, + 'applications' => $this->applications, + 'refunds' => $this->refunds, + 'originInvoices' => $this->originInvoices, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreditNoteApplication.php b/src/Models/CreditNoteApplication.php index 77ed2914..8c2d4ac6 100644 --- a/src/Models/CreditNoteApplication.php +++ b/src/Models/CreditNoteApplication.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -131,6 +132,26 @@ public function setAppliedAmount(?string $appliedAmount): void $this->appliedAmount = $appliedAmount; } + /** + * Converts the CreditNoteApplication object to a human-readable string representation. + * + * @return string The string representation of the CreditNoteApplication object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreditNoteApplication', + [ + 'uid' => $this->uid, + 'transactionTime' => $this->transactionTime, + 'invoiceUid' => $this->invoiceUid, + 'memo' => $this->memo, + 'appliedAmount' => $this->appliedAmount, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreditNoteLineItem.php b/src/Models/CreditNoteLineItem.php index 39ccd6ec..5b4ec9c5 100644 --- a/src/Models/CreditNoteLineItem.php +++ b/src/Models/CreditNoteLineItem.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -560,6 +561,39 @@ public function setCustomItem(?bool $customItem): void $this->customItem = $customItem; } + /** + * Converts the CreditNoteLineItem object to a human-readable string representation. + * + * @return string The string representation of the CreditNoteLineItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreditNoteLineItem', + [ + 'uid' => $this->uid, + 'title' => $this->title, + 'description' => $this->description, + 'quantity' => $this->quantity, + 'unitPrice' => $this->unitPrice, + 'subtotalAmount' => $this->subtotalAmount, + 'discountAmount' => $this->discountAmount, + 'taxAmount' => $this->taxAmount, + 'totalAmount' => $this->totalAmount, + 'tieredUnitPrice' => $this->tieredUnitPrice, + 'periodRangeStart' => $this->periodRangeStart, + 'periodRangeEnd' => $this->periodRangeEnd, + 'productId' => $this->productId, + 'productVersion' => $this->productVersion, + 'componentId' => $this->getComponentId(), + 'pricePointId' => $this->getPricePointId(), + 'billingScheduleItemId' => $this->getBillingScheduleItemId(), + 'customItem' => $this->customItem, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CreditSchemeRequest.php b/src/Models/CreditSchemeRequest.php index cae6b285..30e08c73 100644 --- a/src/Models/CreditSchemeRequest.php +++ b/src/Models/CreditSchemeRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CreditSchemeRequest implements \JsonSerializable @@ -47,6 +48,19 @@ public function setCreditScheme(string $creditScheme): void $this->creditScheme = $creditScheme; } + /** + * Converts the CreditSchemeRequest object to a human-readable string representation. + * + * @return string The string representation of the CreditSchemeRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CreditSchemeRequest', + ['creditScheme' => $this->creditScheme, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CurrencyPrice.php b/src/Models/CurrencyPrice.php index 7db0b6af..92ae2340 100644 --- a/src/Models/CurrencyPrice.php +++ b/src/Models/CurrencyPrice.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CurrencyPrice implements \JsonSerializable @@ -201,6 +202,29 @@ public function setRole(?string $role): void $this->role = $role; } + /** + * Converts the CurrencyPrice object to a human-readable string representation. + * + * @return string The string representation of the CurrencyPrice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CurrencyPrice', + [ + 'id' => $this->id, + 'currency' => $this->currency, + 'price' => $this->price, + 'formattedPrice' => $this->formattedPrice, + 'priceId' => $this->priceId, + 'pricePointId' => $this->pricePointId, + 'productPricePointId' => $this->productPricePointId, + 'role' => $this->role, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CurrencyPricesResponse.php b/src/Models/CurrencyPricesResponse.php index 09f7424e..54842d10 100644 --- a/src/Models/CurrencyPricesResponse.php +++ b/src/Models/CurrencyPricesResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CurrencyPricesResponse implements \JsonSerializable @@ -50,6 +51,19 @@ public function setCurrencyPrices(array $currencyPrices): void $this->currencyPrices = $currencyPrices; } + /** + * Converts the CurrencyPricesResponse object to a human-readable string representation. + * + * @return string The string representation of the CurrencyPricesResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CurrencyPricesResponse', + ['currencyPrices' => $this->currencyPrices, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CustomFieldValueChange.php b/src/Models/CustomFieldValueChange.php index a0e964f5..196bf55d 100644 --- a/src/Models/CustomFieldValueChange.php +++ b/src/Models/CustomFieldValueChange.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CustomFieldValueChange implements \JsonSerializable @@ -201,6 +202,28 @@ public function setResourceId(int $resourceId): void $this->resourceId = $resourceId; } + /** + * Converts the CustomFieldValueChange object to a human-readable string representation. + * + * @return string The string representation of the CustomFieldValueChange object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CustomFieldValueChange', + [ + 'eventType' => $this->eventType, + 'metafieldName' => $this->metafieldName, + 'metafieldId' => $this->metafieldId, + 'oldValue' => $this->oldValue, + 'newValue' => $this->newValue, + 'resourceType' => $this->resourceType, + 'resourceId' => $this->resourceId, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Customer.php b/src/Models/Customer.php index b50b6171..fa7f6a1d 100644 --- a/src/Models/Customer.php +++ b/src/Models/Customer.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -1060,6 +1061,51 @@ public function unsetDefaultAutoRenewalProfileId(): void $this->defaultAutoRenewalProfileId = []; } + /** + * Converts the Customer object to a human-readable string representation. + * + * @return string The string representation of the Customer object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Customer', + [ + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'email' => $this->email, + 'ccEmails' => $this->getCcEmails(), + 'organization' => $this->getOrganization(), + 'reference' => $this->getReference(), + 'id' => $this->id, + 'createdAt' => $this->createdAt, + 'updatedAt' => $this->updatedAt, + 'address' => $this->getAddress(), + 'address2' => $this->getAddress2(), + 'city' => $this->getCity(), + 'state' => $this->getState(), + 'stateName' => $this->getStateName(), + 'zip' => $this->getZip(), + 'country' => $this->getCountry(), + 'countryName' => $this->getCountryName(), + 'phone' => $this->getPhone(), + 'verified' => $this->getVerified(), + 'portalCustomerCreatedAt' => $this->getPortalCustomerCreatedAt(), + 'portalInviteLastSentAt' => $this->getPortalInviteLastSentAt(), + 'portalInviteLastAcceptedAt' => $this->getPortalInviteLastAcceptedAt(), + 'taxExempt' => $this->taxExempt, + 'vatNumber' => $this->getVatNumber(), + 'parentId' => $this->getParentId(), + 'locale' => $this->getLocale(), + 'defaultSubscriptionGroupUid' => $this->getDefaultSubscriptionGroupUid(), + 'salesforceId' => $this->getSalesforceId(), + 'taxExemptReason' => $this->getTaxExemptReason(), + 'defaultAutoRenewalProfileId' => $this->getDefaultAutoRenewalProfileId(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CustomerAttributes.php b/src/Models/CustomerAttributes.php index 22b098d0..4e5332e1 100644 --- a/src/Models/CustomerAttributes.php +++ b/src/Models/CustomerAttributes.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CustomerAttributes implements \JsonSerializable @@ -584,6 +585,41 @@ public function unsetDefaultAutoRenewalProfileId(): void $this->defaultAutoRenewalProfileId = []; } + /** + * Converts the CustomerAttributes object to a human-readable string representation. + * + * @return string The string representation of the CustomerAttributes object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CustomerAttributes', + [ + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'email' => $this->email, + 'ccEmails' => $this->ccEmails, + 'organization' => $this->organization, + 'reference' => $this->reference, + 'address' => $this->address, + 'address2' => $this->getAddress2(), + 'city' => $this->city, + 'state' => $this->state, + 'zip' => $this->zip, + 'country' => $this->country, + 'phone' => $this->phone, + 'verified' => $this->verified, + 'taxExempt' => $this->taxExempt, + 'vatNumber' => $this->vatNumber, + 'metafields' => $this->metafields, + 'parentId' => $this->getParentId(), + 'salesforceId' => $this->getSalesforceId(), + 'defaultAutoRenewalProfileId' => $this->getDefaultAutoRenewalProfileId(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CustomerChange.php b/src/Models/CustomerChange.php index b9eac9bb..f6db6926 100644 --- a/src/Models/CustomerChange.php +++ b/src/Models/CustomerChange.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CustomerChange implements \JsonSerializable @@ -150,6 +151,25 @@ public function unsetCustomFields(): void $this->customFields = []; } + /** + * Converts the CustomerChange object to a human-readable string representation. + * + * @return string The string representation of the CustomerChange object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CustomerChange', + [ + 'payer' => $this->getPayer(), + 'shippingAddress' => $this->getShippingAddress(), + 'billingAddress' => $this->getBillingAddress(), + 'customFields' => $this->getCustomFields(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CustomerChangesPreviewResponse.php b/src/Models/CustomerChangesPreviewResponse.php index 0c4a5103..51826a87 100644 --- a/src/Models/CustomerChangesPreviewResponse.php +++ b/src/Models/CustomerChangesPreviewResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CustomerChangesPreviewResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setChanges(CustomerChange $changes): void $this->changes = $changes; } + /** + * Converts the CustomerChangesPreviewResponse object to a human-readable string representation. + * + * @return string The string representation of the CustomerChangesPreviewResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CustomerChangesPreviewResponse', + ['changes' => $this->changes, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CustomerCustomFieldsChange.php b/src/Models/CustomerCustomFieldsChange.php index 30d36d8b..a95f08b7 100644 --- a/src/Models/CustomerCustomFieldsChange.php +++ b/src/Models/CustomerCustomFieldsChange.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CustomerCustomFieldsChange implements \JsonSerializable @@ -80,6 +81,23 @@ public function setAfter(array $after): void $this->after = $after; } + /** + * Converts the CustomerCustomFieldsChange object to a human-readable string representation. + * + * @return string The string representation of the CustomerCustomFieldsChange object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CustomerCustomFieldsChange', + [ + 'before' => $this->before, + 'after' => $this->after, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CustomerError.php b/src/Models/CustomerError.php index 76e69ff5..70e3a678 100644 --- a/src/Models/CustomerError.php +++ b/src/Models/CustomerError.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CustomerError implements \JsonSerializable @@ -37,6 +38,19 @@ public function setCustomer(?string $customer): void $this->customer = $customer; } + /** + * Converts the CustomerError object to a human-readable string representation. + * + * @return string The string representation of the CustomerError object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CustomerError', + ['customer' => $this->customer, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CustomerPayerChange.php b/src/Models/CustomerPayerChange.php index 78ab4cff..8bbce82a 100644 --- a/src/Models/CustomerPayerChange.php +++ b/src/Models/CustomerPayerChange.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CustomerPayerChange implements \JsonSerializable @@ -72,6 +73,23 @@ public function setAfter(InvoicePayerChange $after): void $this->after = $after; } + /** + * Converts the CustomerPayerChange object to a human-readable string representation. + * + * @return string The string representation of the CustomerPayerChange object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CustomerPayerChange', + [ + 'before' => $this->before, + 'after' => $this->after, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/CustomerResponse.php b/src/Models/CustomerResponse.php index d63d5cc9..2ce4829c 100644 --- a/src/Models/CustomerResponse.php +++ b/src/Models/CustomerResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class CustomerResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setCustomer(Customer $customer): void $this->customer = $customer; } + /** + * Converts the CustomerResponse object to a human-readable string representation. + * + * @return string The string representation of the CustomerResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'CustomerResponse', + ['customer' => $this->customer, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/DebitNote.php b/src/Models/DebitNote.php index c17cf2e4..c00d3741 100644 --- a/src/Models/DebitNote.php +++ b/src/Models/DebitNote.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -629,6 +630,44 @@ public function setRefunds(?array $refunds): void $this->refunds = $refunds; } + /** + * Converts the DebitNote object to a human-readable string representation. + * + * @return string The string representation of the DebitNote object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'DebitNote', + [ + 'uid' => $this->uid, + 'siteId' => $this->siteId, + 'customerId' => $this->customerId, + 'subscriptionId' => $this->subscriptionId, + 'number' => $this->number, + 'sequenceNumber' => $this->sequenceNumber, + 'originCreditNoteUid' => $this->originCreditNoteUid, + 'originCreditNoteNumber' => $this->originCreditNoteNumber, + 'issueDate' => $this->issueDate, + 'appliedDate' => $this->appliedDate, + 'dueDate' => $this->dueDate, + 'status' => $this->status, + 'memo' => $this->memo, + 'role' => $this->role, + 'currency' => $this->currency, + 'seller' => $this->seller, + 'customer' => $this->customer, + 'billingAddress' => $this->billingAddress, + 'shippingAddress' => $this->shippingAddress, + 'lineItems' => $this->lineItems, + 'discounts' => $this->discounts, + 'taxes' => $this->taxes, + 'refunds' => $this->refunds, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/DeductServiceCredit.php b/src/Models/DeductServiceCredit.php index d1ad5241..78dd4b87 100644 --- a/src/Models/DeductServiceCredit.php +++ b/src/Models/DeductServiceCredit.php @@ -75,6 +75,23 @@ public function setMemo(?string $memo): void $this->memo = $memo; } + /** + * Converts the DeductServiceCredit object to a human-readable string representation. + * + * @return string The string representation of the DeductServiceCredit object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'DeductServiceCredit', + [ + 'amount' => $this->amount, + 'memo' => $this->memo, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/DeductServiceCreditRequest.php b/src/Models/DeductServiceCreditRequest.php index 67f32d60..0a88156c 100644 --- a/src/Models/DeductServiceCreditRequest.php +++ b/src/Models/DeductServiceCreditRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class DeductServiceCreditRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setDeduction(DeductServiceCredit $deduction): void $this->deduction = $deduction; } + /** + * Converts the DeductServiceCreditRequest object to a human-readable string representation. + * + * @return string The string representation of the DeductServiceCreditRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'DeductServiceCreditRequest', + ['deduction' => $this->deduction, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/DelayedCancellationResponse.php b/src/Models/DelayedCancellationResponse.php index 0615d257..f8b518eb 100644 --- a/src/Models/DelayedCancellationResponse.php +++ b/src/Models/DelayedCancellationResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class DelayedCancellationResponse implements \JsonSerializable @@ -37,6 +38,19 @@ public function setMessage(?string $message): void $this->message = $message; } + /** + * Converts the DelayedCancellationResponse object to a human-readable string representation. + * + * @return string The string representation of the DelayedCancellationResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'DelayedCancellationResponse', + ['message' => $this->message, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/DeleteSubscriptionGroupResponse.php b/src/Models/DeleteSubscriptionGroupResponse.php index 98c520ec..30d3a62e 100644 --- a/src/Models/DeleteSubscriptionGroupResponse.php +++ b/src/Models/DeleteSubscriptionGroupResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class DeleteSubscriptionGroupResponse implements \JsonSerializable @@ -60,6 +61,23 @@ public function setDeleted(?bool $deleted): void $this->deleted = $deleted; } + /** + * Converts the DeleteSubscriptionGroupResponse object to a human-readable string representation. + * + * @return string The string representation of the DeleteSubscriptionGroupResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'DeleteSubscriptionGroupResponse', + [ + 'uid' => $this->uid, + 'deleted' => $this->deleted, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/DunnerData.php b/src/Models/DunnerData.php index d67b406f..ebe25daa 100644 --- a/src/Models/DunnerData.php +++ b/src/Models/DunnerData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -185,6 +186,27 @@ public function setLastAttemptedAt(\DateTime $lastAttemptedAt): void $this->lastAttemptedAt = $lastAttemptedAt; } + /** + * Converts the DunnerData object to a human-readable string representation. + * + * @return string The string representation of the DunnerData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'DunnerData', + [ + 'state' => $this->state, + 'subscriptionId' => $this->subscriptionId, + 'revenueAtRiskInCents' => $this->revenueAtRiskInCents, + 'createdAt' => $this->createdAt, + 'attempts' => $this->attempts, + 'lastAttemptedAt' => $this->lastAttemptedAt, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/DunningStepData.php b/src/Models/DunningStepData.php index 0dfeffa6..aaa7897c 100644 --- a/src/Models/DunningStepData.php +++ b/src/Models/DunningStepData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class DunningStepData implements \JsonSerializable @@ -252,6 +253,29 @@ public function unsetSmsBody(): void $this->smsBody = []; } + /** + * Converts the DunningStepData object to a human-readable string representation. + * + * @return string The string representation of the DunningStepData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'DunningStepData', + [ + 'dayThreshold' => $this->dayThreshold, + 'action' => $this->action, + 'emailBody' => $this->getEmailBody(), + 'emailSubject' => $this->getEmailSubject(), + 'sendEmail' => $this->sendEmail, + 'sendBccEmail' => $this->sendBccEmail, + 'sendSms' => $this->sendSms, + 'smsBody' => $this->getSmsBody(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/DunningStepReached.php b/src/Models/DunningStepReached.php index 9fc59536..41f3ae56 100644 --- a/src/Models/DunningStepReached.php +++ b/src/Models/DunningStepReached.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class DunningStepReached implements \JsonSerializable @@ -98,6 +99,24 @@ public function setNextStep(DunningStepData $nextStep): void $this->nextStep = $nextStep; } + /** + * Converts the DunningStepReached object to a human-readable string representation. + * + * @return string The string representation of the DunningStepReached object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'DunningStepReached', + [ + 'dunner' => $this->dunner, + 'currentStep' => $this->currentStep, + 'nextStep' => $this->nextStep, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/EBBComponent.php b/src/Models/EBBComponent.php index c4b8e9c9..7b9a0dc9 100644 --- a/src/Models/EBBComponent.php +++ b/src/Models/EBBComponent.php @@ -437,6 +437,35 @@ public function unsetIntervalUnit(): void $this->intervalUnit = []; } + /** + * Converts the EBBComponent object to a human-readable string representation. + * + * @return string The string representation of the EBBComponent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'EBBComponent', + [ + 'name' => $this->name, + 'unitName' => $this->unitName, + 'description' => $this->description, + 'handle' => $this->handle, + 'taxable' => $this->taxable, + 'pricingScheme' => $this->pricingScheme, + 'prices' => $this->prices, + 'pricePoints' => $this->pricePoints, + 'unitPrice' => $this->unitPrice, + 'taxCode' => $this->taxCode, + 'hideDateRangeOnInvoice' => $this->hideDateRangeOnInvoice, + 'eventBasedBillingMetricId' => $this->eventBasedBillingMetricId, + 'interval' => $this->interval, + 'intervalUnit' => $this->getIntervalUnit(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/EBBEvent.php b/src/Models/EBBEvent.php index 1b0c66e9..aed568c2 100644 --- a/src/Models/EBBEvent.php +++ b/src/Models/EBBEvent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class EBBEvent implements \JsonSerializable @@ -37,6 +38,19 @@ public function setChargify(?ChargifyEBB $chargify): void $this->chargify = $chargify; } + /** + * Converts the EBBEvent object to a human-readable string representation. + * + * @return string The string representation of the EBBEvent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'EBBEvent', + ['chargify' => $this->chargify, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/EnableWebhooksRequest.php b/src/Models/EnableWebhooksRequest.php index d877dbe6..69d44416 100644 --- a/src/Models/EnableWebhooksRequest.php +++ b/src/Models/EnableWebhooksRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class EnableWebhooksRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setWebhooksEnabled(bool $webhooksEnabled): void $this->webhooksEnabled = $webhooksEnabled; } + /** + * Converts the EnableWebhooksRequest object to a human-readable string representation. + * + * @return string The string representation of the EnableWebhooksRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'EnableWebhooksRequest', + ['webhooksEnabled' => $this->webhooksEnabled, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/EnableWebhooksResponse.php b/src/Models/EnableWebhooksResponse.php index d58f5ebf..ab41ed86 100644 --- a/src/Models/EnableWebhooksResponse.php +++ b/src/Models/EnableWebhooksResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class EnableWebhooksResponse implements \JsonSerializable @@ -37,6 +38,19 @@ public function setWebhooksEnabled(?bool $webhooksEnabled): void $this->webhooksEnabled = $webhooksEnabled; } + /** + * Converts the EnableWebhooksResponse object to a human-readable string representation. + * + * @return string The string representation of the EnableWebhooksResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'EnableWebhooksResponse', + ['webhooksEnabled' => $this->webhooksEnabled, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Endpoint.php b/src/Models/Endpoint.php index 5b28102e..9a444dc6 100644 --- a/src/Models/Endpoint.php +++ b/src/Models/Endpoint.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class Endpoint implements \JsonSerializable @@ -133,6 +134,26 @@ public function setWebhookSubscriptions(?array $webhookSubscriptions): void $this->webhookSubscriptions = $webhookSubscriptions; } + /** + * Converts the Endpoint object to a human-readable string representation. + * + * @return string The string representation of the Endpoint object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Endpoint', + [ + 'id' => $this->id, + 'url' => $this->url, + 'siteId' => $this->siteId, + 'status' => $this->status, + 'webhookSubscriptions' => $this->webhookSubscriptions, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/EndpointResponse.php b/src/Models/EndpointResponse.php index e6d78f35..4a60089e 100644 --- a/src/Models/EndpointResponse.php +++ b/src/Models/EndpointResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class EndpointResponse implements \JsonSerializable @@ -37,6 +38,19 @@ public function setEndpoint(?Endpoint $endpoint): void $this->endpoint = $endpoint; } + /** + * Converts the EndpointResponse object to a human-readable string representation. + * + * @return string The string representation of the EndpointResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'EndpointResponse', + ['endpoint' => $this->endpoint, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Errors.php b/src/Models/Errors.php index d49c3dfb..352200ae 100644 --- a/src/Models/Errors.php +++ b/src/Models/Errors.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class Errors implements \JsonSerializable @@ -68,6 +69,23 @@ public function setPricePoint(?array $pricePoint): void $this->pricePoint = $pricePoint; } + /** + * Converts the Errors object to a human-readable string representation. + * + * @return string The string representation of the Errors object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Errors', + [ + 'perPage' => $this->perPage, + 'pricePoint' => $this->pricePoint, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Event.php b/src/Models/Event.php index 389d65fb..5095b30f 100644 --- a/src/Models/Event.php +++ b/src/Models/Event.php @@ -302,6 +302,28 @@ public function setEventSpecificData($eventSpecificData): void $this->eventSpecificData = $eventSpecificData; } + /** + * Converts the Event object to a human-readable string representation. + * + * @return string The string representation of the Event object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Event', + [ + 'id' => $this->id, + 'key' => $this->key, + 'message' => $this->message, + 'subscriptionId' => $this->subscriptionId, + 'customerId' => $this->customerId, + 'createdAt' => $this->createdAt, + 'eventSpecificData' => $this->eventSpecificData, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/EventBasedBillingSegmentError.php b/src/Models/EventBasedBillingSegmentError.php index 35753a34..c25da8b2 100644 --- a/src/Models/EventBasedBillingSegmentError.php +++ b/src/Models/EventBasedBillingSegmentError.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class EventBasedBillingSegmentError implements \JsonSerializable @@ -52,6 +53,19 @@ public function setSegments(array $segments): void $this->segments = $segments; } + /** + * Converts the EventBasedBillingSegmentError object to a human-readable string representation. + * + * @return string The string representation of the EventBasedBillingSegmentError object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'EventBasedBillingSegmentError', + ['segments' => $this->segments, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/EventResponse.php b/src/Models/EventResponse.php index 0c3b366e..caabeef3 100644 --- a/src/Models/EventResponse.php +++ b/src/Models/EventResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class EventResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setEvent(Event $event): void $this->event = $event; } + /** + * Converts the EventResponse object to a human-readable string representation. + * + * @return string The string representation of the EventResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'EventResponse', + ['event' => $this->event, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/FailedPaymentEvent.php b/src/Models/FailedPaymentEvent.php index f9df9c9e..f272843d 100644 --- a/src/Models/FailedPaymentEvent.php +++ b/src/Models/FailedPaymentEvent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -160,6 +161,26 @@ public function setEventData(FailedPaymentEventData $eventData): void $this->eventData = $eventData; } + /** + * Converts the FailedPaymentEvent object to a human-readable string representation. + * + * @return string The string representation of the FailedPaymentEvent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'FailedPaymentEvent', + [ + 'id' => $this->id, + 'timestamp' => $this->timestamp, + 'invoice' => $this->invoice, + 'eventType' => $this->eventType, + 'eventData' => $this->eventData, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/FailedPaymentEventData.php b/src/Models/FailedPaymentEventData.php index a44034d7..b631cd97 100644 --- a/src/Models/FailedPaymentEventData.php +++ b/src/Models/FailedPaymentEventData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -171,6 +172,26 @@ public function setTransactionId(int $transactionId): void $this->transactionId = $transactionId; } + /** + * Converts the FailedPaymentEventData object to a human-readable string representation. + * + * @return string The string representation of the FailedPaymentEventData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'FailedPaymentEventData', + [ + 'amountInCents' => $this->amountInCents, + 'appliedAmount' => $this->appliedAmount, + 'memo' => $this->getMemo(), + 'paymentMethod' => $this->paymentMethod, + 'transactionId' => $this->transactionId, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/FullSubscriptionGroupResponse.php b/src/Models/FullSubscriptionGroupResponse.php index c0df5133..2069ef01 100644 --- a/src/Models/FullSubscriptionGroupResponse.php +++ b/src/Models/FullSubscriptionGroupResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -403,6 +404,33 @@ public function setAccountBalances(?SubscriptionGroupBalances $accountBalances): $this->accountBalances = $accountBalances; } + /** + * Converts the FullSubscriptionGroupResponse object to a human-readable string representation. + * + * @return string The string representation of the FullSubscriptionGroupResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'FullSubscriptionGroupResponse', + [ + 'uid' => $this->uid, + 'scheme' => $this->scheme, + 'customerId' => $this->customerId, + 'paymentProfileId' => $this->paymentProfileId, + 'subscriptionIds' => $this->subscriptionIds, + 'primarySubscriptionId' => $this->primarySubscriptionId, + 'nextAssessmentAt' => $this->nextAssessmentAt, + 'state' => $this->state, + 'cancelAtEndOfPeriod' => $this->cancelAtEndOfPeriod, + 'currentBillingAmountInCents' => $this->currentBillingAmountInCents, + 'customer' => $this->customer, + 'accountBalances' => $this->accountBalances, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/GetOneTimeTokenPaymentProfile.php b/src/Models/GetOneTimeTokenPaymentProfile.php index 5d9b4369..f95ca2e8 100644 --- a/src/Models/GetOneTimeTokenPaymentProfile.php +++ b/src/Models/GetOneTimeTokenPaymentProfile.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class GetOneTimeTokenPaymentProfile implements \JsonSerializable @@ -617,6 +618,42 @@ public function unsetGatewayHandle(): void $this->gatewayHandle = []; } + /** + * Converts the GetOneTimeTokenPaymentProfile object to a human-readable string representation. + * + * @return string The string representation of the GetOneTimeTokenPaymentProfile object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'GetOneTimeTokenPaymentProfile', + [ + 'id' => $this->getId(), + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'maskedCardNumber' => $this->maskedCardNumber, + 'cardType' => $this->cardType, + 'expirationMonth' => $this->expirationMonth, + 'expirationYear' => $this->expirationYear, + 'customerId' => $this->getCustomerId(), + 'currentVault' => $this->currentVault, + 'vaultToken' => $this->vaultToken, + 'billingAddress' => $this->billingAddress, + 'billingAddress2' => $this->billingAddress2, + 'billingCity' => $this->billingCity, + 'billingCountry' => $this->billingCountry, + 'billingState' => $this->billingState, + 'billingZip' => $this->billingZip, + 'paymentType' => $this->paymentType, + 'disabled' => $this->disabled, + 'siteGatewaySettingId' => $this->siteGatewaySettingId, + 'customerVaultToken' => $this->getCustomerVaultToken(), + 'gatewayHandle' => $this->getGatewayHandle(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/GetOneTimeTokenRequest.php b/src/Models/GetOneTimeTokenRequest.php index 2a010a78..4b320897 100644 --- a/src/Models/GetOneTimeTokenRequest.php +++ b/src/Models/GetOneTimeTokenRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class GetOneTimeTokenRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setPaymentProfile(GetOneTimeTokenPaymentProfile $paymentProfile) $this->paymentProfile = $paymentProfile; } + /** + * Converts the GetOneTimeTokenRequest object to a human-readable string representation. + * + * @return string The string representation of the GetOneTimeTokenRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'GetOneTimeTokenRequest', + ['paymentProfile' => $this->paymentProfile, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/GroupBilling.php b/src/Models/GroupBilling.php index f21fa5b6..5cd5b791 100644 --- a/src/Models/GroupBilling.php +++ b/src/Models/GroupBilling.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -98,6 +99,24 @@ public function setProrate(?bool $prorate): void $this->prorate = $prorate; } + /** + * Converts the GroupBilling object to a human-readable string representation. + * + * @return string The string representation of the GroupBilling object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'GroupBilling', + [ + 'accrue' => $this->accrue, + 'alignDate' => $this->alignDate, + 'prorate' => $this->prorate, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/GroupSettings.php b/src/Models/GroupSettings.php index 996e1be8..64ec9f80 100644 --- a/src/Models/GroupSettings.php +++ b/src/Models/GroupSettings.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class GroupSettings implements \JsonSerializable @@ -75,6 +76,23 @@ public function setBilling(?GroupBilling $billing): void $this->billing = $billing; } + /** + * Converts the GroupSettings object to a human-readable string representation. + * + * @return string The string representation of the GroupSettings object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'GroupSettings', + [ + 'target' => $this->target, + 'billing' => $this->billing, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/GroupTarget.php b/src/Models/GroupTarget.php index 9f0f0d61..7a099d87 100644 --- a/src/Models/GroupTarget.php +++ b/src/Models/GroupTarget.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -80,6 +81,19 @@ public function setId(?int $id): void $this->id = $id; } + /** + * Converts the GroupTarget object to a human-readable string representation. + * + * @return string The string representation of the GroupTarget object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'GroupTarget', + ['type' => $this->type, 'id' => $this->id, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/HistoricUsage.php b/src/Models/HistoricUsage.php index f7a9b1c7..5d26ff44 100644 --- a/src/Models/HistoricUsage.php +++ b/src/Models/HistoricUsage.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -96,6 +97,24 @@ public function setBillingPeriodEndsAt(?\DateTime $billingPeriodEndsAt): void $this->billingPeriodEndsAt = $billingPeriodEndsAt; } + /** + * Converts the HistoricUsage object to a human-readable string representation. + * + * @return string The string representation of the HistoricUsage object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'HistoricUsage', + [ + 'totalUsageQuantity' => $this->totalUsageQuantity, + 'billingPeriodStartsAt' => $this->billingPeriodStartsAt, + 'billingPeriodEndsAt' => $this->billingPeriodEndsAt, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Invoice.php b/src/Models/Invoice.php index f3d18d79..ed95345b 100644 --- a/src/Models/Invoice.php +++ b/src/Models/Invoice.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -1566,6 +1567,77 @@ public function setPublicUrlExpiresOn(?\DateTime $publicUrlExpiresOn): void $this->publicUrlExpiresOn = $publicUrlExpiresOn; } + /** + * Converts the Invoice object to a human-readable string representation. + * + * @return string The string representation of the Invoice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Invoice', + [ + 'id' => $this->id, + 'uid' => $this->uid, + 'siteId' => $this->siteId, + 'customerId' => $this->customerId, + 'subscriptionId' => $this->subscriptionId, + 'number' => $this->number, + 'sequenceNumber' => $this->sequenceNumber, + 'transactionTime' => $this->transactionTime, + 'createdAt' => $this->createdAt, + 'updatedAt' => $this->updatedAt, + 'issueDate' => $this->issueDate, + 'dueDate' => $this->dueDate, + 'paidDate' => $this->getPaidDate(), + 'status' => $this->status, + 'role' => $this->role, + 'parentInvoiceId' => $this->getParentInvoiceId(), + 'collectionMethod' => $this->collectionMethod, + 'paymentInstructions' => $this->paymentInstructions, + 'currency' => $this->currency, + 'consolidationLevel' => $this->consolidationLevel, + 'parentInvoiceUid' => $this->getParentInvoiceUid(), + 'subscriptionGroupId' => $this->getSubscriptionGroupId(), + 'parentInvoiceNumber' => $this->getParentInvoiceNumber(), + 'groupPrimarySubscriptionId' => $this->getGroupPrimarySubscriptionId(), + 'productName' => $this->productName, + 'productFamilyName' => $this->productFamilyName, + 'seller' => $this->seller, + 'customer' => $this->customer, + 'payer' => $this->payer, + 'recipientEmails' => $this->recipientEmails, + 'netTerms' => $this->netTerms, + 'memo' => $this->memo, + 'billingAddress' => $this->billingAddress, + 'shippingAddress' => $this->shippingAddress, + 'subtotalAmount' => $this->subtotalAmount, + 'discountAmount' => $this->discountAmount, + 'taxAmount' => $this->taxAmount, + 'totalAmount' => $this->totalAmount, + 'creditAmount' => $this->creditAmount, + 'debitAmount' => $this->debitAmount, + 'refundAmount' => $this->refundAmount, + 'paidAmount' => $this->paidAmount, + 'dueAmount' => $this->dueAmount, + 'lineItems' => $this->lineItems, + 'discounts' => $this->discounts, + 'taxes' => $this->taxes, + 'credits' => $this->credits, + 'debits' => $this->debits, + 'refunds' => $this->refunds, + 'payments' => $this->payments, + 'customFields' => $this->customFields, + 'displaySettings' => $this->displaySettings, + 'avataxDetails' => $this->avataxDetails, + 'publicUrl' => $this->publicUrl, + 'previousBalanceData' => $this->previousBalanceData, + 'publicUrlExpiresOn' => $this->publicUrlExpiresOn, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceAddress.php b/src/Models/InvoiceAddress.php index ac7a0176..99373f84 100644 --- a/src/Models/InvoiceAddress.php +++ b/src/Models/InvoiceAddress.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoiceAddress implements \JsonSerializable @@ -218,6 +219,27 @@ public function unsetCountry(): void $this->country = []; } + /** + * Converts the InvoiceAddress object to a human-readable string representation. + * + * @return string The string representation of the InvoiceAddress object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceAddress', + [ + 'street' => $this->getStreet(), + 'line2' => $this->getLine2(), + 'city' => $this->getCity(), + 'state' => $this->getState(), + 'zip' => $this->getZip(), + 'country' => $this->getCountry(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceAvataxDetails.php b/src/Models/InvoiceAvataxDetails.php index 0a25ac22..410f8971 100644 --- a/src/Models/InvoiceAvataxDetails.php +++ b/src/Models/InvoiceAvataxDetails.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -187,6 +188,26 @@ public function unsetModifyDate(): void $this->modifyDate = []; } + /** + * Converts the InvoiceAvataxDetails object to a human-readable string representation. + * + * @return string The string representation of the InvoiceAvataxDetails object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceAvataxDetails', + [ + 'id' => $this->getId(), + 'status' => $this->getStatus(), + 'documentCode' => $this->getDocumentCode(), + 'commitDate' => $this->getCommitDate(), + 'modifyDate' => $this->getModifyDate(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceBalanceItem.php b/src/Models/InvoiceBalanceItem.php index bd4f23f4..c1f084ef 100644 --- a/src/Models/InvoiceBalanceItem.php +++ b/src/Models/InvoiceBalanceItem.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoiceBalanceItem implements \JsonSerializable @@ -83,6 +84,24 @@ public function setOutstandingAmount(?string $outstandingAmount): void $this->outstandingAmount = $outstandingAmount; } + /** + * Converts the InvoiceBalanceItem object to a human-readable string representation. + * + * @return string The string representation of the InvoiceBalanceItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceBalanceItem', + [ + 'uid' => $this->uid, + 'number' => $this->number, + 'outstandingAmount' => $this->outstandingAmount, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceCredit.php b/src/Models/InvoiceCredit.php index 3040eeef..826747bf 100644 --- a/src/Models/InvoiceCredit.php +++ b/src/Models/InvoiceCredit.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -177,6 +178,28 @@ public function setAppliedAmount(?string $appliedAmount): void $this->appliedAmount = $appliedAmount; } + /** + * Converts the InvoiceCredit object to a human-readable string representation. + * + * @return string The string representation of the InvoiceCredit object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceCredit', + [ + 'uid' => $this->uid, + 'creditNoteNumber' => $this->creditNoteNumber, + 'creditNoteUid' => $this->creditNoteUid, + 'transactionTime' => $this->transactionTime, + 'memo' => $this->memo, + 'originalAmount' => $this->originalAmount, + 'appliedAmount' => $this->appliedAmount, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceCustomField.php b/src/Models/InvoiceCustomField.php index e2340900..184fc2b4 100644 --- a/src/Models/InvoiceCustomField.php +++ b/src/Models/InvoiceCustomField.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoiceCustomField implements \JsonSerializable @@ -130,6 +131,26 @@ public function setMetadatumId(?int $metadatumId): void $this->metadatumId = $metadatumId; } + /** + * Converts the InvoiceCustomField object to a human-readable string representation. + * + * @return string The string representation of the InvoiceCustomField object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceCustomField', + [ + 'ownerId' => $this->ownerId, + 'ownerType' => $this->ownerType, + 'name' => $this->name, + 'value' => $this->value, + 'metadatumId' => $this->metadatumId, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceCustomer.php b/src/Models/InvoiceCustomer.php index bbc2d009..b04c409d 100644 --- a/src/Models/InvoiceCustomer.php +++ b/src/Models/InvoiceCustomer.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -222,6 +223,28 @@ public function unsetReference(): void $this->reference = []; } + /** + * Converts the InvoiceCustomer object to a human-readable string representation. + * + * @return string The string representation of the InvoiceCustomer object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceCustomer', + [ + 'chargifyId' => $this->getChargifyId(), + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'organization' => $this->getOrganization(), + 'email' => $this->email, + 'vatNumber' => $this->getVatNumber(), + 'reference' => $this->getReference(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceDebit.php b/src/Models/InvoiceDebit.php index 187d936a..47f1f2c6 100644 --- a/src/Models/InvoiceDebit.php +++ b/src/Models/InvoiceDebit.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -203,6 +204,29 @@ public function setAppliedAmount(?string $appliedAmount): void $this->appliedAmount = $appliedAmount; } + /** + * Converts the InvoiceDebit object to a human-readable string representation. + * + * @return string The string representation of the InvoiceDebit object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceDebit', + [ + 'uid' => $this->uid, + 'debitNoteNumber' => $this->debitNoteNumber, + 'debitNoteUid' => $this->debitNoteUid, + 'role' => $this->role, + 'transactionTime' => $this->transactionTime, + 'memo' => $this->memo, + 'originalAmount' => $this->originalAmount, + 'appliedAmount' => $this->appliedAmount, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceDiscount.php b/src/Models/InvoiceDiscount.php index a7847022..5fb10d85 100644 --- a/src/Models/InvoiceDiscount.php +++ b/src/Models/InvoiceDiscount.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoiceDiscount implements \JsonSerializable @@ -307,6 +308,33 @@ public function setLineItemBreakouts(?array $lineItemBreakouts): void $this->lineItemBreakouts = $lineItemBreakouts; } + /** + * Converts the InvoiceDiscount object to a human-readable string representation. + * + * @return string The string representation of the InvoiceDiscount object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceDiscount', + [ + 'uid' => $this->uid, + 'title' => $this->title, + 'description' => $this->getDescription(), + 'code' => $this->code, + 'sourceType' => $this->sourceType, + 'sourceId' => $this->sourceId, + 'discountType' => $this->discountType, + 'percentage' => $this->percentage, + 'eligibleAmount' => $this->eligibleAmount, + 'discountAmount' => $this->discountAmount, + 'transactionId' => $this->transactionId, + 'lineItemBreakouts' => $this->lineItemBreakouts, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceDiscountBreakout.php b/src/Models/InvoiceDiscountBreakout.php index 0ed8232a..cd1ce6ee 100644 --- a/src/Models/InvoiceDiscountBreakout.php +++ b/src/Models/InvoiceDiscountBreakout.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoiceDiscountBreakout implements \JsonSerializable @@ -83,6 +84,24 @@ public function setDiscountAmount(?string $discountAmount): void $this->discountAmount = $discountAmount; } + /** + * Converts the InvoiceDiscountBreakout object to a human-readable string representation. + * + * @return string The string representation of the InvoiceDiscountBreakout object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceDiscountBreakout', + [ + 'uid' => $this->uid, + 'eligibleAmount' => $this->eligibleAmount, + 'discountAmount' => $this->discountAmount, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceDisplaySettings.php b/src/Models/InvoiceDisplaySettings.php index b64fdcf0..e85f0e49 100644 --- a/src/Models/InvoiceDisplaySettings.php +++ b/src/Models/InvoiceDisplaySettings.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoiceDisplaySettings implements \JsonSerializable @@ -60,6 +61,23 @@ public function setIncludeDiscountsOnLines(?bool $includeDiscountsOnLines): void $this->includeDiscountsOnLines = $includeDiscountsOnLines; } + /** + * Converts the InvoiceDisplaySettings object to a human-readable string representation. + * + * @return string The string representation of the InvoiceDisplaySettings object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceDisplaySettings', + [ + 'hideZeroSubtotalLines' => $this->hideZeroSubtotalLines, + 'includeDiscountsOnLines' => $this->includeDiscountsOnLines, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceIssued.php b/src/Models/InvoiceIssued.php index dc14c7cf..93cc7e33 100644 --- a/src/Models/InvoiceIssued.php +++ b/src/Models/InvoiceIssued.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -431,6 +432,36 @@ public function setLineItems(array $lineItems): void $this->lineItems = $lineItems; } + /** + * Converts the InvoiceIssued object to a human-readable string representation. + * + * @return string The string representation of the InvoiceIssued object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceIssued', + [ + 'uid' => $this->uid, + 'number' => $this->number, + 'role' => $this->role, + 'dueDate' => $this->dueDate, + 'issueDate' => $this->issueDate, + 'paidDate' => $this->paidDate, + 'dueAmount' => $this->dueAmount, + 'paidAmount' => $this->paidAmount, + 'taxAmount' => $this->taxAmount, + 'refundAmount' => $this->refundAmount, + 'totalAmount' => $this->totalAmount, + 'statusAmount' => $this->statusAmount, + 'productName' => $this->productName, + 'consolidationLevel' => $this->consolidationLevel, + 'lineItems' => $this->lineItems, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceLineItem.php b/src/Models/InvoiceLineItem.php index cad5ae02..5c65d677 100644 --- a/src/Models/InvoiceLineItem.php +++ b/src/Models/InvoiceLineItem.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -749,6 +750,44 @@ public function setKind(?string $kind): void $this->kind = $kind; } + /** + * Converts the InvoiceLineItem object to a human-readable string representation. + * + * @return string The string representation of the InvoiceLineItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceLineItem', + [ + 'uid' => $this->uid, + 'title' => $this->title, + 'description' => $this->description, + 'quantity' => $this->quantity, + 'unitPrice' => $this->unitPrice, + 'subtotalAmount' => $this->subtotalAmount, + 'discountAmount' => $this->discountAmount, + 'taxAmount' => $this->taxAmount, + 'totalAmount' => $this->totalAmount, + 'tieredUnitPrice' => $this->tieredUnitPrice, + 'periodRangeStart' => $this->periodRangeStart, + 'periodRangeEnd' => $this->periodRangeEnd, + 'transactionId' => $this->transactionId, + 'productId' => $this->getProductId(), + 'productVersion' => $this->getProductVersion(), + 'componentId' => $this->getComponentId(), + 'pricePointId' => $this->getPricePointId(), + 'billingScheduleItemId' => $this->getBillingScheduleItemId(), + 'hide' => $this->hide, + 'componentCostData' => $this->getComponentCostData(), + 'productPricePointId' => $this->getProductPricePointId(), + 'customItem' => $this->customItem, + 'kind' => $this->kind, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceLineItemComponentCostData.php b/src/Models/InvoiceLineItemComponentCostData.php index 66abadb6..79b6a615 100644 --- a/src/Models/InvoiceLineItemComponentCostData.php +++ b/src/Models/InvoiceLineItemComponentCostData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoiceLineItemComponentCostData implements \JsonSerializable @@ -41,6 +42,19 @@ public function setRates(?array $rates): void $this->rates = $rates; } + /** + * Converts the InvoiceLineItemComponentCostData object to a human-readable string representation. + * + * @return string The string representation of the InvoiceLineItemComponentCostData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceLineItemComponentCostData', + ['rates' => $this->rates, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceLineItemEventData.php b/src/Models/InvoiceLineItemEventData.php index 413fa477..3f256d6d 100644 --- a/src/Models/InvoiceLineItemEventData.php +++ b/src/Models/InvoiceLineItemEventData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoiceLineItemEventData implements \JsonSerializable @@ -566,6 +567,41 @@ public function unsetCustomItem(): void $this->customItem = []; } + /** + * Converts the InvoiceLineItemEventData object to a human-readable string representation. + * + * @return string The string representation of the InvoiceLineItemEventData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceLineItemEventData', + [ + 'uid' => $this->uid, + 'title' => $this->title, + 'description' => $this->description, + 'quantity' => $this->quantity, + 'quantityDelta' => $this->getQuantityDelta(), + 'unitPrice' => $this->unitPrice, + 'periodRangeStart' => $this->periodRangeStart, + 'periodRangeEnd' => $this->periodRangeEnd, + 'amount' => $this->amount, + 'lineReferences' => $this->lineReferences, + 'pricingDetailsIndex' => $this->getPricingDetailsIndex(), + 'pricingDetails' => $this->pricingDetails, + 'taxCode' => $this->getTaxCode(), + 'taxAmount' => $this->taxAmount, + 'productId' => $this->productId, + 'productPricePointId' => $this->getProductPricePointId(), + 'pricePointId' => $this->getPricePointId(), + 'componentId' => $this->getComponentId(), + 'billingScheduleItemId' => $this->getBillingScheduleItemId(), + 'customItem' => $this->getCustomItem(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceLineItemPricingDetail.php b/src/Models/InvoiceLineItemPricingDetail.php index 696d63b5..24e12856 100644 --- a/src/Models/InvoiceLineItemPricingDetail.php +++ b/src/Models/InvoiceLineItemPricingDetail.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoiceLineItemPricingDetail implements \JsonSerializable @@ -60,6 +61,23 @@ public function setAmount(?string $amount): void $this->amount = $amount; } + /** + * Converts the InvoiceLineItemPricingDetail object to a human-readable string representation. + * + * @return string The string representation of the InvoiceLineItemPricingDetail object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceLineItemPricingDetail', + [ + 'label' => $this->label, + 'amount' => $this->amount, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoicePayer.php b/src/Models/InvoicePayer.php index 077aaa3e..8c1c1674 100644 --- a/src/Models/InvoicePayer.php +++ b/src/Models/InvoicePayer.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoicePayer implements \JsonSerializable @@ -174,6 +175,27 @@ public function unsetVatNumber(): void $this->vatNumber = []; } + /** + * Converts the InvoicePayer object to a human-readable string representation. + * + * @return string The string representation of the InvoicePayer object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoicePayer', + [ + 'chargifyId' => $this->chargifyId, + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'organization' => $this->getOrganization(), + 'email' => $this->email, + 'vatNumber' => $this->getVatNumber(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoicePayerChange.php b/src/Models/InvoicePayerChange.php index 99c6b904..996be2b0 100644 --- a/src/Models/InvoicePayerChange.php +++ b/src/Models/InvoicePayerChange.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoicePayerChange implements \JsonSerializable @@ -106,6 +107,25 @@ public function setEmail(?string $email): void $this->email = $email; } + /** + * Converts the InvoicePayerChange object to a human-readable string representation. + * + * @return string The string representation of the InvoicePayerChange object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoicePayerChange', + [ + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'organization' => $this->organization, + 'email' => $this->email, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoicePayment.php b/src/Models/InvoicePayment.php index 5f66f945..1b12ff58 100644 --- a/src/Models/InvoicePayment.php +++ b/src/Models/InvoicePayment.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -338,6 +339,33 @@ public function setUid(?string $uid): void $this->uid = $uid; } + /** + * Converts the InvoicePayment object to a human-readable string representation. + * + * @return string The string representation of the InvoicePayment object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoicePayment', + [ + 'transactionTime' => $this->transactionTime, + 'memo' => $this->memo, + 'originalAmount' => $this->originalAmount, + 'appliedAmount' => $this->appliedAmount, + 'paymentMethod' => $this->paymentMethod, + 'transactionId' => $this->transactionId, + 'prepayment' => $this->prepayment, + 'gatewayHandle' => $this->getGatewayHandle(), + 'gatewayUsed' => $this->gatewayUsed, + 'gatewayTransactionId' => $this->getGatewayTransactionId(), + 'receivedOn' => $this->getReceivedOn(), + 'uid' => $this->uid, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoicePaymentApplication.php b/src/Models/InvoicePaymentApplication.php index 7d0fa434..13a1fe94 100644 --- a/src/Models/InvoicePaymentApplication.php +++ b/src/Models/InvoicePaymentApplication.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoicePaymentApplication implements \JsonSerializable @@ -89,6 +90,24 @@ public function setAppliedAmount(?string $appliedAmount): void $this->appliedAmount = $appliedAmount; } + /** + * Converts the InvoicePaymentApplication object to a human-readable string representation. + * + * @return string The string representation of the InvoicePaymentApplication object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoicePaymentApplication', + [ + 'invoiceUid' => $this->invoiceUid, + 'applicationUid' => $this->applicationUid, + 'appliedAmount' => $this->appliedAmount, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoicePaymentMethod.php b/src/Models/InvoicePaymentMethod.php index dea112a0..eaa8eb07 100644 --- a/src/Models/InvoicePaymentMethod.php +++ b/src/Models/InvoicePaymentMethod.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoicePaymentMethod implements \JsonSerializable @@ -209,6 +210,29 @@ public function setMaskedCardNumber(?string $maskedCardNumber): void $this->maskedCardNumber = $maskedCardNumber; } + /** + * Converts the InvoicePaymentMethod object to a human-readable string representation. + * + * @return string The string representation of the InvoicePaymentMethod object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoicePaymentMethod', + [ + 'details' => $this->details, + 'kind' => $this->kind, + 'memo' => $this->memo, + 'type' => $this->type, + 'cardBrand' => $this->cardBrand, + 'cardExpiration' => $this->cardExpiration, + 'lastFour' => $this->getLastFour(), + 'maskedCardNumber' => $this->maskedCardNumber, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoicePrePayment.php b/src/Models/InvoicePrePayment.php index edefc66a..80779be2 100644 --- a/src/Models/InvoicePrePayment.php +++ b/src/Models/InvoicePrePayment.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoicePrePayment implements \JsonSerializable @@ -89,6 +90,24 @@ public function setEndingBalanceInCents(?int $endingBalanceInCents): void $this->endingBalanceInCents = $endingBalanceInCents; } + /** + * Converts the InvoicePrePayment object to a human-readable string representation. + * + * @return string The string representation of the InvoicePrePayment object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoicePrePayment', + [ + 'subscriptionId' => $this->subscriptionId, + 'amountInCents' => $this->amountInCents, + 'endingBalanceInCents' => $this->endingBalanceInCents, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoicePreviousBalance.php b/src/Models/InvoicePreviousBalance.php index 233e711b..135bc93d 100644 --- a/src/Models/InvoicePreviousBalance.php +++ b/src/Models/InvoicePreviousBalance.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -66,6 +67,23 @@ public function setInvoices(?array $invoices): void $this->invoices = $invoices; } + /** + * Converts the InvoicePreviousBalance object to a human-readable string representation. + * + * @return string The string representation of the InvoicePreviousBalance object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoicePreviousBalance', + [ + 'capturedAt' => $this->capturedAt, + 'invoices' => $this->invoices, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceRefund.php b/src/Models/InvoiceRefund.php index 833bd307..e7d16eb3 100644 --- a/src/Models/InvoiceRefund.php +++ b/src/Models/InvoiceRefund.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoiceRefund implements \JsonSerializable @@ -257,6 +258,30 @@ public function unsetAchLateReject(): void $this->achLateReject = []; } + /** + * Converts the InvoiceRefund object to a human-readable string representation. + * + * @return string The string representation of the InvoiceRefund object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceRefund', + [ + 'transactionId' => $this->transactionId, + 'paymentId' => $this->paymentId, + 'memo' => $this->memo, + 'originalAmount' => $this->originalAmount, + 'appliedAmount' => $this->appliedAmount, + 'gatewayTransactionId' => $this->getGatewayTransactionId(), + 'gatewayUsed' => $this->gatewayUsed, + 'gatewayHandle' => $this->getGatewayHandle(), + 'achLateReject' => $this->getAchLateReject(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceResponse.php b/src/Models/InvoiceResponse.php index c3b6525e..716b837d 100644 --- a/src/Models/InvoiceResponse.php +++ b/src/Models/InvoiceResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoiceResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setInvoice(Invoice $invoice): void $this->invoice = $invoice; } + /** + * Converts the InvoiceResponse object to a human-readable string representation. + * + * @return string The string representation of the InvoiceResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceResponse', + ['invoice' => $this->invoice, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceSeller.php b/src/Models/InvoiceSeller.php index c12674a0..90596dee 100644 --- a/src/Models/InvoiceSeller.php +++ b/src/Models/InvoiceSeller.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -120,6 +121,25 @@ public function unsetLogoUrl(): void $this->logoUrl = []; } + /** + * Converts the InvoiceSeller object to a human-readable string representation. + * + * @return string The string representation of the InvoiceSeller object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceSeller', + [ + 'name' => $this->name, + 'address' => $this->address, + 'phone' => $this->phone, + 'logoUrl' => $this->getLogoUrl(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceTax.php b/src/Models/InvoiceTax.php index 2bcde9b6..c7b00162 100644 --- a/src/Models/InvoiceTax.php +++ b/src/Models/InvoiceTax.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoiceTax implements \JsonSerializable @@ -356,6 +357,35 @@ public function setTaxExemptAmount(?string $taxExemptAmount): void $this->taxExemptAmount = $taxExemptAmount; } + /** + * Converts the InvoiceTax object to a human-readable string representation. + * + * @return string The string representation of the InvoiceTax object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceTax', + [ + 'uid' => $this->uid, + 'title' => $this->title, + 'description' => $this->getDescription(), + 'sourceType' => $this->sourceType, + 'sourceId' => $this->sourceId, + 'percentage' => $this->percentage, + 'taxableAmount' => $this->taxableAmount, + 'taxAmount' => $this->taxAmount, + 'transactionId' => $this->transactionId, + 'lineItemBreakouts' => $this->lineItemBreakouts, + 'taxComponentBreakouts' => $this->taxComponentBreakouts, + 'euVat' => $this->euVat, + 'type' => $this->type, + 'taxExemptAmount' => $this->taxExemptAmount, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceTaxBreakout.php b/src/Models/InvoiceTaxBreakout.php index 6b772a62..ac7f4013 100644 --- a/src/Models/InvoiceTaxBreakout.php +++ b/src/Models/InvoiceTaxBreakout.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoiceTaxBreakout implements \JsonSerializable @@ -106,6 +107,25 @@ public function setTaxExemptAmount(?string $taxExemptAmount): void $this->taxExemptAmount = $taxExemptAmount; } + /** + * Converts the InvoiceTaxBreakout object to a human-readable string representation. + * + * @return string The string representation of the InvoiceTaxBreakout object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceTaxBreakout', + [ + 'uid' => $this->uid, + 'taxableAmount' => $this->taxableAmount, + 'taxAmount' => $this->taxAmount, + 'taxExemptAmount' => $this->taxExemptAmount, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/InvoiceTaxComponentBreakout.php b/src/Models/InvoiceTaxComponentBreakout.php index 9a081f57..4f2733eb 100644 --- a/src/Models/InvoiceTaxComponentBreakout.php +++ b/src/Models/InvoiceTaxComponentBreakout.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class InvoiceTaxComponentBreakout implements \JsonSerializable @@ -336,6 +337,35 @@ public function setTaxSubType(?string $taxSubType): void $this->taxSubType = $taxSubType; } + /** + * Converts the InvoiceTaxComponentBreakout object to a human-readable string representation. + * + * @return string The string representation of the InvoiceTaxComponentBreakout object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'InvoiceTaxComponentBreakout', + [ + 'taxRuleId' => $this->taxRuleId, + 'percentage' => $this->percentage, + 'countryCode' => $this->countryCode, + 'subdivisionCode' => $this->subdivisionCode, + 'taxAmount' => $this->taxAmount, + 'taxableAmount' => $this->taxableAmount, + 'taxExemptAmount' => $this->taxExemptAmount, + 'nonTaxableAmount' => $this->nonTaxableAmount, + 'taxName' => $this->taxName, + 'taxType' => $this->taxType, + 'rateType' => $this->rateType, + 'taxAuthorityType' => $this->taxAuthorityType, + 'stateAssignedNo' => $this->stateAssignedNo, + 'taxSubType' => $this->taxSubType, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/IssueAdvanceInvoiceRequest.php b/src/Models/IssueAdvanceInvoiceRequest.php index 5507442b..a753723a 100644 --- a/src/Models/IssueAdvanceInvoiceRequest.php +++ b/src/Models/IssueAdvanceInvoiceRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class IssueAdvanceInvoiceRequest implements \JsonSerializable @@ -37,6 +38,19 @@ public function setForce(?bool $force): void $this->force = $force; } + /** + * Converts the IssueAdvanceInvoiceRequest object to a human-readable string representation. + * + * @return string The string representation of the IssueAdvanceInvoiceRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'IssueAdvanceInvoiceRequest', + ['force' => $this->force, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/IssueInvoiceEvent.php b/src/Models/IssueInvoiceEvent.php index 0610fd60..bc261360 100644 --- a/src/Models/IssueInvoiceEvent.php +++ b/src/Models/IssueInvoiceEvent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -160,6 +161,26 @@ public function setEventData(IssueInvoiceEventData $eventData): void $this->eventData = $eventData; } + /** + * Converts the IssueInvoiceEvent object to a human-readable string representation. + * + * @return string The string representation of the IssueInvoiceEvent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'IssueInvoiceEvent', + [ + 'id' => $this->id, + 'timestamp' => $this->timestamp, + 'invoice' => $this->invoice, + 'eventType' => $this->eventType, + 'eventData' => $this->eventData, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/IssueInvoiceEventData.php b/src/Models/IssueInvoiceEventData.php index 9fbd9a55..f6cb3e37 100644 --- a/src/Models/IssueInvoiceEventData.php +++ b/src/Models/IssueInvoiceEventData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -197,6 +198,26 @@ public function setTotalAmount(string $totalAmount): void $this->totalAmount = $totalAmount; } + /** + * Converts the IssueInvoiceEventData object to a human-readable string representation. + * + * @return string The string representation of the IssueInvoiceEventData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'IssueInvoiceEventData', + [ + 'consolidationLevel' => $this->consolidationLevel, + 'fromStatus' => $this->fromStatus, + 'toStatus' => $this->toStatus, + 'dueAmount' => $this->dueAmount, + 'totalAmount' => $this->totalAmount, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/IssueInvoiceRequest.php b/src/Models/IssueInvoiceRequest.php index 0c671817..4c9eeb01 100644 --- a/src/Models/IssueInvoiceRequest.php +++ b/src/Models/IssueInvoiceRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class IssueInvoiceRequest implements \JsonSerializable @@ -58,6 +59,19 @@ public function setOnFailedPayment(?string $onFailedPayment): void $this->onFailedPayment = $onFailedPayment; } + /** + * Converts the IssueInvoiceRequest object to a human-readable string representation. + * + * @return string The string representation of the IssueInvoiceRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'IssueInvoiceRequest', + ['onFailedPayment' => $this->onFailedPayment, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/IssueServiceCredit.php b/src/Models/IssueServiceCredit.php index 9fb492cb..97cdc3a2 100644 --- a/src/Models/IssueServiceCredit.php +++ b/src/Models/IssueServiceCredit.php @@ -75,6 +75,23 @@ public function setMemo(?string $memo): void $this->memo = $memo; } + /** + * Converts the IssueServiceCredit object to a human-readable string representation. + * + * @return string The string representation of the IssueServiceCredit object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'IssueServiceCredit', + [ + 'amount' => $this->amount, + 'memo' => $this->memo, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/IssueServiceCreditRequest.php b/src/Models/IssueServiceCreditRequest.php index c2db3306..a1e5450d 100644 --- a/src/Models/IssueServiceCreditRequest.php +++ b/src/Models/IssueServiceCreditRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class IssueServiceCreditRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setServiceCredit(IssueServiceCredit $serviceCredit): void $this->serviceCredit = $serviceCredit; } + /** + * Converts the IssueServiceCreditRequest object to a human-readable string representation. + * + * @return string The string representation of the IssueServiceCreditRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'IssueServiceCreditRequest', + ['serviceCredit' => $this->serviceCredit, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ItemPricePointChanged.php b/src/Models/ItemPricePointChanged.php index c953eda3..debdb0f7 100644 --- a/src/Models/ItemPricePointChanged.php +++ b/src/Models/ItemPricePointChanged.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ItemPricePointChanged implements \JsonSerializable @@ -182,6 +183,27 @@ public function setCurrentPricePoint(ItemPricePointData $currentPricePoint): voi $this->currentPricePoint = $currentPricePoint; } + /** + * Converts the ItemPricePointChanged object to a human-readable string representation. + * + * @return string The string representation of the ItemPricePointChanged object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ItemPricePointChanged', + [ + 'itemId' => $this->itemId, + 'itemType' => $this->itemType, + 'itemHandle' => $this->itemHandle, + 'itemName' => $this->itemName, + 'previousPricePoint' => $this->previousPricePoint, + 'currentPricePoint' => $this->currentPricePoint, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ItemPricePointData.php b/src/Models/ItemPricePointData.php index 8cd50b23..4d8a4679 100644 --- a/src/Models/ItemPricePointData.php +++ b/src/Models/ItemPricePointData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ItemPricePointData implements \JsonSerializable @@ -83,6 +84,24 @@ public function setName(?string $name): void $this->name = $name; } + /** + * Converts the ItemPricePointData object to a human-readable string representation. + * + * @return string The string representation of the ItemPricePointData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ItemPricePointData', + [ + 'id' => $this->id, + 'handle' => $this->handle, + 'name' => $this->name, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListComponentsFilter.php b/src/Models/ListComponentsFilter.php index 3b38efdf..620c1a07 100644 --- a/src/Models/ListComponentsFilter.php +++ b/src/Models/ListComponentsFilter.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListComponentsFilter implements \JsonSerializable @@ -72,6 +73,23 @@ public function setUseSiteExchangeRate(?bool $useSiteExchangeRate): void $this->useSiteExchangeRate = $useSiteExchangeRate; } + /** + * Converts the ListComponentsFilter object to a human-readable string representation. + * + * @return string The string representation of the ListComponentsFilter object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListComponentsFilter', + [ + 'ids' => $this->ids, + 'useSiteExchangeRate' => $this->useSiteExchangeRate, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListComponentsPricePointsResponse.php b/src/Models/ListComponentsPricePointsResponse.php index 762888bc..edb9e0bd 100644 --- a/src/Models/ListComponentsPricePointsResponse.php +++ b/src/Models/ListComponentsPricePointsResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListComponentsPricePointsResponse implements \JsonSerializable @@ -50,6 +51,19 @@ public function setPricePoints(array $pricePoints): void $this->pricePoints = $pricePoints; } + /** + * Converts the ListComponentsPricePointsResponse object to a human-readable string representation. + * + * @return string The string representation of the ListComponentsPricePointsResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListComponentsPricePointsResponse', + ['pricePoints' => $this->pricePoints, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListCouponsFilter.php b/src/Models/ListCouponsFilter.php index afccc2da..e97c75e9 100644 --- a/src/Models/ListCouponsFilter.php +++ b/src/Models/ListCouponsFilter.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -254,6 +255,29 @@ public function setUseSiteExchangeRate(?bool $useSiteExchangeRate): void $this->useSiteExchangeRate = $useSiteExchangeRate; } + /** + * Converts the ListCouponsFilter object to a human-readable string representation. + * + * @return string The string representation of the ListCouponsFilter object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListCouponsFilter', + [ + 'dateField' => $this->dateField, + 'startDate' => $this->startDate, + 'endDate' => $this->endDate, + 'startDatetime' => $this->startDatetime, + 'endDatetime' => $this->endDatetime, + 'ids' => $this->ids, + 'codes' => $this->codes, + 'useSiteExchangeRate' => $this->useSiteExchangeRate, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListCreditNotesResponse.php b/src/Models/ListCreditNotesResponse.php index f057ff4d..3f9b1e18 100644 --- a/src/Models/ListCreditNotesResponse.php +++ b/src/Models/ListCreditNotesResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListCreditNotesResponse implements \JsonSerializable @@ -50,6 +51,19 @@ public function setCreditNotes(array $creditNotes): void $this->creditNotes = $creditNotes; } + /** + * Converts the ListCreditNotesResponse object to a human-readable string representation. + * + * @return string The string representation of the ListCreditNotesResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListCreditNotesResponse', + ['creditNotes' => $this->creditNotes, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListInvoiceEventsResponse.php b/src/Models/ListInvoiceEventsResponse.php index 5638096f..78895e44 100644 --- a/src/Models/ListInvoiceEventsResponse.php +++ b/src/Models/ListInvoiceEventsResponse.php @@ -112,6 +112,25 @@ public function setTotalPages(?int $totalPages): void $this->totalPages = $totalPages; } + /** + * Converts the ListInvoiceEventsResponse object to a human-readable string representation. + * + * @return string The string representation of the ListInvoiceEventsResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListInvoiceEventsResponse', + [ + 'events' => $this->events, + 'page' => $this->page, + 'perPage' => $this->perPage, + 'totalPages' => $this->totalPages, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListInvoicesResponse.php b/src/Models/ListInvoicesResponse.php index 874967de..51dda6ea 100644 --- a/src/Models/ListInvoicesResponse.php +++ b/src/Models/ListInvoicesResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListInvoicesResponse implements \JsonSerializable @@ -50,6 +51,19 @@ public function setInvoices(array $invoices): void $this->invoices = $invoices; } + /** + * Converts the ListInvoicesResponse object to a human-readable string representation. + * + * @return string The string representation of the ListInvoicesResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListInvoicesResponse', + ['invoices' => $this->invoices, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListMRRResponse.php b/src/Models/ListMRRResponse.php index d0d290f9..251f894c 100644 --- a/src/Models/ListMRRResponse.php +++ b/src/Models/ListMRRResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListMRRResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setMrr(ListMRRResponseResult $mrr): void $this->mrr = $mrr; } + /** + * Converts the ListMRRResponse object to a human-readable string representation. + * + * @return string The string representation of the ListMRRResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListMRRResponse', + ['mrr' => $this->mrr, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListMRRResponseResult.php b/src/Models/ListMRRResponseResult.php index 81608a16..348f911e 100644 --- a/src/Models/ListMRRResponseResult.php +++ b/src/Models/ListMRRResponseResult.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListMRRResponseResult implements \JsonSerializable @@ -179,6 +180,28 @@ public function setMovements(?array $movements): void $this->movements = $movements; } + /** + * Converts the ListMRRResponseResult object to a human-readable string representation. + * + * @return string The string representation of the ListMRRResponseResult object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListMRRResponseResult', + [ + 'page' => $this->page, + 'perPage' => $this->perPage, + 'totalPages' => $this->totalPages, + 'totalEntries' => $this->totalEntries, + 'currency' => $this->currency, + 'currencySymbol' => $this->currencySymbol, + 'movements' => $this->movements, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListMetafieldsResponse.php b/src/Models/ListMetafieldsResponse.php index c0a3c8e9..24b1fc65 100644 --- a/src/Models/ListMetafieldsResponse.php +++ b/src/Models/ListMetafieldsResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListMetafieldsResponse implements \JsonSerializable @@ -133,6 +134,26 @@ public function setMetafields(?array $metafields): void $this->metafields = $metafields; } + /** + * Converts the ListMetafieldsResponse object to a human-readable string representation. + * + * @return string The string representation of the ListMetafieldsResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListMetafieldsResponse', + [ + 'totalCount' => $this->totalCount, + 'currentPage' => $this->currentPage, + 'totalPages' => $this->totalPages, + 'perPage' => $this->perPage, + 'metafields' => $this->metafields, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListMrrFilter.php b/src/Models/ListMrrFilter.php index 44c00250..456c2a37 100644 --- a/src/Models/ListMrrFilter.php +++ b/src/Models/ListMrrFilter.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListMrrFilter implements \JsonSerializable @@ -43,6 +44,19 @@ public function setSubscriptionIds(?array $subscriptionIds): void $this->subscriptionIds = $subscriptionIds; } + /** + * Converts the ListMrrFilter object to a human-readable string representation. + * + * @return string The string representation of the ListMrrFilter object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListMrrFilter', + ['subscriptionIds' => $this->subscriptionIds, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListOffersResponse.php b/src/Models/ListOffersResponse.php index 505ddcae..ddda4dca 100644 --- a/src/Models/ListOffersResponse.php +++ b/src/Models/ListOffersResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListOffersResponse implements \JsonSerializable @@ -41,6 +42,19 @@ public function setOffers(?array $offers): void $this->offers = $offers; } + /** + * Converts the ListOffersResponse object to a human-readable string representation. + * + * @return string The string representation of the ListOffersResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListOffersResponse', + ['offers' => $this->offers, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListPrepaymentsFilter.php b/src/Models/ListPrepaymentsFilter.php index 24b819ab..715fc5d8 100644 --- a/src/Models/ListPrepaymentsFilter.php +++ b/src/Models/ListPrepaymentsFilter.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -105,6 +106,24 @@ public function setEndDate(?\DateTime $endDate): void $this->endDate = $endDate; } + /** + * Converts the ListPrepaymentsFilter object to a human-readable string representation. + * + * @return string The string representation of the ListPrepaymentsFilter object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListPrepaymentsFilter', + [ + 'dateField' => $this->dateField, + 'startDate' => $this->startDate, + 'endDate' => $this->endDate, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListPricePointsFilter.php b/src/Models/ListPricePointsFilter.php index 201bf2c8..9ae6067c 100644 --- a/src/Models/ListPricePointsFilter.php +++ b/src/Models/ListPricePointsFilter.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -252,6 +253,29 @@ public function setArchivedAt(?string $archivedAt): void $this->archivedAt = $archivedAt; } + /** + * Converts the ListPricePointsFilter object to a human-readable string representation. + * + * @return string The string representation of the ListPricePointsFilter object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListPricePointsFilter', + [ + 'dateField' => $this->dateField, + 'startDate' => $this->startDate, + 'endDate' => $this->endDate, + 'startDatetime' => $this->startDatetime, + 'endDatetime' => $this->endDatetime, + 'type' => $this->type, + 'ids' => $this->ids, + 'archivedAt' => $this->archivedAt, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListProductPricePointsResponse.php b/src/Models/ListProductPricePointsResponse.php index 9e2de1ac..f163481a 100644 --- a/src/Models/ListProductPricePointsResponse.php +++ b/src/Models/ListProductPricePointsResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListProductPricePointsResponse implements \JsonSerializable @@ -50,6 +51,19 @@ public function setPricePoints(array $pricePoints): void $this->pricePoints = $pricePoints; } + /** + * Converts the ListProductPricePointsResponse object to a human-readable string representation. + * + * @return string The string representation of the ListProductPricePointsResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListProductPricePointsResponse', + ['pricePoints' => $this->pricePoints, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListProductsFilter.php b/src/Models/ListProductsFilter.php index 2c5757bd..5524d5fd 100644 --- a/src/Models/ListProductsFilter.php +++ b/src/Models/ListProductsFilter.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListProductsFilter implements \JsonSerializable @@ -99,6 +100,24 @@ public function setUseSiteExchangeRate(?bool $useSiteExchangeRate): void $this->useSiteExchangeRate = $useSiteExchangeRate; } + /** + * Converts the ListProductsFilter object to a human-readable string representation. + * + * @return string The string representation of the ListProductsFilter object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListProductsFilter', + [ + 'ids' => $this->ids, + 'prepaidProductPricePoint' => $this->prepaidProductPricePoint, + 'useSiteExchangeRate' => $this->useSiteExchangeRate, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListProformaInvoicesMeta.php b/src/Models/ListProformaInvoicesMeta.php index f35d7677..f44c000d 100644 --- a/src/Models/ListProformaInvoicesMeta.php +++ b/src/Models/ListProformaInvoicesMeta.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListProformaInvoicesMeta implements \JsonSerializable @@ -106,6 +107,25 @@ public function setStatusCode(?int $statusCode): void $this->statusCode = $statusCode; } + /** + * Converts the ListProformaInvoicesMeta object to a human-readable string representation. + * + * @return string The string representation of the ListProformaInvoicesMeta object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListProformaInvoicesMeta', + [ + 'totalCount' => $this->totalCount, + 'currentPage' => $this->currentPage, + 'totalPages' => $this->totalPages, + 'statusCode' => $this->statusCode, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListProformaInvoicesResponse.php b/src/Models/ListProformaInvoicesResponse.php index 96f56095..8f492706 100644 --- a/src/Models/ListProformaInvoicesResponse.php +++ b/src/Models/ListProformaInvoicesResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListProformaInvoicesResponse implements \JsonSerializable @@ -64,6 +65,23 @@ public function setMeta(?ListProformaInvoicesMeta $meta): void $this->meta = $meta; } + /** + * Converts the ListProformaInvoicesResponse object to a human-readable string representation. + * + * @return string The string representation of the ListProformaInvoicesResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListProformaInvoicesResponse', + [ + 'proformaInvoices' => $this->proformaInvoices, + 'meta' => $this->meta, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListPublicKeysMeta.php b/src/Models/ListPublicKeysMeta.php index cdbdca6d..28b0ab06 100644 --- a/src/Models/ListPublicKeysMeta.php +++ b/src/Models/ListPublicKeysMeta.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListPublicKeysMeta implements \JsonSerializable @@ -106,6 +107,25 @@ public function setPerPage(?int $perPage): void $this->perPage = $perPage; } + /** + * Converts the ListPublicKeysMeta object to a human-readable string representation. + * + * @return string The string representation of the ListPublicKeysMeta object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListPublicKeysMeta', + [ + 'totalCount' => $this->totalCount, + 'currentPage' => $this->currentPage, + 'totalPages' => $this->totalPages, + 'perPage' => $this->perPage, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListPublicKeysResponse.php b/src/Models/ListPublicKeysResponse.php index e7e238c1..390b8117 100644 --- a/src/Models/ListPublicKeysResponse.php +++ b/src/Models/ListPublicKeysResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListPublicKeysResponse implements \JsonSerializable @@ -64,6 +65,23 @@ public function setMeta(?ListPublicKeysMeta $meta): void $this->meta = $meta; } + /** + * Converts the ListPublicKeysResponse object to a human-readable string representation. + * + * @return string The string representation of the ListPublicKeysResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListPublicKeysResponse', + [ + 'chargifyJsKeys' => $this->chargifyJsKeys, + 'meta' => $this->meta, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListSaleRepItem.php b/src/Models/ListSaleRepItem.php index 304b11cd..9b265fb2 100644 --- a/src/Models/ListSaleRepItem.php +++ b/src/Models/ListSaleRepItem.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListSaleRepItem implements \JsonSerializable @@ -133,6 +134,26 @@ public function setTestMode(?bool $testMode): void $this->testMode = $testMode; } + /** + * Converts the ListSaleRepItem object to a human-readable string representation. + * + * @return string The string representation of the ListSaleRepItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListSaleRepItem', + [ + 'id' => $this->id, + 'fullName' => $this->fullName, + 'subscriptionsCount' => $this->subscriptionsCount, + 'mrrData' => $this->mrrData, + 'testMode' => $this->testMode, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListSegmentsFilter.php b/src/Models/ListSegmentsFilter.php index 079af732..428439e5 100644 --- a/src/Models/ListSegmentsFilter.php +++ b/src/Models/ListSegmentsFilter.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListSegmentsFilter implements \JsonSerializable @@ -124,6 +125,25 @@ public function setSegmentProperty4Value(?string $segmentProperty4Value): void $this->segmentProperty4Value = $segmentProperty4Value; } + /** + * Converts the ListSegmentsFilter object to a human-readable string representation. + * + * @return string The string representation of the ListSegmentsFilter object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListSegmentsFilter', + [ + 'segmentProperty1Value' => $this->segmentProperty1Value, + 'segmentProperty2Value' => $this->segmentProperty2Value, + 'segmentProperty3Value' => $this->segmentProperty3Value, + 'segmentProperty4Value' => $this->segmentProperty4Value, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListSegmentsResponse.php b/src/Models/ListSegmentsResponse.php index ac3d6590..a995c46d 100644 --- a/src/Models/ListSegmentsResponse.php +++ b/src/Models/ListSegmentsResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListSegmentsResponse implements \JsonSerializable @@ -41,6 +42,19 @@ public function setSegments(?array $segments): void $this->segments = $segments; } + /** + * Converts the ListSegmentsResponse object to a human-readable string representation. + * + * @return string The string representation of the ListSegmentsResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListSegmentsResponse', + ['segments' => $this->segments, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListSubcriptionGroupPrepaymentItem.php b/src/Models/ListSubcriptionGroupPrepaymentItem.php index bb1dfece..63bbffb5 100644 --- a/src/Models/ListSubcriptionGroupPrepaymentItem.php +++ b/src/Models/ListSubcriptionGroupPrepaymentItem.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -224,6 +225,30 @@ public function setCreatedAt(?\DateTime $createdAt): void $this->createdAt = $createdAt; } + /** + * Converts the ListSubcriptionGroupPrepaymentItem object to a human-readable string representation. + * + * @return string The string representation of the ListSubcriptionGroupPrepaymentItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListSubcriptionGroupPrepaymentItem', + [ + 'id' => $this->id, + 'subscriptionGroupUid' => $this->subscriptionGroupUid, + 'amountInCents' => $this->amountInCents, + 'remainingAmountInCents' => $this->remainingAmountInCents, + 'details' => $this->details, + 'external' => $this->external, + 'memo' => $this->memo, + 'paymentType' => $this->paymentType, + 'createdAt' => $this->createdAt, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListSubscriptionComponentsFilter.php b/src/Models/ListSubscriptionComponentsFilter.php index 56cfdf20..5bf04490 100644 --- a/src/Models/ListSubscriptionComponentsFilter.php +++ b/src/Models/ListSubscriptionComponentsFilter.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListSubscriptionComponentsFilter implements \JsonSerializable @@ -72,6 +73,23 @@ public function setUseSiteExchangeRate(?bool $useSiteExchangeRate): void $this->useSiteExchangeRate = $useSiteExchangeRate; } + /** + * Converts the ListSubscriptionComponentsFilter object to a human-readable string representation. + * + * @return string The string representation of the ListSubscriptionComponentsFilter object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListSubscriptionComponentsFilter', + [ + 'currencies' => $this->currencies, + 'useSiteExchangeRate' => $this->useSiteExchangeRate, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListSubscriptionComponentsForSiteFilter.php b/src/Models/ListSubscriptionComponentsForSiteFilter.php index 95680974..caf51eab 100644 --- a/src/Models/ListSubscriptionComponentsForSiteFilter.php +++ b/src/Models/ListSubscriptionComponentsForSiteFilter.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListSubscriptionComponentsForSiteFilter implements \JsonSerializable @@ -97,6 +98,25 @@ public function setSubscription(?SubscriptionFilter $subscription): void $this->subscription = $subscription; } + /** + * Converts the ListSubscriptionComponentsForSiteFilter object to a human-readable string + * representation. + * + * @return string The string representation of the ListSubscriptionComponentsForSiteFilter object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListSubscriptionComponentsForSiteFilter', + [ + 'currencies' => $this->currencies, + 'useSiteExchangeRate' => $this->useSiteExchangeRate, + 'subscription' => $this->subscription, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListSubscriptionComponentsResponse.php b/src/Models/ListSubscriptionComponentsResponse.php index 034fcad3..0b3f682d 100644 --- a/src/Models/ListSubscriptionComponentsResponse.php +++ b/src/Models/ListSubscriptionComponentsResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListSubscriptionComponentsResponse implements \JsonSerializable @@ -50,6 +51,22 @@ public function setSubscriptionsComponents(array $subscriptionsComponents): void $this->subscriptionsComponents = $subscriptionsComponents; } + /** + * Converts the ListSubscriptionComponentsResponse object to a human-readable string representation. + * + * @return string The string representation of the ListSubscriptionComponentsResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListSubscriptionComponentsResponse', + [ + 'subscriptionsComponents' => $this->subscriptionsComponents, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListSubscriptionGroupPrepayment.php b/src/Models/ListSubscriptionGroupPrepayment.php index b46e5f9a..8c658d16 100644 --- a/src/Models/ListSubscriptionGroupPrepayment.php +++ b/src/Models/ListSubscriptionGroupPrepayment.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListSubscriptionGroupPrepayment implements \JsonSerializable @@ -46,6 +47,19 @@ public function setPrepayment(ListSubcriptionGroupPrepaymentItem $prepayment): v $this->prepayment = $prepayment; } + /** + * Converts the ListSubscriptionGroupPrepayment object to a human-readable string representation. + * + * @return string The string representation of the ListSubscriptionGroupPrepayment object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListSubscriptionGroupPrepayment', + ['prepayment' => $this->prepayment, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListSubscriptionGroupPrepaymentResponse.php b/src/Models/ListSubscriptionGroupPrepaymentResponse.php index e5dc7342..d3c4682d 100644 --- a/src/Models/ListSubscriptionGroupPrepaymentResponse.php +++ b/src/Models/ListSubscriptionGroupPrepaymentResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListSubscriptionGroupPrepaymentResponse implements \JsonSerializable @@ -50,6 +51,20 @@ public function setPrepayments(array $prepayments): void $this->prepayments = $prepayments; } + /** + * Converts the ListSubscriptionGroupPrepaymentResponse object to a human-readable string + * representation. + * + * @return string The string representation of the ListSubscriptionGroupPrepaymentResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListSubscriptionGroupPrepaymentResponse', + ['prepayments' => $this->prepayments, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListSubscriptionGroupsItem.php b/src/Models/ListSubscriptionGroupsItem.php index 6a74cf3a..b7d3ab73 100644 --- a/src/Models/ListSubscriptionGroupsItem.php +++ b/src/Models/ListSubscriptionGroupsItem.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -274,6 +275,32 @@ public function setGroupType(?string $groupType): void $this->groupType = $groupType; } + /** + * Converts the ListSubscriptionGroupsItem object to a human-readable string representation. + * + * @return string The string representation of the ListSubscriptionGroupsItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListSubscriptionGroupsItem', + [ + 'uid' => $this->uid, + 'scheme' => $this->scheme, + 'customerId' => $this->customerId, + 'paymentProfileId' => $this->paymentProfileId, + 'subscriptionIds' => $this->subscriptionIds, + 'primarySubscriptionId' => $this->primarySubscriptionId, + 'nextAssessmentAt' => $this->nextAssessmentAt, + 'state' => $this->state, + 'cancelAtEndOfPeriod' => $this->cancelAtEndOfPeriod, + 'accountBalances' => $this->accountBalances, + 'groupType' => $this->groupType, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListSubscriptionGroupsMeta.php b/src/Models/ListSubscriptionGroupsMeta.php index 1911f838..f9f60e5a 100644 --- a/src/Models/ListSubscriptionGroupsMeta.php +++ b/src/Models/ListSubscriptionGroupsMeta.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListSubscriptionGroupsMeta implements \JsonSerializable @@ -60,6 +61,23 @@ public function setTotalCount(?int $totalCount): void $this->totalCount = $totalCount; } + /** + * Converts the ListSubscriptionGroupsMeta object to a human-readable string representation. + * + * @return string The string representation of the ListSubscriptionGroupsMeta object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListSubscriptionGroupsMeta', + [ + 'currentPage' => $this->currentPage, + 'totalCount' => $this->totalCount, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ListSubscriptionGroupsResponse.php b/src/Models/ListSubscriptionGroupsResponse.php index 50fb9761..4594971d 100644 --- a/src/Models/ListSubscriptionGroupsResponse.php +++ b/src/Models/ListSubscriptionGroupsResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ListSubscriptionGroupsResponse implements \JsonSerializable @@ -64,6 +65,23 @@ public function setMeta(?ListSubscriptionGroupsMeta $meta): void $this->meta = $meta; } + /** + * Converts the ListSubscriptionGroupsResponse object to a human-readable string representation. + * + * @return string The string representation of the ListSubscriptionGroupsResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ListSubscriptionGroupsResponse', + [ + 'subscriptionGroups' => $this->subscriptionGroups, + 'meta' => $this->meta, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/MRR.php b/src/Models/MRR.php index 0b34816d..8f41f359 100644 --- a/src/Models/MRR.php +++ b/src/Models/MRR.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -156,6 +157,27 @@ public function setAtTime(?\DateTime $atTime): void $this->atTime = $atTime; } + /** + * Converts the MRR object to a human-readable string representation. + * + * @return string The string representation of the MRR object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'MRR', + [ + 'amountInCents' => $this->amountInCents, + 'amountFormatted' => $this->amountFormatted, + 'currency' => $this->currency, + 'currencySymbol' => $this->currencySymbol, + 'breakouts' => $this->breakouts, + 'atTime' => $this->atTime, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/MRRMovement.php b/src/Models/MRRMovement.php index fd1787c7..01ac268c 100644 --- a/src/Models/MRRMovement.php +++ b/src/Models/MRRMovement.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class MRRMovement implements \JsonSerializable @@ -106,6 +107,25 @@ public function setLeadDelta(?int $leadDelta): void $this->leadDelta = $leadDelta; } + /** + * Converts the MRRMovement object to a human-readable string representation. + * + * @return string The string representation of the MRRMovement object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'MRRMovement', + [ + 'amount' => $this->amount, + 'category' => $this->category, + 'subscriberDelta' => $this->subscriberDelta, + 'leadDelta' => $this->leadDelta, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/MRRResponse.php b/src/Models/MRRResponse.php index 2fc11024..40f44096 100644 --- a/src/Models/MRRResponse.php +++ b/src/Models/MRRResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class MRRResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setMrr(MRR $mrr): void $this->mrr = $mrr; } + /** + * Converts the MRRResponse object to a human-readable string representation. + * + * @return string The string representation of the MRRResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'MRRResponse', + ['mrr' => $this->mrr, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Metadata.php b/src/Models/Metadata.php index 93019f0f..726fc452 100644 --- a/src/Models/Metadata.php +++ b/src/Models/Metadata.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -209,6 +210,27 @@ public function unsetMetafieldId(): void $this->metafieldId = []; } + /** + * Converts the Metadata object to a human-readable string representation. + * + * @return string The string representation of the Metadata object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Metadata', + [ + 'id' => $this->getId(), + 'value' => $this->getValue(), + 'resourceId' => $this->getResourceId(), + 'name' => $this->name, + 'deletedAt' => $this->getDeletedAt(), + 'metafieldId' => $this->getMetafieldId(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Metafield.php b/src/Models/Metafield.php index 5a2bb2ee..04116e54 100644 --- a/src/Models/Metafield.php +++ b/src/Models/Metafield.php @@ -184,6 +184,27 @@ public function unsetEnum(): void $this->enum = []; } + /** + * Converts the Metafield object to a human-readable string representation. + * + * @return string The string representation of the Metafield object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Metafield', + [ + 'id' => $this->id, + 'name' => $this->name, + 'scope' => $this->scope, + 'dataCount' => $this->dataCount, + 'inputType' => $this->inputType, + 'enum' => $this->getEnum(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/MetafieldScope.php b/src/Models/MetafieldScope.php index 22c60486..4509a0be 100644 --- a/src/Models/MetafieldScope.php +++ b/src/Models/MetafieldScope.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -201,6 +202,28 @@ public function setHosted(?array $hosted): void $this->hosted = $hosted; } + /** + * Converts the MetafieldScope object to a human-readable string representation. + * + * @return string The string representation of the MetafieldScope object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'MetafieldScope', + [ + 'csv' => $this->csv, + 'invoices' => $this->invoices, + 'statements' => $this->statements, + 'portal' => $this->portal, + 'publicShow' => $this->publicShow, + 'publicEdit' => $this->publicEdit, + 'hosted' => $this->hosted, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/MeteredComponent.php b/src/Models/MeteredComponent.php index 5196786c..029362ad 100644 --- a/src/Models/MeteredComponent.php +++ b/src/Models/MeteredComponent.php @@ -484,6 +484,37 @@ public function unsetIntervalUnit(): void $this->intervalUnit = []; } + /** + * Converts the MeteredComponent object to a human-readable string representation. + * + * @return string The string representation of the MeteredComponent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'MeteredComponent', + [ + 'name' => $this->name, + 'unitName' => $this->unitName, + 'description' => $this->description, + 'handle' => $this->handle, + 'taxable' => $this->taxable, + 'pricingScheme' => $this->pricingScheme, + 'prices' => $this->prices, + 'pricePoints' => $this->pricePoints, + 'unitPrice' => $this->unitPrice, + 'taxCode' => $this->taxCode, + 'hideDateRangeOnInvoice' => $this->hideDateRangeOnInvoice, + 'displayOnHostedPage' => $this->displayOnHostedPage, + 'allowFractionalQuantities' => $this->allowFractionalQuantities, + 'publicSignupPageIds' => $this->publicSignupPageIds, + 'interval' => $this->interval, + 'intervalUnit' => $this->getIntervalUnit(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/MeteredUsage.php b/src/Models/MeteredUsage.php index af818001..cc510bde 100644 --- a/src/Models/MeteredUsage.php +++ b/src/Models/MeteredUsage.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class MeteredUsage implements \JsonSerializable @@ -182,6 +183,27 @@ public function setMemo(string $memo): void $this->memo = $memo; } + /** + * Converts the MeteredUsage object to a human-readable string representation. + * + * @return string The string representation of the MeteredUsage object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'MeteredUsage', + [ + 'previousUnitBalance' => $this->previousUnitBalance, + 'newUnitBalance' => $this->newUnitBalance, + 'usageQuantity' => $this->usageQuantity, + 'componentId' => $this->componentId, + 'componentHandle' => $this->componentHandle, + 'memo' => $this->memo, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Movement.php b/src/Models/Movement.php index ddc9fbbe..199d1854 100644 --- a/src/Models/Movement.php +++ b/src/Models/Movement.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -227,6 +228,30 @@ public function setSubscriberName(?string $subscriberName): void $this->subscriberName = $subscriberName; } + /** + * Converts the Movement object to a human-readable string representation. + * + * @return string The string representation of the Movement object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Movement', + [ + 'timestamp' => $this->timestamp, + 'amountInCents' => $this->amountInCents, + 'amountFormatted' => $this->amountFormatted, + 'description' => $this->description, + 'category' => $this->category, + 'breakouts' => $this->breakouts, + 'lineItems' => $this->lineItems, + 'subscriptionId' => $this->subscriptionId, + 'subscriberName' => $this->subscriberName, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/MovementLineItem.php b/src/Models/MovementLineItem.php index 8c267370..68124807 100644 --- a/src/Models/MovementLineItem.php +++ b/src/Models/MovementLineItem.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class MovementLineItem implements \JsonSerializable @@ -231,6 +232,30 @@ public function setRecurring(?bool $recurring): void $this->recurring = $recurring; } + /** + * Converts the MovementLineItem object to a human-readable string representation. + * + * @return string The string representation of the MovementLineItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'MovementLineItem', + [ + 'productId' => $this->productId, + 'componentId' => $this->componentId, + 'pricePointId' => $this->pricePointId, + 'name' => $this->name, + 'mrr' => $this->mrr, + 'mrrMovements' => $this->mrrMovements, + 'quantity' => $this->quantity, + 'prevQuantity' => $this->prevQuantity, + 'recurring' => $this->recurring, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/MultiInvoicePayment.php b/src/Models/MultiInvoicePayment.php index 71e624a1..ce50fcde 100644 --- a/src/Models/MultiInvoicePayment.php +++ b/src/Models/MultiInvoicePayment.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class MultiInvoicePayment implements \JsonSerializable @@ -116,6 +117,25 @@ public function setApplications(?array $applications): void $this->applications = $applications; } + /** + * Converts the MultiInvoicePayment object to a human-readable string representation. + * + * @return string The string representation of the MultiInvoicePayment object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'MultiInvoicePayment', + [ + 'transactionId' => $this->transactionId, + 'totalAmount' => $this->totalAmount, + 'currencyCode' => $this->currencyCode, + 'applications' => $this->applications, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/MultiInvoicePaymentResponse.php b/src/Models/MultiInvoicePaymentResponse.php index 99177944..bea1db42 100644 --- a/src/Models/MultiInvoicePaymentResponse.php +++ b/src/Models/MultiInvoicePaymentResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class MultiInvoicePaymentResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setPayment(MultiInvoicePayment $payment): void $this->payment = $payment; } + /** + * Converts the MultiInvoicePaymentResponse object to a human-readable string representation. + * + * @return string The string representation of the MultiInvoicePaymentResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'MultiInvoicePaymentResponse', + ['payment' => $this->payment, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/NestedSubscriptionGroup.php b/src/Models/NestedSubscriptionGroup.php index 8f225aa1..a518575c 100644 --- a/src/Models/NestedSubscriptionGroup.php +++ b/src/Models/NestedSubscriptionGroup.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class NestedSubscriptionGroup implements \JsonSerializable @@ -116,6 +117,25 @@ public function setPrimary(?bool $primary): void $this->primary = $primary; } + /** + * Converts the NestedSubscriptionGroup object to a human-readable string representation. + * + * @return string The string representation of the NestedSubscriptionGroup object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'NestedSubscriptionGroup', + [ + 'uid' => $this->uid, + 'scheme' => $this->scheme, + 'primarySubscriptionId' => $this->primarySubscriptionId, + 'primary' => $this->primary, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/NetTerms.php b/src/Models/NetTerms.php index 9bf5ddcc..11f37b4c 100644 --- a/src/Models/NetTerms.php +++ b/src/Models/NetTerms.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class NetTerms implements \JsonSerializable @@ -129,6 +130,26 @@ public function setCustomNetTermsEnabled(?bool $customNetTermsEnabled): void $this->customNetTermsEnabled = $customNetTermsEnabled; } + /** + * Converts the NetTerms object to a human-readable string representation. + * + * @return string The string representation of the NetTerms object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'NetTerms', + [ + 'defaultNetTerms' => $this->defaultNetTerms, + 'automaticNetTerms' => $this->automaticNetTerms, + 'remittanceNetTerms' => $this->remittanceNetTerms, + 'netTermsOnRemittanceSignupsEnabled' => $this->netTermsOnRemittanceSignupsEnabled, + 'customNetTermsEnabled' => $this->customNetTermsEnabled, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Offer.php b/src/Models/Offer.php index 4396ee58..1295717a 100644 --- a/src/Models/Offer.php +++ b/src/Models/Offer.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -489,6 +490,40 @@ public function setOfferSignupPages(?array $offerSignupPages): void $this->offerSignupPages = $offerSignupPages; } + /** + * Converts the Offer object to a human-readable string representation. + * + * @return string The string representation of the Offer object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Offer', + [ + 'id' => $this->id, + 'siteId' => $this->siteId, + 'productFamilyId' => $this->productFamilyId, + 'productId' => $this->productId, + 'productPricePointId' => $this->productPricePointId, + 'productRevisableNumber' => $this->productRevisableNumber, + 'name' => $this->name, + 'handle' => $this->handle, + 'description' => $this->getDescription(), + 'createdAt' => $this->createdAt, + 'updatedAt' => $this->updatedAt, + 'archivedAt' => $this->getArchivedAt(), + 'offerItems' => $this->offerItems, + 'offerDiscounts' => $this->offerDiscounts, + 'productFamilyName' => $this->productFamilyName, + 'productName' => $this->productName, + 'productPricePointName' => $this->productPricePointName, + 'productPriceInCents' => $this->productPriceInCents, + 'offerSignupPages' => $this->offerSignupPages, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/OfferDiscount.php b/src/Models/OfferDiscount.php index 2941db35..d42684ff 100644 --- a/src/Models/OfferDiscount.php +++ b/src/Models/OfferDiscount.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class OfferDiscount implements \JsonSerializable @@ -83,6 +84,24 @@ public function setCouponName(?string $couponName): void $this->couponName = $couponName; } + /** + * Converts the OfferDiscount object to a human-readable string representation. + * + * @return string The string representation of the OfferDiscount object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'OfferDiscount', + [ + 'couponCode' => $this->couponCode, + 'couponId' => $this->couponId, + 'couponName' => $this->couponName, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/OfferItem.php b/src/Models/OfferItem.php index 626a7f48..7b15213e 100644 --- a/src/Models/OfferItem.php +++ b/src/Models/OfferItem.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class OfferItem implements \JsonSerializable @@ -272,6 +273,31 @@ public function unsetIntervalUnit(): void $this->intervalUnit = []; } + /** + * Converts the OfferItem object to a human-readable string representation. + * + * @return string The string representation of the OfferItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'OfferItem', + [ + 'componentId' => $this->componentId, + 'pricePointId' => $this->pricePointId, + 'startingQuantity' => $this->startingQuantity, + 'editable' => $this->editable, + 'componentUnitPrice' => $this->componentUnitPrice, + 'componentName' => $this->componentName, + 'pricePointName' => $this->pricePointName, + 'currencyPrices' => $this->currencyPrices, + 'interval' => $this->interval, + 'intervalUnit' => $this->getIntervalUnit(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/OfferResponse.php b/src/Models/OfferResponse.php index 049067ad..a56c90d3 100644 --- a/src/Models/OfferResponse.php +++ b/src/Models/OfferResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class OfferResponse implements \JsonSerializable @@ -37,6 +38,19 @@ public function setOffer(?Offer $offer): void $this->offer = $offer; } + /** + * Converts the OfferResponse object to a human-readable string representation. + * + * @return string The string representation of the OfferResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'OfferResponse', + ['offer' => $this->offer, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/OfferSignupPage.php b/src/Models/OfferSignupPage.php index 13ff6eaf..629c8e64 100644 --- a/src/Models/OfferSignupPage.php +++ b/src/Models/OfferSignupPage.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class OfferSignupPage implements \JsonSerializable @@ -152,6 +153,27 @@ public function setUrl(?string $url): void $this->url = $url; } + /** + * Converts the OfferSignupPage object to a human-readable string representation. + * + * @return string The string representation of the OfferSignupPage object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'OfferSignupPage', + [ + 'id' => $this->id, + 'nickname' => $this->nickname, + 'enabled' => $this->enabled, + 'returnUrl' => $this->returnUrl, + 'returnParams' => $this->returnParams, + 'url' => $this->url, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/OkResponse.php b/src/Models/OkResponse.php index 590453f8..16c630ec 100644 --- a/src/Models/OkResponse.php +++ b/src/Models/OkResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class OkResponse implements \JsonSerializable @@ -37,6 +38,19 @@ public function setOk(?string $ok): void $this->ok = $ok; } + /** + * Converts the OkResponse object to a human-readable string representation. + * + * @return string The string representation of the OkResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'OkResponse', + ['ok' => $this->ok, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/OnOffComponent.php b/src/Models/OnOffComponent.php index 3039de23..3c2c7711 100644 --- a/src/Models/OnOffComponent.php +++ b/src/Models/OnOffComponent.php @@ -477,6 +477,36 @@ public function unsetIntervalUnit(): void $this->intervalUnit = []; } + /** + * Converts the OnOffComponent object to a human-readable string representation. + * + * @return string The string representation of the OnOffComponent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'OnOffComponent', + [ + 'name' => $this->name, + 'description' => $this->description, + 'handle' => $this->handle, + 'taxable' => $this->taxable, + 'upgradeCharge' => $this->getUpgradeCharge(), + 'downgradeCredit' => $this->getDowngradeCredit(), + 'pricePoints' => $this->pricePoints, + 'unitPrice' => $this->unitPrice, + 'taxCode' => $this->taxCode, + 'hideDateRangeOnInvoice' => $this->hideDateRangeOnInvoice, + 'displayOnHostedPage' => $this->displayOnHostedPage, + 'allowFractionalQuantities' => $this->allowFractionalQuantities, + 'publicSignupPageIds' => $this->publicSignupPageIds, + 'interval' => $this->interval, + 'intervalUnit' => $this->getIntervalUnit(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/OrganizationAddress.php b/src/Models/OrganizationAddress.php index 7346e1b8..27eb8f10 100644 --- a/src/Models/OrganizationAddress.php +++ b/src/Models/OrganizationAddress.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class OrganizationAddress implements \JsonSerializable @@ -286,6 +287,29 @@ public function unsetPhone(): void $this->phone = []; } + /** + * Converts the OrganizationAddress object to a human-readable string representation. + * + * @return string The string representation of the OrganizationAddress object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'OrganizationAddress', + [ + 'street' => $this->getStreet(), + 'line2' => $this->getLine2(), + 'city' => $this->getCity(), + 'state' => $this->getState(), + 'zip' => $this->getZip(), + 'country' => $this->getCountry(), + 'name' => $this->getName(), + 'phone' => $this->getPhone(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/OriginInvoice.php b/src/Models/OriginInvoice.php index 79a12212..938c40ba 100644 --- a/src/Models/OriginInvoice.php +++ b/src/Models/OriginInvoice.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class OriginInvoice implements \JsonSerializable @@ -64,6 +65,19 @@ public function setNumber(?string $number): void $this->number = $number; } + /** + * Converts the OriginInvoice object to a human-readable string representation. + * + * @return string The string representation of the OriginInvoice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'OriginInvoice', + ['uid' => $this->uid, 'number' => $this->number, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/OveragePricing.php b/src/Models/OveragePricing.php index 4a746912..98f2341d 100644 --- a/src/Models/OveragePricing.php +++ b/src/Models/OveragePricing.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class OveragePricing implements \JsonSerializable @@ -78,6 +79,23 @@ public function setPrices(?array $prices): void $this->prices = $prices; } + /** + * Converts the OveragePricing object to a human-readable string representation. + * + * @return string The string representation of the OveragePricing object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'OveragePricing', + [ + 'pricingScheme' => $this->pricingScheme, + 'prices' => $this->prices, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/OverrideSubscription.php b/src/Models/OverrideSubscription.php index 58bf4b24..b7c47fd9 100644 --- a/src/Models/OverrideSubscription.php +++ b/src/Models/OverrideSubscription.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -158,6 +159,26 @@ public function setCurrentPeriodStartsAt(?\DateTime $currentPeriodStartsAt): voi $this->currentPeriodStartsAt = $currentPeriodStartsAt; } + /** + * Converts the OverrideSubscription object to a human-readable string representation. + * + * @return string The string representation of the OverrideSubscription object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'OverrideSubscription', + [ + 'activatedAt' => $this->activatedAt, + 'canceledAt' => $this->canceledAt, + 'cancellationMessage' => $this->cancellationMessage, + 'expiresAt' => $this->expiresAt, + 'currentPeriodStartsAt' => $this->currentPeriodStartsAt, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/OverrideSubscriptionRequest.php b/src/Models/OverrideSubscriptionRequest.php index 78a48dd2..c632fcd3 100644 --- a/src/Models/OverrideSubscriptionRequest.php +++ b/src/Models/OverrideSubscriptionRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class OverrideSubscriptionRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setSubscription(OverrideSubscription $subscription): void $this->subscription = $subscription; } + /** + * Converts the OverrideSubscriptionRequest object to a human-readable string representation. + * + * @return string The string representation of the OverrideSubscriptionRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'OverrideSubscriptionRequest', + ['subscription' => $this->subscription, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PaginatedMetadata.php b/src/Models/PaginatedMetadata.php index fed4fe85..8840356a 100644 --- a/src/Models/PaginatedMetadata.php +++ b/src/Models/PaginatedMetadata.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PaginatedMetadata implements \JsonSerializable @@ -133,6 +134,26 @@ public function setMetadata(?array $metadata): void $this->metadata = $metadata; } + /** + * Converts the PaginatedMetadata object to a human-readable string representation. + * + * @return string The string representation of the PaginatedMetadata object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PaginatedMetadata', + [ + 'totalCount' => $this->totalCount, + 'currentPage' => $this->currentPage, + 'totalPages' => $this->totalPages, + 'perPage' => $this->perPage, + 'metadata' => $this->metadata, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PaidInvoice.php b/src/Models/PaidInvoice.php index dfba0cef..1e439c35 100644 --- a/src/Models/PaidInvoice.php +++ b/src/Models/PaidInvoice.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PaidInvoice implements \JsonSerializable @@ -117,6 +118,25 @@ public function setPaidAmount(?string $paidAmount): void $this->paidAmount = $paidAmount; } + /** + * Converts the PaidInvoice object to a human-readable string representation. + * + * @return string The string representation of the PaidInvoice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PaidInvoice', + [ + 'invoiceId' => $this->invoiceId, + 'status' => $this->status, + 'dueAmount' => $this->dueAmount, + 'paidAmount' => $this->paidAmount, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PauseRequest.php b/src/Models/PauseRequest.php index d648d77e..e50290d1 100644 --- a/src/Models/PauseRequest.php +++ b/src/Models/PauseRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -40,6 +41,19 @@ public function setHold(?AutoResume $hold): void $this->hold = $hold; } + /** + * Converts the PauseRequest object to a human-readable string representation. + * + * @return string The string representation of the PauseRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PauseRequest', + ['hold' => $this->hold, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PayerAttributes.php b/src/Models/PayerAttributes.php index 9ee17178..2f55f0fe 100644 --- a/src/Models/PayerAttributes.php +++ b/src/Models/PayerAttributes.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PayerAttributes implements \JsonSerializable @@ -436,6 +437,39 @@ public function setMetafields(?array $metafields): void $this->metafields = $metafields; } + /** + * Converts the PayerAttributes object to a human-readable string representation. + * + * @return string The string representation of the PayerAttributes object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PayerAttributes', + [ + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'email' => $this->email, + 'ccEmails' => $this->ccEmails, + 'organization' => $this->organization, + 'reference' => $this->reference, + 'address' => $this->address, + 'address2' => $this->address2, + 'city' => $this->city, + 'state' => $this->state, + 'zip' => $this->zip, + 'country' => $this->country, + 'phone' => $this->phone, + 'locale' => $this->locale, + 'vatNumber' => $this->vatNumber, + 'taxExempt' => $this->taxExempt, + 'taxExemptReason' => $this->taxExemptReason, + 'metafields' => $this->metafields, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PayerError.php b/src/Models/PayerError.php index d0122c2e..3c201081 100644 --- a/src/Models/PayerError.php +++ b/src/Models/PayerError.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PayerError implements \JsonSerializable @@ -95,6 +96,24 @@ public function setEmail(?array $email): void $this->email = $email; } + /** + * Converts the PayerError object to a human-readable string representation. + * + * @return string The string representation of the PayerError object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PayerError', + [ + 'lastName' => $this->lastName, + 'firstName' => $this->firstName, + 'email' => $this->email, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PaymentCollectionMethodChanged.php b/src/Models/PaymentCollectionMethodChanged.php index a48f3717..bbaa875b 100644 --- a/src/Models/PaymentCollectionMethodChanged.php +++ b/src/Models/PaymentCollectionMethodChanged.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PaymentCollectionMethodChanged implements \JsonSerializable @@ -72,6 +73,23 @@ public function setCurrentValue(string $currentValue): void $this->currentValue = $currentValue; } + /** + * Converts the PaymentCollectionMethodChanged object to a human-readable string representation. + * + * @return string The string representation of the PaymentCollectionMethodChanged object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PaymentCollectionMethodChanged', + [ + 'previousValue' => $this->previousValue, + 'currentValue' => $this->currentValue, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PaymentForAllocation.php b/src/Models/PaymentForAllocation.php index d5094e27..c97028d3 100644 --- a/src/Models/PaymentForAllocation.php +++ b/src/Models/PaymentForAllocation.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -109,6 +110,25 @@ public function setMemo(?string $memo): void $this->memo = $memo; } + /** + * Converts the PaymentForAllocation object to a human-readable string representation. + * + * @return string The string representation of the PaymentForAllocation object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PaymentForAllocation', + [ + 'id' => $this->id, + 'amountInCents' => $this->amountInCents, + 'success' => $this->success, + 'memo' => $this->memo, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PaymentMethodApplePay.php b/src/Models/PaymentMethodApplePay.php index a2b72a20..5e370f27 100644 --- a/src/Models/PaymentMethodApplePay.php +++ b/src/Models/PaymentMethodApplePay.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PaymentMethodApplePay implements \JsonSerializable @@ -47,6 +48,19 @@ public function setType(string $type): void $this->type = $type; } + /** + * Converts the PaymentMethodApplePay object to a human-readable string representation. + * + * @return string The string representation of the PaymentMethodApplePay object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PaymentMethodApplePay', + ['type' => $this->type, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PaymentMethodBankAccount.php b/src/Models/PaymentMethodBankAccount.php index 61437b32..cdeed3a8 100644 --- a/src/Models/PaymentMethodBankAccount.php +++ b/src/Models/PaymentMethodBankAccount.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PaymentMethodBankAccount implements \JsonSerializable @@ -99,6 +100,24 @@ public function setType(string $type): void $this->type = $type; } + /** + * Converts the PaymentMethodBankAccount object to a human-readable string representation. + * + * @return string The string representation of the PaymentMethodBankAccount object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PaymentMethodBankAccount', + [ + 'maskedAccountNumber' => $this->maskedAccountNumber, + 'maskedRoutingNumber' => $this->maskedRoutingNumber, + 'type' => $this->type, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PaymentMethodCreditCard.php b/src/Models/PaymentMethodCreditCard.php index d393af76..712aa7b6 100644 --- a/src/Models/PaymentMethodCreditCard.php +++ b/src/Models/PaymentMethodCreditCard.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PaymentMethodCreditCard implements \JsonSerializable @@ -156,6 +157,26 @@ public function setType(string $type): void $this->type = $type; } + /** + * Converts the PaymentMethodCreditCard object to a human-readable string representation. + * + * @return string The string representation of the PaymentMethodCreditCard object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PaymentMethodCreditCard', + [ + 'cardBrand' => $this->cardBrand, + 'cardExpiration' => $this->cardExpiration, + 'lastFour' => $this->getLastFour(), + 'maskedCardNumber' => $this->maskedCardNumber, + 'type' => $this->type, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PaymentMethodExternal.php b/src/Models/PaymentMethodExternal.php index 4b2c6ba7..40743bd0 100644 --- a/src/Models/PaymentMethodExternal.php +++ b/src/Models/PaymentMethodExternal.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PaymentMethodExternal implements \JsonSerializable @@ -119,6 +120,25 @@ public function setType(string $type): void $this->type = $type; } + /** + * Converts the PaymentMethodExternal object to a human-readable string representation. + * + * @return string The string representation of the PaymentMethodExternal object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PaymentMethodExternal', + [ + 'details' => $this->details, + 'kind' => $this->kind, + 'memo' => $this->memo, + 'type' => $this->type, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PaymentMethodPaypal.php b/src/Models/PaymentMethodPaypal.php index f084890f..25680b57 100644 --- a/src/Models/PaymentMethodPaypal.php +++ b/src/Models/PaymentMethodPaypal.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PaymentMethodPaypal implements \JsonSerializable @@ -73,6 +74,19 @@ public function setType(string $type): void $this->type = $type; } + /** + * Converts the PaymentMethodPaypal object to a human-readable string representation. + * + * @return string The string representation of the PaymentMethodPaypal object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PaymentMethodPaypal', + ['email' => $this->email, 'type' => $this->type, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PaymentProfileAttributes.php b/src/Models/PaymentProfileAttributes.php index 586b08f4..0b21d202 100644 --- a/src/Models/PaymentProfileAttributes.php +++ b/src/Models/PaymentProfileAttributes.php @@ -720,6 +720,46 @@ public function setLastFour(?string $lastFour): void $this->lastFour = $lastFour; } + /** + * Converts the PaymentProfileAttributes object to a human-readable string representation. + * + * @return string The string representation of the PaymentProfileAttributes object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PaymentProfileAttributes', + [ + 'chargifyToken' => $this->chargifyToken, + 'id' => $this->id, + 'paymentType' => $this->paymentType, + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'maskedCardNumber' => $this->maskedCardNumber, + 'fullNumber' => $this->fullNumber, + 'cardType' => $this->cardType, + 'expirationMonth' => $this->expirationMonth, + 'expirationYear' => $this->expirationYear, + 'billingAddress' => $this->billingAddress, + 'billingAddress2' => $this->getBillingAddress2(), + 'billingCity' => $this->billingCity, + 'billingState' => $this->billingState, + 'billingCountry' => $this->billingCountry, + 'billingZip' => $this->billingZip, + 'currentVault' => $this->currentVault, + 'vaultToken' => $this->vaultToken, + 'customerVaultToken' => $this->customerVaultToken, + 'customerId' => $this->customerId, + 'paypalEmail' => $this->paypalEmail, + 'paymentMethodNonce' => $this->paymentMethodNonce, + 'gatewayHandle' => $this->gatewayHandle, + 'cvv' => $this->cvv, + 'lastFour' => $this->lastFour, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PaymentProfileResponse.php b/src/Models/PaymentProfileResponse.php index 76c7ea4c..098e63a0 100644 --- a/src/Models/PaymentProfileResponse.php +++ b/src/Models/PaymentProfileResponse.php @@ -52,6 +52,19 @@ public function setPaymentProfile($paymentProfile): void $this->paymentProfile = $paymentProfile; } + /** + * Converts the PaymentProfileResponse object to a human-readable string representation. + * + * @return string The string representation of the PaymentProfileResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PaymentProfileResponse', + ['paymentProfile' => $this->paymentProfile, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PaymentRelatedEvents.php b/src/Models/PaymentRelatedEvents.php index cd9bdb17..7eac440d 100644 --- a/src/Models/PaymentRelatedEvents.php +++ b/src/Models/PaymentRelatedEvents.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PaymentRelatedEvents implements \JsonSerializable @@ -72,6 +73,23 @@ public function setAccountTransactionId(int $accountTransactionId): void $this->accountTransactionId = $accountTransactionId; } + /** + * Converts the PaymentRelatedEvents object to a human-readable string representation. + * + * @return string The string representation of the PaymentRelatedEvents object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PaymentRelatedEvents', + [ + 'productId' => $this->productId, + 'accountTransactionId' => $this->accountTransactionId, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PaypalPaymentProfile.php b/src/Models/PaypalPaymentProfile.php index 5664fd7f..922087ea 100644 --- a/src/Models/PaypalPaymentProfile.php +++ b/src/Models/PaypalPaymentProfile.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PaypalPaymentProfile implements \JsonSerializable @@ -545,6 +546,38 @@ public function setPaypalEmail(?string $paypalEmail): void $this->paypalEmail = $paypalEmail; } + /** + * Converts the PaypalPaymentProfile object to a human-readable string representation. + * + * @return string The string representation of the PaypalPaymentProfile object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PaypalPaymentProfile', + [ + 'id' => $this->id, + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'customerId' => $this->customerId, + 'currentVault' => $this->currentVault, + 'vaultToken' => $this->vaultToken, + 'billingAddress' => $this->getBillingAddress(), + 'billingCity' => $this->getBillingCity(), + 'billingState' => $this->getBillingState(), + 'billingZip' => $this->getBillingZip(), + 'billingCountry' => $this->getBillingCountry(), + 'customerVaultToken' => $this->getCustomerVaultToken(), + 'billingAddress2' => $this->getBillingAddress2(), + 'paymentType' => $this->paymentType, + 'siteGatewaySettingId' => $this->getSiteGatewaySettingId(), + 'gatewayHandle' => $this->getGatewayHandle(), + 'paypalEmail' => $this->paypalEmail, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PendingCancellationChange.php b/src/Models/PendingCancellationChange.php index d6f40e4a..7219646f 100644 --- a/src/Models/PendingCancellationChange.php +++ b/src/Models/PendingCancellationChange.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -74,6 +75,23 @@ public function setCancelsAt(\DateTime $cancelsAt): void $this->cancelsAt = $cancelsAt; } + /** + * Converts the PendingCancellationChange object to a human-readable string representation. + * + * @return string The string representation of the PendingCancellationChange object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PendingCancellationChange', + [ + 'cancellationState' => $this->cancellationState, + 'cancelsAt' => $this->cancelsAt, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PortalManagementLink.php b/src/Models/PortalManagementLink.php index a7df5bef..6c68169a 100644 --- a/src/Models/PortalManagementLink.php +++ b/src/Models/PortalManagementLink.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -168,6 +169,27 @@ public function unsetLastInviteSentAt(): void $this->lastInviteSentAt = []; } + /** + * Converts the PortalManagementLink object to a human-readable string representation. + * + * @return string The string representation of the PortalManagementLink object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PortalManagementLink', + [ + 'url' => $this->url, + 'fetchCount' => $this->fetchCount, + 'createdAt' => $this->createdAt, + 'newLinkAvailableAt' => $this->newLinkAvailableAt, + 'expiresAt' => $this->expiresAt, + 'lastInviteSentAt' => $this->getLastInviteSentAt(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PrepaidConfiguration.php b/src/Models/PrepaidConfiguration.php index 268ddeef..3eab19fc 100644 --- a/src/Models/PrepaidConfiguration.php +++ b/src/Models/PrepaidConfiguration.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PrepaidConfiguration implements \JsonSerializable @@ -129,6 +130,26 @@ public function setReplenishThresholdAmountInCents(?int $replenishThresholdAmoun $this->replenishThresholdAmountInCents = $replenishThresholdAmountInCents; } + /** + * Converts the PrepaidConfiguration object to a human-readable string representation. + * + * @return string The string representation of the PrepaidConfiguration object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PrepaidConfiguration', + [ + 'id' => $this->id, + 'initialFundingAmountInCents' => $this->initialFundingAmountInCents, + 'replenishToAmountInCents' => $this->replenishToAmountInCents, + 'autoReplenish' => $this->autoReplenish, + 'replenishThresholdAmountInCents' => $this->replenishThresholdAmountInCents, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PrepaidConfigurationResponse.php b/src/Models/PrepaidConfigurationResponse.php index 8ea2d423..2f020421 100644 --- a/src/Models/PrepaidConfigurationResponse.php +++ b/src/Models/PrepaidConfigurationResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PrepaidConfigurationResponse implements \JsonSerializable @@ -46,6 +47,22 @@ public function setPrepaidConfiguration(PrepaidConfiguration $prepaidConfigurati $this->prepaidConfiguration = $prepaidConfiguration; } + /** + * Converts the PrepaidConfigurationResponse object to a human-readable string representation. + * + * @return string The string representation of the PrepaidConfigurationResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PrepaidConfigurationResponse', + [ + 'prepaidConfiguration' => $this->prepaidConfiguration, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PrepaidProductPricePointFilter.php b/src/Models/PrepaidProductPricePointFilter.php index 15b7e792..bd7d5b68 100644 --- a/src/Models/PrepaidProductPricePointFilter.php +++ b/src/Models/PrepaidProductPricePointFilter.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PrepaidProductPricePointFilter implements \JsonSerializable @@ -39,6 +40,22 @@ public function setProductPricePointId(string $productPricePointId): void $this->productPricePointId = $productPricePointId; } + /** + * Converts the PrepaidProductPricePointFilter object to a human-readable string representation. + * + * @return string The string representation of the PrepaidProductPricePointFilter object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PrepaidProductPricePointFilter', + [ + 'productPricePointId' => $this->productPricePointId, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PrepaidSubscriptionBalanceChanged.php b/src/Models/PrepaidSubscriptionBalanceChanged.php index aedd948c..5c1c8e2e 100644 --- a/src/Models/PrepaidSubscriptionBalanceChanged.php +++ b/src/Models/PrepaidSubscriptionBalanceChanged.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PrepaidSubscriptionBalanceChanged implements \JsonSerializable @@ -128,6 +129,25 @@ public function setCurrentUsageAmountInCents(int $currentUsageAmountInCents): vo $this->currentUsageAmountInCents = $currentUsageAmountInCents; } + /** + * Converts the PrepaidSubscriptionBalanceChanged object to a human-readable string representation. + * + * @return string The string representation of the PrepaidSubscriptionBalanceChanged object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PrepaidSubscriptionBalanceChanged', + [ + 'reason' => $this->reason, + 'currentAccountBalanceInCents' => $this->currentAccountBalanceInCents, + 'prepaymentAccountBalanceInCents' => $this->prepaymentAccountBalanceInCents, + 'currentUsageAmountInCents' => $this->currentUsageAmountInCents, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PrepaidUsage.php b/src/Models/PrepaidUsage.php index d6d0ee5d..702c647d 100644 --- a/src/Models/PrepaidUsage.php +++ b/src/Models/PrepaidUsage.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PrepaidUsage implements \JsonSerializable @@ -294,6 +295,31 @@ public function setAllocationDetails(array $allocationDetails): void $this->allocationDetails = $allocationDetails; } + /** + * Converts the PrepaidUsage object to a human-readable string representation. + * + * @return string The string representation of the PrepaidUsage object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PrepaidUsage', + [ + 'previousUnitBalance' => $this->previousUnitBalance, + 'previousOverageUnitBalance' => $this->previousOverageUnitBalance, + 'newUnitBalance' => $this->newUnitBalance, + 'newOverageUnitBalance' => $this->newOverageUnitBalance, + 'usageQuantity' => $this->usageQuantity, + 'overageUsageQuantity' => $this->overageUsageQuantity, + 'componentId' => $this->componentId, + 'componentHandle' => $this->componentHandle, + 'memo' => $this->memo, + 'allocationDetails' => $this->allocationDetails, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PrepaidUsageAllocationDetail.php b/src/Models/PrepaidUsageAllocationDetail.php index f8207e85..ea496695 100644 --- a/src/Models/PrepaidUsageAllocationDetail.php +++ b/src/Models/PrepaidUsageAllocationDetail.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PrepaidUsageAllocationDetail implements \JsonSerializable @@ -83,6 +84,24 @@ public function setUsageQuantity(?int $usageQuantity): void $this->usageQuantity = $usageQuantity; } + /** + * Converts the PrepaidUsageAllocationDetail object to a human-readable string representation. + * + * @return string The string representation of the PrepaidUsageAllocationDetail object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PrepaidUsageAllocationDetail', + [ + 'allocationId' => $this->allocationId, + 'chargeId' => $this->chargeId, + 'usageQuantity' => $this->usageQuantity, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PrepaidUsageComponent.php b/src/Models/PrepaidUsageComponent.php index 973a455d..64da37c1 100644 --- a/src/Models/PrepaidUsageComponent.php +++ b/src/Models/PrepaidUsageComponent.php @@ -642,6 +642,42 @@ public function setPublicSignupPageIds(?array $publicSignupPageIds): void $this->publicSignupPageIds = $publicSignupPageIds; } + /** + * Converts the PrepaidUsageComponent object to a human-readable string representation. + * + * @return string The string representation of the PrepaidUsageComponent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PrepaidUsageComponent', + [ + 'name' => $this->name, + 'unitName' => $this->unitName, + 'description' => $this->description, + 'handle' => $this->handle, + 'taxable' => $this->taxable, + 'pricingScheme' => $this->pricingScheme, + 'prices' => $this->prices, + 'upgradeCharge' => $this->getUpgradeCharge(), + 'downgradeCredit' => $this->getDowngradeCredit(), + 'pricePoints' => $this->pricePoints, + 'unitPrice' => $this->unitPrice, + 'taxCode' => $this->taxCode, + 'hideDateRangeOnInvoice' => $this->hideDateRangeOnInvoice, + 'overagePricing' => $this->overagePricing, + 'rolloverPrepaidRemainder' => $this->rolloverPrepaidRemainder, + 'renewPrepaidAllocation' => $this->renewPrepaidAllocation, + 'expirationInterval' => $this->expirationInterval, + 'expirationIntervalUnit' => $this->getExpirationIntervalUnit(), + 'displayOnHostedPage' => $this->displayOnHostedPage, + 'allowFractionalQuantities' => $this->allowFractionalQuantities, + 'publicSignupPageIds' => $this->publicSignupPageIds, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Prepayment.php b/src/Models/Prepayment.php index 21b826a2..243aded7 100644 --- a/src/Models/Prepayment.php +++ b/src/Models/Prepayment.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -283,6 +284,31 @@ public function setCreatedAt(\DateTime $createdAt): void $this->createdAt = $createdAt; } + /** + * Converts the Prepayment object to a human-readable string representation. + * + * @return string The string representation of the Prepayment object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Prepayment', + [ + 'id' => $this->id, + 'subscriptionId' => $this->subscriptionId, + 'amountInCents' => $this->amountInCents, + 'remainingAmountInCents' => $this->remainingAmountInCents, + 'refundedAmountInCents' => $this->refundedAmountInCents, + 'details' => $this->details, + 'external' => $this->external, + 'memo' => $this->memo, + 'paymentType' => $this->paymentType, + 'createdAt' => $this->createdAt, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PrepaymentAccountBalanceChanged.php b/src/Models/PrepaymentAccountBalanceChanged.php index eb6459d8..b3e69fe1 100644 --- a/src/Models/PrepaymentAccountBalanceChanged.php +++ b/src/Models/PrepaymentAccountBalanceChanged.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PrepaymentAccountBalanceChanged implements \JsonSerializable @@ -128,6 +129,25 @@ public function setCurrencyCode(string $currencyCode): void $this->currencyCode = $currencyCode; } + /** + * Converts the PrepaymentAccountBalanceChanged object to a human-readable string representation. + * + * @return string The string representation of the PrepaymentAccountBalanceChanged object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PrepaymentAccountBalanceChanged', + [ + 'reason' => $this->reason, + 'prepaymentAccountBalanceInCents' => $this->prepaymentAccountBalanceInCents, + 'prepaymentBalanceChangeInCents' => $this->prepaymentBalanceChangeInCents, + 'currencyCode' => $this->currencyCode, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PrepaymentResponse.php b/src/Models/PrepaymentResponse.php index 36f70028..8c1ab470 100644 --- a/src/Models/PrepaymentResponse.php +++ b/src/Models/PrepaymentResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PrepaymentResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setPrepayment(Prepayment $prepayment): void $this->prepayment = $prepayment; } + /** + * Converts the PrepaymentResponse object to a human-readable string representation. + * + * @return string The string representation of the PrepaymentResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PrepaymentResponse', + ['prepayment' => $this->prepayment, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PrepaymentsResponse.php b/src/Models/PrepaymentsResponse.php index 8cbd1bfd..9f17e3de 100644 --- a/src/Models/PrepaymentsResponse.php +++ b/src/Models/PrepaymentsResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PrepaymentsResponse implements \JsonSerializable @@ -41,6 +42,19 @@ public function setPrepayments(?array $prepayments): void $this->prepayments = $prepayments; } + /** + * Converts the PrepaymentsResponse object to a human-readable string representation. + * + * @return string The string representation of the PrepaymentsResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PrepaymentsResponse', + ['prepayments' => $this->prepayments, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PreviewAllocationsRequest.php b/src/Models/PreviewAllocationsRequest.php index 8fa22467..63c4dd7f 100644 --- a/src/Models/PreviewAllocationsRequest.php +++ b/src/Models/PreviewAllocationsRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -167,6 +168,25 @@ public function unsetDowngradeCredit(): void $this->downgradeCredit = []; } + /** + * Converts the PreviewAllocationsRequest object to a human-readable string representation. + * + * @return string The string representation of the PreviewAllocationsRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PreviewAllocationsRequest', + [ + 'allocations' => $this->allocations, + 'effectiveProrationDate' => $this->effectiveProrationDate, + 'upgradeCharge' => $this->getUpgradeCharge(), + 'downgradeCredit' => $this->getDowngradeCredit(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Price.php b/src/Models/Price.php index 0c3cd278..a4ea9ecf 100644 --- a/src/Models/Price.php +++ b/src/Models/Price.php @@ -124,6 +124,24 @@ public function setUnitPrice($unitPrice): void $this->unitPrice = $unitPrice; } + /** + * Converts the Price object to a human-readable string representation. + * + * @return string The string representation of the Price object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Price', + [ + 'startingQuantity' => $this->startingQuantity, + 'endingQuantity' => $this->getEndingQuantity(), + 'unitPrice' => $this->unitPrice, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Product.php b/src/Models/Product.php index ce47020b..5b9ab780 100644 --- a/src/Models/Product.php +++ b/src/Models/Product.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -1171,6 +1172,58 @@ public function unsetProductPricePointHandle(): void $this->productPricePointHandle = []; } + /** + * Converts the Product object to a human-readable string representation. + * + * @return string The string representation of the Product object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Product', + [ + 'id' => $this->id, + 'name' => $this->name, + 'handle' => $this->getHandle(), + 'description' => $this->getDescription(), + 'accountingCode' => $this->getAccountingCode(), + 'requestCreditCard' => $this->requestCreditCard, + 'expirationInterval' => $this->getExpirationInterval(), + 'expirationIntervalUnit' => $this->getExpirationIntervalUnit(), + 'createdAt' => $this->createdAt, + 'updatedAt' => $this->updatedAt, + 'priceInCents' => $this->priceInCents, + 'interval' => $this->interval, + 'intervalUnit' => $this->intervalUnit, + 'initialChargeInCents' => $this->getInitialChargeInCents(), + 'trialPriceInCents' => $this->getTrialPriceInCents(), + 'trialInterval' => $this->getTrialInterval(), + 'trialIntervalUnit' => $this->getTrialIntervalUnit(), + 'archivedAt' => $this->getArchivedAt(), + 'requireCreditCard' => $this->requireCreditCard, + 'returnParams' => $this->getReturnParams(), + 'taxable' => $this->taxable, + 'updateReturnUrl' => $this->getUpdateReturnUrl(), + 'initialChargeAfterTrial' => $this->getInitialChargeAfterTrial(), + 'versionNumber' => $this->versionNumber, + 'updateReturnParams' => $this->getUpdateReturnParams(), + 'productFamily' => $this->productFamily, + 'publicSignupPages' => $this->publicSignupPages, + 'productPricePointName' => $this->productPricePointName, + 'requestBillingAddress' => $this->requestBillingAddress, + 'requireBillingAddress' => $this->requireBillingAddress, + 'requireShippingAddress' => $this->requireShippingAddress, + 'taxCode' => $this->getTaxCode(), + 'defaultProductPricePointId' => $this->defaultProductPricePointId, + 'useSiteExchangeRate' => $this->getUseSiteExchangeRate(), + 'itemCategory' => $this->getItemCategory(), + 'productPricePointId' => $this->productPricePointId, + 'productPricePointHandle' => $this->getProductPricePointHandle(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ProductFamily.php b/src/Models/ProductFamily.php index a2c1ae04..91c89f1a 100644 --- a/src/Models/ProductFamily.php +++ b/src/Models/ProductFamily.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -200,6 +201,28 @@ public function setUpdatedAt(?\DateTime $updatedAt): void $this->updatedAt = $updatedAt; } + /** + * Converts the ProductFamily object to a human-readable string representation. + * + * @return string The string representation of the ProductFamily object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ProductFamily', + [ + 'id' => $this->id, + 'name' => $this->name, + 'handle' => $this->handle, + 'accountingCode' => $this->getAccountingCode(), + 'description' => $this->getDescription(), + 'createdAt' => $this->createdAt, + 'updatedAt' => $this->updatedAt, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ProductFamilyResponse.php b/src/Models/ProductFamilyResponse.php index d1a9e177..61c1aa9f 100644 --- a/src/Models/ProductFamilyResponse.php +++ b/src/Models/ProductFamilyResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ProductFamilyResponse implements \JsonSerializable @@ -37,6 +38,19 @@ public function setProductFamily(?ProductFamily $productFamily): void $this->productFamily = $productFamily; } + /** + * Converts the ProductFamilyResponse object to a human-readable string representation. + * + * @return string The string representation of the ProductFamilyResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ProductFamilyResponse', + ['productFamily' => $this->productFamily, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ProductPricePoint.php b/src/Models/ProductPricePoint.php index 66472d78..a0e3b152 100644 --- a/src/Models/ProductPricePoint.php +++ b/src/Models/ProductPricePoint.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -768,6 +769,45 @@ public function setCurrencyPrices(?array $currencyPrices): void $this->currencyPrices = $currencyPrices; } + /** + * Converts the ProductPricePoint object to a human-readable string representation. + * + * @return string The string representation of the ProductPricePoint object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ProductPricePoint', + [ + 'id' => $this->id, + 'name' => $this->name, + 'handle' => $this->getHandle(), + 'priceInCents' => $this->priceInCents, + 'interval' => $this->interval, + 'intervalUnit' => $this->intervalUnit, + 'trialPriceInCents' => $this->getTrialPriceInCents(), + 'trialInterval' => $this->getTrialInterval(), + 'trialIntervalUnit' => $this->getTrialIntervalUnit(), + 'trialType' => $this->trialType, + 'introductoryOffer' => $this->getIntroductoryOffer(), + 'initialChargeInCents' => $this->getInitialChargeInCents(), + 'initialChargeAfterTrial' => $this->getInitialChargeAfterTrial(), + 'expirationInterval' => $this->getExpirationInterval(), + 'expirationIntervalUnit' => $this->getExpirationIntervalUnit(), + 'productId' => $this->productId, + 'archivedAt' => $this->getArchivedAt(), + 'createdAt' => $this->createdAt, + 'updatedAt' => $this->updatedAt, + 'useSiteExchangeRate' => $this->useSiteExchangeRate, + 'type' => $this->type, + 'taxIncluded' => $this->taxIncluded, + 'subscriptionId' => $this->getSubscriptionId(), + 'currencyPrices' => $this->currencyPrices, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ProductPricePointErrors.php b/src/Models/ProductPricePointErrors.php index 12b47feb..6947c9ff 100644 --- a/src/Models/ProductPricePointErrors.php +++ b/src/Models/ProductPricePointErrors.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ProductPricePointErrors implements \JsonSerializable @@ -172,6 +173,27 @@ public function setPriceInCents(?array $priceInCents): void $this->priceInCents = $priceInCents; } + /** + * Converts the ProductPricePointErrors object to a human-readable string representation. + * + * @return string The string representation of the ProductPricePointErrors object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ProductPricePointErrors', + [ + 'pricePoint' => $this->pricePoint, + 'interval' => $this->interval, + 'intervalUnit' => $this->intervalUnit, + 'name' => $this->name, + 'price' => $this->price, + 'priceInCents' => $this->priceInCents, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ProductPricePointResponse.php b/src/Models/ProductPricePointResponse.php index 7522840b..ceb6cf2f 100644 --- a/src/Models/ProductPricePointResponse.php +++ b/src/Models/ProductPricePointResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ProductPricePointResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setPricePoint(ProductPricePoint $pricePoint): void $this->pricePoint = $pricePoint; } + /** + * Converts the ProductPricePointResponse object to a human-readable string representation. + * + * @return string The string representation of the ProductPricePointResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ProductPricePointResponse', + ['pricePoint' => $this->pricePoint, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ProductResponse.php b/src/Models/ProductResponse.php index 8cd8ef88..1f0da962 100644 --- a/src/Models/ProductResponse.php +++ b/src/Models/ProductResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ProductResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setProduct(Product $product): void $this->product = $product; } + /** + * Converts the ProductResponse object to a human-readable string representation. + * + * @return string The string representation of the ProductResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ProductResponse', + ['product' => $this->product, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ProformaError.php b/src/Models/ProformaError.php index 085f9bab..69dae540 100644 --- a/src/Models/ProformaError.php +++ b/src/Models/ProformaError.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ProformaError implements \JsonSerializable @@ -39,6 +40,19 @@ public function setSubscription(?BaseStringError $subscription): void $this->subscription = $subscription; } + /** + * Converts the ProformaError object to a human-readable string representation. + * + * @return string The string representation of the ProformaError object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ProformaError', + ['subscription' => $this->subscription, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ProformaInvoice.php b/src/Models/ProformaInvoice.php index f2008ae0..2a3edd4c 100644 --- a/src/Models/ProformaInvoice.php +++ b/src/Models/ProformaInvoice.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -964,6 +965,57 @@ public function unsetPublicUrl(): void $this->publicUrl = []; } + /** + * Converts the ProformaInvoice object to a human-readable string representation. + * + * @return string The string representation of the ProformaInvoice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ProformaInvoice', + [ + 'uid' => $this->uid, + 'siteId' => $this->siteId, + 'customerId' => $this->getCustomerId(), + 'subscriptionId' => $this->getSubscriptionId(), + 'number' => $this->getNumber(), + 'sequenceNumber' => $this->getSequenceNumber(), + 'createdAt' => $this->createdAt, + 'deliveryDate' => $this->deliveryDate, + 'status' => $this->status, + 'collectionMethod' => $this->collectionMethod, + 'paymentInstructions' => $this->paymentInstructions, + 'currency' => $this->currency, + 'consolidationLevel' => $this->consolidationLevel, + 'productName' => $this->productName, + 'productFamilyName' => $this->productFamilyName, + 'role' => $this->role, + 'seller' => $this->seller, + 'customer' => $this->customer, + 'memo' => $this->memo, + 'billingAddress' => $this->billingAddress, + 'shippingAddress' => $this->shippingAddress, + 'subtotalAmount' => $this->subtotalAmount, + 'discountAmount' => $this->discountAmount, + 'taxAmount' => $this->taxAmount, + 'totalAmount' => $this->totalAmount, + 'creditAmount' => $this->creditAmount, + 'paidAmount' => $this->paidAmount, + 'refundAmount' => $this->refundAmount, + 'dueAmount' => $this->dueAmount, + 'lineItems' => $this->lineItems, + 'discounts' => $this->discounts, + 'taxes' => $this->taxes, + 'credits' => $this->credits, + 'payments' => $this->payments, + 'customFields' => $this->customFields, + 'publicUrl' => $this->getPublicUrl(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ProformaInvoiceCredit.php b/src/Models/ProformaInvoiceCredit.php index 477fe414..84ea303f 100644 --- a/src/Models/ProformaInvoiceCredit.php +++ b/src/Models/ProformaInvoiceCredit.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ProformaInvoiceCredit implements \JsonSerializable @@ -106,6 +107,25 @@ public function setAppliedAmount(?string $appliedAmount): void $this->appliedAmount = $appliedAmount; } + /** + * Converts the ProformaInvoiceCredit object to a human-readable string representation. + * + * @return string The string representation of the ProformaInvoiceCredit object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ProformaInvoiceCredit', + [ + 'uid' => $this->uid, + 'memo' => $this->memo, + 'originalAmount' => $this->originalAmount, + 'appliedAmount' => $this->appliedAmount, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ProformaInvoiceDiscount.php b/src/Models/ProformaInvoiceDiscount.php index a9369b04..e0bf9518 100644 --- a/src/Models/ProformaInvoiceDiscount.php +++ b/src/Models/ProformaInvoiceDiscount.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ProformaInvoiceDiscount implements \JsonSerializable @@ -204,6 +205,29 @@ public function setLineItemBreakouts(?array $lineItemBreakouts): void $this->lineItemBreakouts = $lineItemBreakouts; } + /** + * Converts the ProformaInvoiceDiscount object to a human-readable string representation. + * + * @return string The string representation of the ProformaInvoiceDiscount object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ProformaInvoiceDiscount', + [ + 'uid' => $this->uid, + 'title' => $this->title, + 'code' => $this->code, + 'sourceType' => $this->sourceType, + 'discountType' => $this->discountType, + 'eligibleAmount' => $this->eligibleAmount, + 'discountAmount' => $this->discountAmount, + 'lineItemBreakouts' => $this->lineItemBreakouts, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ProformaInvoiceIssued.php b/src/Models/ProformaInvoiceIssued.php index ba627900..1b4b6c39 100644 --- a/src/Models/ProformaInvoiceIssued.php +++ b/src/Models/ProformaInvoiceIssued.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -324,6 +325,32 @@ public function setLineItems(array $lineItems): void $this->lineItems = $lineItems; } + /** + * Converts the ProformaInvoiceIssued object to a human-readable string representation. + * + * @return string The string representation of the ProformaInvoiceIssued object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ProformaInvoiceIssued', + [ + 'uid' => $this->uid, + 'number' => $this->number, + 'role' => $this->role, + 'deliveryDate' => $this->deliveryDate, + 'createdAt' => $this->createdAt, + 'dueAmount' => $this->dueAmount, + 'paidAmount' => $this->paidAmount, + 'taxAmount' => $this->taxAmount, + 'totalAmount' => $this->totalAmount, + 'productName' => $this->productName, + 'lineItems' => $this->lineItems, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ProformaInvoicePayment.php b/src/Models/ProformaInvoicePayment.php index 30d47bce..518430ef 100644 --- a/src/Models/ProformaInvoicePayment.php +++ b/src/Models/ProformaInvoicePayment.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ProformaInvoicePayment implements \JsonSerializable @@ -106,6 +107,25 @@ public function setPrepayment(?bool $prepayment): void $this->prepayment = $prepayment; } + /** + * Converts the ProformaInvoicePayment object to a human-readable string representation. + * + * @return string The string representation of the ProformaInvoicePayment object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ProformaInvoicePayment', + [ + 'memo' => $this->memo, + 'originalAmount' => $this->originalAmount, + 'appliedAmount' => $this->appliedAmount, + 'prepayment' => $this->prepayment, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ProformaInvoiceTax.php b/src/Models/ProformaInvoiceTax.php index 458175cf..6a2a5fc1 100644 --- a/src/Models/ProformaInvoiceTax.php +++ b/src/Models/ProformaInvoiceTax.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ProformaInvoiceTax implements \JsonSerializable @@ -180,6 +181,28 @@ public function setLineItemBreakouts(?array $lineItemBreakouts): void $this->lineItemBreakouts = $lineItemBreakouts; } + /** + * Converts the ProformaInvoiceTax object to a human-readable string representation. + * + * @return string The string representation of the ProformaInvoiceTax object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ProformaInvoiceTax', + [ + 'uid' => $this->uid, + 'title' => $this->title, + 'sourceType' => $this->sourceType, + 'percentage' => $this->percentage, + 'taxableAmount' => $this->taxableAmount, + 'taxAmount' => $this->taxAmount, + 'lineItemBreakouts' => $this->lineItemBreakouts, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Proration.php b/src/Models/Proration.php index d5348872..1fb4a228 100644 --- a/src/Models/Proration.php +++ b/src/Models/Proration.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class Proration implements \JsonSerializable @@ -39,6 +40,19 @@ public function setPreservePeriod(?bool $preservePeriod): void $this->preservePeriod = $preservePeriod; } + /** + * Converts the Proration object to a human-readable string representation. + * + * @return string The string representation of the Proration object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Proration', + ['preservePeriod' => $this->preservePeriod, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PublicKey.php b/src/Models/PublicKey.php index 37ecf95c..118bc7fa 100644 --- a/src/Models/PublicKey.php +++ b/src/Models/PublicKey.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -85,6 +86,24 @@ public function setCreatedAt(?\DateTime $createdAt): void $this->createdAt = $createdAt; } + /** + * Converts the PublicKey object to a human-readable string representation. + * + * @return string The string representation of the PublicKey object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PublicKey', + [ + 'publicKey' => $this->publicKey, + 'requiresSecurityToken' => $this->requiresSecurityToken, + 'createdAt' => $this->createdAt, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/PublicSignupPage.php b/src/Models/PublicSignupPage.php index f1e0c54e..fe5a31df 100644 --- a/src/Models/PublicSignupPage.php +++ b/src/Models/PublicSignupPage.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class PublicSignupPage implements \JsonSerializable @@ -138,6 +139,25 @@ public function setUrl(?string $url): void $this->url = $url; } + /** + * Converts the PublicSignupPage object to a human-readable string representation. + * + * @return string The string representation of the PublicSignupPage object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'PublicSignupPage', + [ + 'id' => $this->id, + 'returnUrl' => $this->getReturnUrl(), + 'returnParams' => $this->getReturnParams(), + 'url' => $this->url, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/QuantityBasedComponent.php b/src/Models/QuantityBasedComponent.php index 1cab74cb..bead60a5 100644 --- a/src/Models/QuantityBasedComponent.php +++ b/src/Models/QuantityBasedComponent.php @@ -595,6 +595,40 @@ public function unsetIntervalUnit(): void $this->intervalUnit = []; } + /** + * Converts the QuantityBasedComponent object to a human-readable string representation. + * + * @return string The string representation of the QuantityBasedComponent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'QuantityBasedComponent', + [ + 'name' => $this->name, + 'unitName' => $this->unitName, + 'description' => $this->description, + 'handle' => $this->handle, + 'taxable' => $this->taxable, + 'pricingScheme' => $this->pricingScheme, + 'prices' => $this->prices, + 'upgradeCharge' => $this->getUpgradeCharge(), + 'downgradeCredit' => $this->getDowngradeCredit(), + 'pricePoints' => $this->pricePoints, + 'unitPrice' => $this->unitPrice, + 'taxCode' => $this->taxCode, + 'hideDateRangeOnInvoice' => $this->hideDateRangeOnInvoice, + 'recurring' => $this->recurring, + 'displayOnHostedPage' => $this->displayOnHostedPage, + 'allowFractionalQuantities' => $this->allowFractionalQuantities, + 'publicSignupPageIds' => $this->publicSignupPageIds, + 'interval' => $this->interval, + 'intervalUnit' => $this->getIntervalUnit(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ReactivateSubscriptionGroupRequest.php b/src/Models/ReactivateSubscriptionGroupRequest.php index 5a37f266..29704c3a 100644 --- a/src/Models/ReactivateSubscriptionGroupRequest.php +++ b/src/Models/ReactivateSubscriptionGroupRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ReactivateSubscriptionGroupRequest implements \JsonSerializable @@ -60,6 +61,23 @@ public function setResumeMembers(?bool $resumeMembers): void $this->resumeMembers = $resumeMembers; } + /** + * Converts the ReactivateSubscriptionGroupRequest object to a human-readable string representation. + * + * @return string The string representation of the ReactivateSubscriptionGroupRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ReactivateSubscriptionGroupRequest', + [ + 'resume' => $this->resume, + 'resumeMembers' => $this->resumeMembers, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ReactivateSubscriptionGroupResponse.php b/src/Models/ReactivateSubscriptionGroupResponse.php index 0e6dafd2..3c3c2503 100644 --- a/src/Models/ReactivateSubscriptionGroupResponse.php +++ b/src/Models/ReactivateSubscriptionGroupResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -227,6 +228,30 @@ public function setCancelAtEndOfPeriod(?bool $cancelAtEndOfPeriod): void $this->cancelAtEndOfPeriod = $cancelAtEndOfPeriod; } + /** + * Converts the ReactivateSubscriptionGroupResponse object to a human-readable string representation. + * + * @return string The string representation of the ReactivateSubscriptionGroupResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ReactivateSubscriptionGroupResponse', + [ + 'uid' => $this->uid, + 'scheme' => $this->scheme, + 'customerId' => $this->customerId, + 'paymentProfileId' => $this->paymentProfileId, + 'subscriptionIds' => $this->subscriptionIds, + 'primarySubscriptionId' => $this->primarySubscriptionId, + 'nextAssessmentAt' => $this->nextAssessmentAt, + 'state' => $this->state, + 'cancelAtEndOfPeriod' => $this->cancelAtEndOfPeriod, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ReactivateSubscriptionRequest.php b/src/Models/ReactivateSubscriptionRequest.php index 5c21414b..79b61d32 100644 --- a/src/Models/ReactivateSubscriptionRequest.php +++ b/src/Models/ReactivateSubscriptionRequest.php @@ -180,6 +180,27 @@ public function setResume($resume): void $this->resume = $resume; } + /** + * Converts the ReactivateSubscriptionRequest object to a human-readable string representation. + * + * @return string The string representation of the ReactivateSubscriptionRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ReactivateSubscriptionRequest', + [ + 'calendarBilling' => $this->calendarBilling, + 'includeTrial' => $this->includeTrial, + 'preserveBalance' => $this->preserveBalance, + 'couponCode' => $this->couponCode, + 'useCreditsAndPrepayments' => $this->useCreditsAndPrepayments, + 'resume' => $this->resume, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ReactivationBilling.php b/src/Models/ReactivationBilling.php index 0239a657..a85cf01a 100644 --- a/src/Models/ReactivationBilling.php +++ b/src/Models/ReactivationBilling.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -49,6 +50,22 @@ public function setReactivationCharge(?string $reactivationCharge): void $this->reactivationCharge = $reactivationCharge; } + /** + * Converts the ReactivationBilling object to a human-readable string representation. + * + * @return string The string representation of the ReactivationBilling object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ReactivationBilling', + [ + 'reactivationCharge' => $this->reactivationCharge, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ReasonCode.php b/src/Models/ReasonCode.php index d7d80b72..bdf67a27 100644 --- a/src/Models/ReasonCode.php +++ b/src/Models/ReasonCode.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -178,6 +179,28 @@ public function setUpdatedAt(?\DateTime $updatedAt): void $this->updatedAt = $updatedAt; } + /** + * Converts the ReasonCode object to a human-readable string representation. + * + * @return string The string representation of the ReasonCode object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ReasonCode', + [ + 'id' => $this->id, + 'siteId' => $this->siteId, + 'code' => $this->code, + 'description' => $this->description, + 'position' => $this->position, + 'createdAt' => $this->createdAt, + 'updatedAt' => $this->updatedAt, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ReasonCodeResponse.php b/src/Models/ReasonCodeResponse.php index 01970d8d..70fbb058 100644 --- a/src/Models/ReasonCodeResponse.php +++ b/src/Models/ReasonCodeResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ReasonCodeResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setReasonCode(ReasonCode $reasonCode): void $this->reasonCode = $reasonCode; } + /** + * Converts the ReasonCodeResponse object to a human-readable string representation. + * + * @return string The string representation of the ReasonCodeResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ReasonCodeResponse', + ['reasonCode' => $this->reasonCode, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RecordPaymentRequest.php b/src/Models/RecordPaymentRequest.php index 01e26676..552db917 100644 --- a/src/Models/RecordPaymentRequest.php +++ b/src/Models/RecordPaymentRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class RecordPaymentRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setPayment(CreatePayment $payment): void $this->payment = $payment; } + /** + * Converts the RecordPaymentRequest object to a human-readable string representation. + * + * @return string The string representation of the RecordPaymentRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RecordPaymentRequest', + ['payment' => $this->payment, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RecordPaymentResponse.php b/src/Models/RecordPaymentResponse.php index 8785171e..e9eeb8e8 100644 --- a/src/Models/RecordPaymentResponse.php +++ b/src/Models/RecordPaymentResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class RecordPaymentResponse implements \JsonSerializable @@ -75,6 +76,23 @@ public function unsetPrepayment(): void $this->prepayment = []; } + /** + * Converts the RecordPaymentResponse object to a human-readable string representation. + * + * @return string The string representation of the RecordPaymentResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RecordPaymentResponse', + [ + 'paidInvoices' => $this->paidInvoices, + 'prepayment' => $this->getPrepayment(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ReferralCode.php b/src/Models/ReferralCode.php index 24770678..b0c8381a 100644 --- a/src/Models/ReferralCode.php +++ b/src/Models/ReferralCode.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ReferralCode implements \JsonSerializable @@ -106,6 +107,25 @@ public function setCode(?string $code): void $this->code = $code; } + /** + * Converts the ReferralCode object to a human-readable string representation. + * + * @return string The string representation of the ReferralCode object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ReferralCode', + [ + 'id' => $this->id, + 'siteId' => $this->siteId, + 'subscriptionId' => $this->subscriptionId, + 'code' => $this->code, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ReferralValidationResponse.php b/src/Models/ReferralValidationResponse.php index b5bf5b06..2245f9c9 100644 --- a/src/Models/ReferralValidationResponse.php +++ b/src/Models/ReferralValidationResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ReferralValidationResponse implements \JsonSerializable @@ -37,6 +38,19 @@ public function setReferralCode(?ReferralCode $referralCode): void $this->referralCode = $referralCode; } + /** + * Converts the ReferralValidationResponse object to a human-readable string representation. + * + * @return string The string representation of the ReferralValidationResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ReferralValidationResponse', + ['referralCode' => $this->referralCode, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RefundConsolidatedInvoice.php b/src/Models/RefundConsolidatedInvoice.php index 56edc5fc..7ad80628 100644 --- a/src/Models/RefundConsolidatedInvoice.php +++ b/src/Models/RefundConsolidatedInvoice.php @@ -192,6 +192,27 @@ public function setAmount(?string $amount): void $this->amount = $amount; } + /** + * Converts the RefundConsolidatedInvoice object to a human-readable string representation. + * + * @return string The string representation of the RefundConsolidatedInvoice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RefundConsolidatedInvoice', + [ + 'memo' => $this->memo, + 'paymentId' => $this->paymentId, + 'segmentUids' => $this->segmentUids, + 'external' => $this->external, + 'applyCredit' => $this->applyCredit, + 'amount' => $this->amount, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RefundInvoice.php b/src/Models/RefundInvoice.php index f960c816..42fbd419 100644 --- a/src/Models/RefundInvoice.php +++ b/src/Models/RefundInvoice.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -186,6 +187,27 @@ public function setVoidInvoice(?bool $voidInvoice): void $this->voidInvoice = $voidInvoice; } + /** + * Converts the RefundInvoice object to a human-readable string representation. + * + * @return string The string representation of the RefundInvoice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RefundInvoice', + [ + 'amount' => $this->amount, + 'memo' => $this->memo, + 'paymentId' => $this->paymentId, + 'external' => $this->external, + 'applyCredit' => $this->applyCredit, + 'voidInvoice' => $this->voidInvoice, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RefundInvoiceEvent.php b/src/Models/RefundInvoiceEvent.php index 62fe910d..2aa97363 100644 --- a/src/Models/RefundInvoiceEvent.php +++ b/src/Models/RefundInvoiceEvent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -160,6 +161,26 @@ public function setEventData(RefundInvoiceEventData $eventData): void $this->eventData = $eventData; } + /** + * Converts the RefundInvoiceEvent object to a human-readable string representation. + * + * @return string The string representation of the RefundInvoiceEvent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RefundInvoiceEvent', + [ + 'id' => $this->id, + 'timestamp' => $this->timestamp, + 'invoice' => $this->invoice, + 'eventType' => $this->eventType, + 'eventData' => $this->eventData, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RefundInvoiceEventData.php b/src/Models/RefundInvoiceEventData.php index df41a57b..6200e9de 100644 --- a/src/Models/RefundInvoiceEventData.php +++ b/src/Models/RefundInvoiceEventData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -295,6 +296,30 @@ public function setTransactionTime(\DateTime $transactionTime): void $this->transactionTime = $transactionTime; } + /** + * Converts the RefundInvoiceEventData object to a human-readable string representation. + * + * @return string The string representation of the RefundInvoiceEventData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RefundInvoiceEventData', + [ + 'applyCredit' => $this->applyCredit, + 'consolidationLevel' => $this->consolidationLevel, + 'creditNoteAttributes' => $this->creditNoteAttributes, + 'memo' => $this->memo, + 'originalAmount' => $this->originalAmount, + 'paymentId' => $this->paymentId, + 'refundAmount' => $this->refundAmount, + 'refundId' => $this->refundId, + 'transactionTime' => $this->transactionTime, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RefundInvoiceRequest.php b/src/Models/RefundInvoiceRequest.php index cd1a2416..528d0f8c 100644 --- a/src/Models/RefundInvoiceRequest.php +++ b/src/Models/RefundInvoiceRequest.php @@ -52,6 +52,19 @@ public function setRefund($refund): void $this->refund = $refund; } + /** + * Converts the RefundInvoiceRequest object to a human-readable string representation. + * + * @return string The string representation of the RefundInvoiceRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RefundInvoiceRequest', + ['refund' => $this->refund, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RefundPrepayment.php b/src/Models/RefundPrepayment.php index 7cec415f..5a970a0e 100644 --- a/src/Models/RefundPrepayment.php +++ b/src/Models/RefundPrepayment.php @@ -134,6 +134,25 @@ public function setExternal(?bool $external): void $this->external = $external; } + /** + * Converts the RefundPrepayment object to a human-readable string representation. + * + * @return string The string representation of the RefundPrepayment object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RefundPrepayment', + [ + 'amountInCents' => $this->amountInCents, + 'amount' => $this->amount, + 'memo' => $this->memo, + 'external' => $this->external, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RefundPrepaymentBaseRefundError.php b/src/Models/RefundPrepaymentBaseRefundError.php index b4fc9fb9..fd28fd26 100644 --- a/src/Models/RefundPrepaymentBaseRefundError.php +++ b/src/Models/RefundPrepaymentBaseRefundError.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class RefundPrepaymentBaseRefundError implements \JsonSerializable @@ -37,6 +38,19 @@ public function setRefund(?BaseRefundError $refund): void $this->refund = $refund; } + /** + * Converts the RefundPrepaymentBaseRefundError object to a human-readable string representation. + * + * @return string The string representation of the RefundPrepaymentBaseRefundError object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RefundPrepaymentBaseRefundError', + ['refund' => $this->refund, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RefundPrepaymentRequest.php b/src/Models/RefundPrepaymentRequest.php index b8bc5961..a841385e 100644 --- a/src/Models/RefundPrepaymentRequest.php +++ b/src/Models/RefundPrepaymentRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class RefundPrepaymentRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setRefund(RefundPrepayment $refund): void $this->refund = $refund; } + /** + * Converts the RefundPrepaymentRequest object to a human-readable string representation. + * + * @return string The string representation of the RefundPrepaymentRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RefundPrepaymentRequest', + ['refund' => $this->refund, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RefundSuccess.php b/src/Models/RefundSuccess.php index 195a1df6..56dc5d4d 100644 --- a/src/Models/RefundSuccess.php +++ b/src/Models/RefundSuccess.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class RefundSuccess implements \JsonSerializable @@ -98,6 +99,24 @@ public function setProductId(int $productId): void $this->productId = $productId; } + /** + * Converts the RefundSuccess object to a human-readable string representation. + * + * @return string The string representation of the RefundSuccess object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RefundSuccess', + [ + 'refundId' => $this->refundId, + 'gatewayTransactionId' => $this->gatewayTransactionId, + 'productId' => $this->productId, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RemovePaymentEvent.php b/src/Models/RemovePaymentEvent.php index 26041a24..d2120fa0 100644 --- a/src/Models/RemovePaymentEvent.php +++ b/src/Models/RemovePaymentEvent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -160,6 +161,26 @@ public function setEventData(RemovePaymentEventData $eventData): void $this->eventData = $eventData; } + /** + * Converts the RemovePaymentEvent object to a human-readable string representation. + * + * @return string The string representation of the RemovePaymentEvent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RemovePaymentEvent', + [ + 'id' => $this->id, + 'timestamp' => $this->timestamp, + 'invoice' => $this->invoice, + 'eventType' => $this->eventType, + 'eventData' => $this->eventData, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RemovePaymentEventData.php b/src/Models/RemovePaymentEventData.php index 4fc5ae6d..0971afad 100644 --- a/src/Models/RemovePaymentEventData.php +++ b/src/Models/RemovePaymentEventData.php @@ -230,6 +230,28 @@ public function setPrepayment(bool $prepayment): void $this->prepayment = $prepayment; } + /** + * Converts the RemovePaymentEventData object to a human-readable string representation. + * + * @return string The string representation of the RemovePaymentEventData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RemovePaymentEventData', + [ + 'transactionId' => $this->transactionId, + 'memo' => $this->memo, + 'originalAmount' => $this->originalAmount, + 'appliedAmount' => $this->appliedAmount, + 'transactionTime' => $this->transactionTime, + 'paymentMethod' => $this->paymentMethod, + 'prepayment' => $this->prepayment, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RenewalPreview.php b/src/Models/RenewalPreview.php index 42b2f9ee..08734840 100644 --- a/src/Models/RenewalPreview.php +++ b/src/Models/RenewalPreview.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -255,6 +256,30 @@ public function setLineItems(?array $lineItems): void $this->lineItems = $lineItems; } + /** + * Converts the RenewalPreview object to a human-readable string representation. + * + * @return string The string representation of the RenewalPreview object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RenewalPreview', + [ + 'nextAssessmentAt' => $this->nextAssessmentAt, + 'subtotalInCents' => $this->subtotalInCents, + 'totalTaxInCents' => $this->totalTaxInCents, + 'totalDiscountInCents' => $this->totalDiscountInCents, + 'totalInCents' => $this->totalInCents, + 'existingBalanceInCents' => $this->existingBalanceInCents, + 'totalAmountDueInCents' => $this->totalAmountDueInCents, + 'uncalculatedTaxes' => $this->uncalculatedTaxes, + 'lineItems' => $this->lineItems, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RenewalPreviewComponent.php b/src/Models/RenewalPreviewComponent.php index 77541f0d..c558788c 100644 --- a/src/Models/RenewalPreviewComponent.php +++ b/src/Models/RenewalPreviewComponent.php @@ -116,6 +116,24 @@ public function setPricePointId($pricePointId): void $this->pricePointId = $pricePointId; } + /** + * Converts the RenewalPreviewComponent object to a human-readable string representation. + * + * @return string The string representation of the RenewalPreviewComponent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RenewalPreviewComponent', + [ + 'componentId' => $this->componentId, + 'quantity' => $this->quantity, + 'pricePointId' => $this->pricePointId, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RenewalPreviewLineItem.php b/src/Models/RenewalPreviewLineItem.php index 6cfffb51..701df034 100644 --- a/src/Models/RenewalPreviewLineItem.php +++ b/src/Models/RenewalPreviewLineItem.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class RenewalPreviewLineItem implements \JsonSerializable @@ -342,6 +343,35 @@ public function setPeriodRangeEnd(?string $periodRangeEnd): void $this->periodRangeEnd = $periodRangeEnd; } + /** + * Converts the RenewalPreviewLineItem object to a human-readable string representation. + * + * @return string The string representation of the RenewalPreviewLineItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RenewalPreviewLineItem', + [ + 'transactionType' => $this->transactionType, + 'kind' => $this->kind, + 'amountInCents' => $this->amountInCents, + 'memo' => $this->memo, + 'discountAmountInCents' => $this->discountAmountInCents, + 'taxableAmountInCents' => $this->taxableAmountInCents, + 'productId' => $this->productId, + 'productName' => $this->productName, + 'componentId' => $this->componentId, + 'componentHandle' => $this->componentHandle, + 'componentName' => $this->componentName, + 'productHandle' => $this->productHandle, + 'periodRangeStart' => $this->periodRangeStart, + 'periodRangeEnd' => $this->periodRangeEnd, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RenewalPreviewRequest.php b/src/Models/RenewalPreviewRequest.php index 2c7548bd..89d81983 100644 --- a/src/Models/RenewalPreviewRequest.php +++ b/src/Models/RenewalPreviewRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class RenewalPreviewRequest implements \JsonSerializable @@ -47,6 +48,19 @@ public function setComponents(?array $components): void $this->components = $components; } + /** + * Converts the RenewalPreviewRequest object to a human-readable string representation. + * + * @return string The string representation of the RenewalPreviewRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RenewalPreviewRequest', + ['components' => $this->components, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RenewalPreviewResponse.php b/src/Models/RenewalPreviewResponse.php index 18dc6765..bf9bd866 100644 --- a/src/Models/RenewalPreviewResponse.php +++ b/src/Models/RenewalPreviewResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class RenewalPreviewResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setRenewalPreview(RenewalPreview $renewalPreview): void $this->renewalPreview = $renewalPreview; } + /** + * Converts the RenewalPreviewResponse object to a human-readable string representation. + * + * @return string The string representation of the RenewalPreviewResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RenewalPreviewResponse', + ['renewalPreview' => $this->renewalPreview, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ReplayWebhooksRequest.php b/src/Models/ReplayWebhooksRequest.php index b9d30121..de74e1b7 100644 --- a/src/Models/ReplayWebhooksRequest.php +++ b/src/Models/ReplayWebhooksRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ReplayWebhooksRequest implements \JsonSerializable @@ -50,6 +51,19 @@ public function setIds(array $ids): void $this->ids = $ids; } + /** + * Converts the ReplayWebhooksRequest object to a human-readable string representation. + * + * @return string The string representation of the ReplayWebhooksRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ReplayWebhooksRequest', + ['ids' => $this->ids, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ReplayWebhooksResponse.php b/src/Models/ReplayWebhooksResponse.php index 6dfdfe39..a8811eec 100644 --- a/src/Models/ReplayWebhooksResponse.php +++ b/src/Models/ReplayWebhooksResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ReplayWebhooksResponse implements \JsonSerializable @@ -37,6 +38,19 @@ public function setStatus(?string $status): void $this->status = $status; } + /** + * Converts the ReplayWebhooksResponse object to a human-readable string representation. + * + * @return string The string representation of the ReplayWebhooksResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ReplayWebhooksResponse', + ['status' => $this->status, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ResentInvitation.php b/src/Models/ResentInvitation.php index a11d0021..476022c3 100644 --- a/src/Models/ResentInvitation.php +++ b/src/Models/ResentInvitation.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -155,6 +156,27 @@ public function setLastInviteAcceptedAt(?\DateTime $lastInviteAcceptedAt): void $this->lastInviteAcceptedAt = $lastInviteAcceptedAt; } + /** + * Converts the ResentInvitation object to a human-readable string representation. + * + * @return string The string representation of the ResentInvitation object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ResentInvitation', + [ + 'lastSentAt' => $this->lastSentAt, + 'lastAcceptedAt' => $this->lastAcceptedAt, + 'sendInviteLinkText' => $this->sendInviteLinkText, + 'uninvitedCount' => $this->uninvitedCount, + 'lastInviteSentAt' => $this->lastInviteSentAt, + 'lastInviteAcceptedAt' => $this->lastInviteAcceptedAt, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ResumeOptions.php b/src/Models/ResumeOptions.php index 5d817b04..585a46a3 100644 --- a/src/Models/ResumeOptions.php +++ b/src/Models/ResumeOptions.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ResumeOptions implements \JsonSerializable @@ -70,6 +71,23 @@ public function setForgiveBalance(?bool $forgiveBalance): void $this->forgiveBalance = $forgiveBalance; } + /** + * Converts the ResumeOptions object to a human-readable string representation. + * + * @return string The string representation of the ResumeOptions object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ResumeOptions', + [ + 'requireResume' => $this->requireResume, + 'forgiveBalance' => $this->forgiveBalance, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/RevokedInvitation.php b/src/Models/RevokedInvitation.php index 24eaa4a8..a7680b23 100644 --- a/src/Models/RevokedInvitation.php +++ b/src/Models/RevokedInvitation.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class RevokedInvitation implements \JsonSerializable @@ -83,6 +84,24 @@ public function setUninvitedCount(?int $uninvitedCount): void $this->uninvitedCount = $uninvitedCount; } + /** + * Converts the RevokedInvitation object to a human-readable string representation. + * + * @return string The string representation of the RevokedInvitation object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'RevokedInvitation', + [ + 'lastSentAt' => $this->lastSentAt, + 'lastAcceptedAt' => $this->lastAcceptedAt, + 'uninvitedCount' => $this->uninvitedCount, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SaleRep.php b/src/Models/SaleRep.php index 746cb45f..66daa823 100644 --- a/src/Models/SaleRep.php +++ b/src/Models/SaleRep.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SaleRep implements \JsonSerializable @@ -133,6 +134,26 @@ public function setSubscriptions(?array $subscriptions): void $this->subscriptions = $subscriptions; } + /** + * Converts the SaleRep object to a human-readable string representation. + * + * @return string The string representation of the SaleRep object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SaleRep', + [ + 'id' => $this->id, + 'fullName' => $this->fullName, + 'subscriptionsCount' => $this->subscriptionsCount, + 'testMode' => $this->testMode, + 'subscriptions' => $this->subscriptions, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SaleRepItemMrr.php b/src/Models/SaleRepItemMrr.php index 4b3c0300..bc7f93ae 100644 --- a/src/Models/SaleRepItemMrr.php +++ b/src/Models/SaleRepItemMrr.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SaleRepItemMrr implements \JsonSerializable @@ -83,6 +84,24 @@ public function setRecurring(?string $recurring): void $this->recurring = $recurring; } + /** + * Converts the SaleRepItemMrr object to a human-readable string representation. + * + * @return string The string representation of the SaleRepItemMrr object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SaleRepItemMrr', + [ + 'mrr' => $this->mrr, + 'usage' => $this->usage, + 'recurring' => $this->recurring, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SaleRepSettings.php b/src/Models/SaleRepSettings.php index 0ec25ff7..49ba46cb 100644 --- a/src/Models/SaleRepSettings.php +++ b/src/Models/SaleRepSettings.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SaleRepSettings implements \JsonSerializable @@ -175,6 +176,28 @@ public function setSalesRepName(?string $salesRepName): void $this->salesRepName = $salesRepName; } + /** + * Converts the SaleRepSettings object to a human-readable string representation. + * + * @return string The string representation of the SaleRepSettings object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SaleRepSettings', + [ + 'customerName' => $this->customerName, + 'subscriptionId' => $this->subscriptionId, + 'siteLink' => $this->siteLink, + 'siteName' => $this->siteName, + 'subscriptionMrr' => $this->subscriptionMrr, + 'salesRepId' => $this->salesRepId, + 'salesRepName' => $this->salesRepName, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SaleRepSubscription.php b/src/Models/SaleRepSubscription.php index 1429879c..2fc3595c 100644 --- a/src/Models/SaleRepSubscription.php +++ b/src/Models/SaleRepSubscription.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SaleRepSubscription implements \JsonSerializable @@ -255,6 +256,31 @@ public function unsetChurnDate(): void $this->churnDate = []; } + /** + * Converts the SaleRepSubscription object to a human-readable string representation. + * + * @return string The string representation of the SaleRepSubscription object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SaleRepSubscription', + [ + 'id' => $this->id, + 'siteName' => $this->siteName, + 'subscriptionUrl' => $this->subscriptionUrl, + 'customerName' => $this->customerName, + 'createdAt' => $this->createdAt, + 'mrr' => $this->mrr, + 'usage' => $this->usage, + 'recurring' => $this->recurring, + 'lastPayment' => $this->lastPayment, + 'churnDate' => $this->getChurnDate(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Segment.php b/src/Models/Segment.php index 500a47f3..f7126330 100644 --- a/src/Models/Segment.php +++ b/src/Models/Segment.php @@ -323,6 +323,33 @@ public function setPrices(?array $prices): void $this->prices = $prices; } + /** + * Converts the Segment object to a human-readable string representation. + * + * @return string The string representation of the Segment object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Segment', + [ + 'id' => $this->id, + 'componentId' => $this->componentId, + 'pricePointId' => $this->pricePointId, + 'eventBasedBillingMetricId' => $this->eventBasedBillingMetricId, + 'pricingScheme' => $this->pricingScheme, + 'segmentProperty1Value' => $this->segmentProperty1Value, + 'segmentProperty2Value' => $this->segmentProperty2Value, + 'segmentProperty3Value' => $this->segmentProperty3Value, + 'segmentProperty4Value' => $this->segmentProperty4Value, + 'createdAt' => $this->createdAt, + 'updatedAt' => $this->updatedAt, + 'prices' => $this->prices, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SegmentPrice.php b/src/Models/SegmentPrice.php index 70df716f..ce8d9a63 100644 --- a/src/Models/SegmentPrice.php +++ b/src/Models/SegmentPrice.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SegmentPrice implements \JsonSerializable @@ -209,6 +210,29 @@ public function setSegmentId(?int $segmentId): void $this->segmentId = $segmentId; } + /** + * Converts the SegmentPrice object to a human-readable string representation. + * + * @return string The string representation of the SegmentPrice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SegmentPrice', + [ + 'id' => $this->id, + 'componentId' => $this->componentId, + 'startingQuantity' => $this->startingQuantity, + 'endingQuantity' => $this->getEndingQuantity(), + 'unitPrice' => $this->unitPrice, + 'pricePointId' => $this->pricePointId, + 'formattedUnitPrice' => $this->formattedUnitPrice, + 'segmentId' => $this->segmentId, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SegmentResponse.php b/src/Models/SegmentResponse.php index 719e644c..9e52dc48 100644 --- a/src/Models/SegmentResponse.php +++ b/src/Models/SegmentResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SegmentResponse implements \JsonSerializable @@ -37,6 +38,19 @@ public function setSegment(?Segment $segment): void $this->segment = $segment; } + /** + * Converts the SegmentResponse object to a human-readable string representation. + * + * @return string The string representation of the SegmentResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SegmentResponse', + ['segment' => $this->segment, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SendInvoiceRequest.php b/src/Models/SendInvoiceRequest.php index 7b76400c..63ce7145 100644 --- a/src/Models/SendInvoiceRequest.php +++ b/src/Models/SendInvoiceRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SendInvoiceRequest implements \JsonSerializable @@ -95,6 +96,24 @@ public function setBccRecipientEmails(?array $bccRecipientEmails): void $this->bccRecipientEmails = $bccRecipientEmails; } + /** + * Converts the SendInvoiceRequest object to a human-readable string representation. + * + * @return string The string representation of the SendInvoiceRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SendInvoiceRequest', + [ + 'recipientEmails' => $this->recipientEmails, + 'ccRecipientEmails' => $this->ccRecipientEmails, + 'bccRecipientEmails' => $this->bccRecipientEmails, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ServiceCredit.php b/src/Models/ServiceCredit.php index 8b1c1f0c..abc7f20d 100644 --- a/src/Models/ServiceCredit.php +++ b/src/Models/ServiceCredit.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ServiceCredit implements \JsonSerializable @@ -138,6 +139,26 @@ public function setMemo(?string $memo): void $this->memo = $memo; } + /** + * Converts the ServiceCredit object to a human-readable string representation. + * + * @return string The string representation of the ServiceCredit object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ServiceCredit', + [ + 'id' => $this->id, + 'amountInCents' => $this->amountInCents, + 'endingBalanceInCents' => $this->endingBalanceInCents, + 'entryType' => $this->entryType, + 'memo' => $this->memo, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/ServiceCreditResponse.php b/src/Models/ServiceCreditResponse.php index 35ff5385..ee4231ff 100644 --- a/src/Models/ServiceCreditResponse.php +++ b/src/Models/ServiceCreditResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class ServiceCreditResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setServiceCredit(ServiceCredit $serviceCredit): void $this->serviceCredit = $serviceCredit; } + /** + * Converts the ServiceCreditResponse object to a human-readable string representation. + * + * @return string The string representation of the ServiceCreditResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'ServiceCreditResponse', + ['serviceCredit' => $this->serviceCredit, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SignupProformaPreview.php b/src/Models/SignupProformaPreview.php index 2fcc88d0..1345a204 100644 --- a/src/Models/SignupProformaPreview.php +++ b/src/Models/SignupProformaPreview.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SignupProformaPreview implements \JsonSerializable @@ -60,6 +61,23 @@ public function setNextProformaInvoice(?ProformaInvoice $nextProformaInvoice): v $this->nextProformaInvoice = $nextProformaInvoice; } + /** + * Converts the SignupProformaPreview object to a human-readable string representation. + * + * @return string The string representation of the SignupProformaPreview object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SignupProformaPreview', + [ + 'currentProformaInvoice' => $this->currentProformaInvoice, + 'nextProformaInvoice' => $this->nextProformaInvoice, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SignupProformaPreviewResponse.php b/src/Models/SignupProformaPreviewResponse.php index 09ef2598..6a5827b5 100644 --- a/src/Models/SignupProformaPreviewResponse.php +++ b/src/Models/SignupProformaPreviewResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SignupProformaPreviewResponse implements \JsonSerializable @@ -46,6 +47,22 @@ public function setProformaInvoicePreview(SignupProformaPreview $proformaInvoice $this->proformaInvoicePreview = $proformaInvoicePreview; } + /** + * Converts the SignupProformaPreviewResponse object to a human-readable string representation. + * + * @return string The string representation of the SignupProformaPreviewResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SignupProformaPreviewResponse', + [ + 'proformaInvoicePreview' => $this->proformaInvoicePreview, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Site.php b/src/Models/Site.php index 0294398f..7c4fdfec 100644 --- a/src/Models/Site.php +++ b/src/Models/Site.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class Site implements \JsonSerializable @@ -49,6 +50,11 @@ class Site implements \JsonSerializable */ private $relationshipInvoicingEnabled; + /** + * @var bool|null + */ + private $scheduleSubscriptionCancellationEnabled; + /** * @var bool|null */ @@ -224,6 +230,24 @@ public function setRelationshipInvoicingEnabled(?bool $relationshipInvoicingEnab $this->relationshipInvoicingEnabled = $relationshipInvoicingEnabled; } + /** + * Returns Schedule Subscription Cancellation Enabled. + */ + public function getScheduleSubscriptionCancellationEnabled(): ?bool + { + return $this->scheduleSubscriptionCancellationEnabled; + } + + /** + * Sets Schedule Subscription Cancellation Enabled. + * + * @maps schedule_subscription_cancellation_enabled + */ + public function setScheduleSubscriptionCancellationEnabled(?bool $scheduleSubscriptionCancellationEnabled): void + { + $this->scheduleSubscriptionCancellationEnabled = $scheduleSubscriptionCancellationEnabled; + } + /** * Returns Customer Hierarchy Enabled. */ @@ -386,6 +410,38 @@ public function setTest(?bool $test): void $this->test = $test; } + /** + * Converts the Site object to a human-readable string representation. + * + * @return string The string representation of the Site object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Site', + [ + 'id' => $this->id, + 'name' => $this->name, + 'subdomain' => $this->subdomain, + 'currency' => $this->currency, + 'sellerId' => $this->sellerId, + 'nonPrimaryCurrencies' => $this->nonPrimaryCurrencies, + 'relationshipInvoicingEnabled' => $this->relationshipInvoicingEnabled, + 'scheduleSubscriptionCancellationEnabled' => $this->scheduleSubscriptionCancellationEnabled, + 'customerHierarchyEnabled' => $this->customerHierarchyEnabled, + 'whopaysEnabled' => $this->whopaysEnabled, + 'whopaysDefaultPayer' => $this->whopaysDefaultPayer, + 'allocationSettings' => $this->allocationSettings, + 'defaultPaymentCollectionMethod' => $this->defaultPaymentCollectionMethod, + 'organizationAddress' => $this->organizationAddress, + 'taxConfiguration' => $this->taxConfiguration, + 'netTerms' => $this->netTerms, + 'test' => $this->test, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** @@ -427,52 +483,55 @@ public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->id)) { - $json['id'] = $this->id; + $json['id'] = $this->id; } if (isset($this->name)) { - $json['name'] = $this->name; + $json['name'] = $this->name; } if (isset($this->subdomain)) { - $json['subdomain'] = $this->subdomain; + $json['subdomain'] = $this->subdomain; } if (isset($this->currency)) { - $json['currency'] = $this->currency; + $json['currency'] = $this->currency; } if (isset($this->sellerId)) { - $json['seller_id'] = $this->sellerId; + $json['seller_id'] = $this->sellerId; } if (isset($this->nonPrimaryCurrencies)) { - $json['non_primary_currencies'] = $this->nonPrimaryCurrencies; + $json['non_primary_currencies'] = $this->nonPrimaryCurrencies; } if (isset($this->relationshipInvoicingEnabled)) { - $json['relationship_invoicing_enabled'] = $this->relationshipInvoicingEnabled; + $json['relationship_invoicing_enabled'] = $this->relationshipInvoicingEnabled; + } + if (isset($this->scheduleSubscriptionCancellationEnabled)) { + $json['schedule_subscription_cancellation_enabled'] = $this->scheduleSubscriptionCancellationEnabled; } if (isset($this->customerHierarchyEnabled)) { - $json['customer_hierarchy_enabled'] = $this->customerHierarchyEnabled; + $json['customer_hierarchy_enabled'] = $this->customerHierarchyEnabled; } if (isset($this->whopaysEnabled)) { - $json['whopays_enabled'] = $this->whopaysEnabled; + $json['whopays_enabled'] = $this->whopaysEnabled; } if (isset($this->whopaysDefaultPayer)) { - $json['whopays_default_payer'] = $this->whopaysDefaultPayer; + $json['whopays_default_payer'] = $this->whopaysDefaultPayer; } if (isset($this->allocationSettings)) { - $json['allocation_settings'] = $this->allocationSettings; + $json['allocation_settings'] = $this->allocationSettings; } if (isset($this->defaultPaymentCollectionMethod)) { - $json['default_payment_collection_method'] = $this->defaultPaymentCollectionMethod; + $json['default_payment_collection_method'] = $this->defaultPaymentCollectionMethod; } if (isset($this->organizationAddress)) { - $json['organization_address'] = $this->organizationAddress; + $json['organization_address'] = $this->organizationAddress; } if (isset($this->taxConfiguration)) { - $json['tax_configuration'] = $this->taxConfiguration; + $json['tax_configuration'] = $this->taxConfiguration; } if (isset($this->netTerms)) { - $json['net_terms'] = $this->netTerms; + $json['net_terms'] = $this->netTerms; } if (isset($this->test)) { - $json['test'] = $this->test; + $json['test'] = $this->test; } $json = array_merge($json, $this->additionalProperties); diff --git a/src/Models/SiteResponse.php b/src/Models/SiteResponse.php index c827c1ef..e4d41575 100644 --- a/src/Models/SiteResponse.php +++ b/src/Models/SiteResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SiteResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setSite(Site $site): void $this->site = $site; } + /** + * Converts the SiteResponse object to a human-readable string representation. + * + * @return string The string representation of the SiteResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SiteResponse', + ['site' => $this->site, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SiteStatistics.php b/src/Models/SiteStatistics.php index 4bfad68d..477f7c7d 100644 --- a/src/Models/SiteStatistics.php +++ b/src/Models/SiteStatistics.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SiteStatistics implements \JsonSerializable @@ -267,6 +268,32 @@ public function setTotalDunningSubscriptions(?int $totalDunningSubscriptions): v $this->totalDunningSubscriptions = $totalDunningSubscriptions; } + /** + * Converts the SiteStatistics object to a human-readable string representation. + * + * @return string The string representation of the SiteStatistics object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SiteStatistics', + [ + 'totalSubscriptions' => $this->totalSubscriptions, + 'subscriptionsToday' => $this->subscriptionsToday, + 'totalRevenue' => $this->totalRevenue, + 'revenueToday' => $this->revenueToday, + 'revenueThisMonth' => $this->revenueThisMonth, + 'revenueThisYear' => $this->revenueThisYear, + 'totalCanceledSubscriptions' => $this->totalCanceledSubscriptions, + 'totalActiveSubscriptions' => $this->totalActiveSubscriptions, + 'totalPastDueSubscriptions' => $this->totalPastDueSubscriptions, + 'totalUnpaidSubscriptions' => $this->totalUnpaidSubscriptions, + 'totalDunningSubscriptions' => $this->totalDunningSubscriptions, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SiteSummary.php b/src/Models/SiteSummary.php index 6511875b..31b7551b 100644 --- a/src/Models/SiteSummary.php +++ b/src/Models/SiteSummary.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SiteSummary implements \JsonSerializable @@ -129,6 +130,26 @@ public function setStats(?SiteStatistics $stats): void $this->stats = $stats; } + /** + * Converts the SiteSummary object to a human-readable string representation. + * + * @return string The string representation of the SiteSummary object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SiteSummary', + [ + 'sellerName' => $this->sellerName, + 'siteName' => $this->siteName, + 'siteId' => $this->siteId, + 'siteCurrency' => $this->siteCurrency, + 'stats' => $this->stats, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Subscription.php b/src/Models/Subscription.php index 348e8224..e5df6fbc 100644 --- a/src/Models/Subscription.php +++ b/src/Models/Subscription.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -2168,6 +2169,83 @@ public function setSelfServicePageToken(?string $selfServicePageToken): void $this->selfServicePageToken = $selfServicePageToken; } + /** + * Converts the Subscription object to a human-readable string representation. + * + * @return string The string representation of the Subscription object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Subscription', + [ + 'id' => $this->id, + 'state' => $this->state, + 'balanceInCents' => $this->balanceInCents, + 'totalRevenueInCents' => $this->totalRevenueInCents, + 'productPriceInCents' => $this->productPriceInCents, + 'productVersionNumber' => $this->productVersionNumber, + 'currentPeriodEndsAt' => $this->getCurrentPeriodEndsAt(), + 'nextAssessmentAt' => $this->getNextAssessmentAt(), + 'trialStartedAt' => $this->getTrialStartedAt(), + 'trialEndedAt' => $this->getTrialEndedAt(), + 'activatedAt' => $this->getActivatedAt(), + 'expiresAt' => $this->getExpiresAt(), + 'createdAt' => $this->createdAt, + 'updatedAt' => $this->updatedAt, + 'cancellationMessage' => $this->getCancellationMessage(), + 'cancellationMethod' => $this->getCancellationMethod(), + 'cancelAtEndOfPeriod' => $this->getCancelAtEndOfPeriod(), + 'canceledAt' => $this->getCanceledAt(), + 'currentPeriodStartedAt' => $this->getCurrentPeriodStartedAt(), + 'previousState' => $this->previousState, + 'signupPaymentId' => $this->signupPaymentId, + 'signupRevenue' => $this->signupRevenue, + 'delayedCancelAt' => $this->getDelayedCancelAt(), + 'couponCode' => $this->getCouponCode(), + 'snapDay' => $this->getSnapDay(), + 'paymentCollectionMethod' => $this->paymentCollectionMethod, + 'customer' => $this->customer, + 'product' => $this->product, + 'creditCard' => $this->creditCard, + 'group' => $this->getGroup(), + 'bankAccount' => $this->bankAccount, + 'paymentType' => $this->getPaymentType(), + 'referralCode' => $this->getReferralCode(), + 'nextProductId' => $this->getNextProductId(), + 'nextProductHandle' => $this->getNextProductHandle(), + 'couponUseCount' => $this->getCouponUseCount(), + 'couponUsesAllowed' => $this->getCouponUsesAllowed(), + 'reasonCode' => $this->getReasonCode(), + 'automaticallyResumeAt' => $this->getAutomaticallyResumeAt(), + 'couponCodes' => $this->couponCodes, + 'offerId' => $this->getOfferId(), + 'payerId' => $this->getPayerId(), + 'currentBillingAmountInCents' => $this->currentBillingAmountInCents, + 'productPricePointId' => $this->productPricePointId, + 'productPricePointType' => $this->productPricePointType, + 'nextProductPricePointId' => $this->getNextProductPricePointId(), + 'netTerms' => $this->getNetTerms(), + 'storedCredentialTransactionId' => $this->getStoredCredentialTransactionId(), + 'reference' => $this->getReference(), + 'onHoldAt' => $this->getOnHoldAt(), + 'prepaidDunning' => $this->prepaidDunning, + 'coupons' => $this->coupons, + 'dunningCommunicationDelayEnabled' => $this->dunningCommunicationDelayEnabled, + 'dunningCommunicationDelayTimeZone' => $this->getDunningCommunicationDelayTimeZone(), + 'receivesInvoiceEmails' => $this->getReceivesInvoiceEmails(), + 'locale' => $this->getLocale(), + 'currency' => $this->currency, + 'scheduledCancellationAt' => $this->getScheduledCancellationAt(), + 'creditBalanceInCents' => $this->creditBalanceInCents, + 'prepaymentBalanceInCents' => $this->prepaymentBalanceInCents, + 'prepaidConfiguration' => $this->getPrepaidConfiguration(), + 'selfServicePageToken' => $this->selfServicePageToken, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionComponent.php b/src/Models/SubscriptionComponent.php index 3d3bcb98..7e82765b 100644 --- a/src/Models/SubscriptionComponent.php +++ b/src/Models/SubscriptionComponent.php @@ -942,6 +942,53 @@ public function unsetIntervalUnit(): void $this->intervalUnit = []; } + /** + * Converts the SubscriptionComponent object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionComponent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionComponent', + [ + 'id' => $this->id, + 'name' => $this->name, + 'kind' => $this->kind, + 'unitName' => $this->unitName, + 'enabled' => $this->enabled, + 'unitBalance' => $this->unitBalance, + 'currency' => $this->currency, + 'allocatedQuantity' => $this->allocatedQuantity, + 'pricingScheme' => $this->getPricingScheme(), + 'componentId' => $this->componentId, + 'componentHandle' => $this->getComponentHandle(), + 'subscriptionId' => $this->subscriptionId, + 'recurring' => $this->recurring, + 'upgradeCharge' => $this->getUpgradeCharge(), + 'downgradeCredit' => $this->getDowngradeCredit(), + 'archivedAt' => $this->getArchivedAt(), + 'pricePointId' => $this->getPricePointId(), + 'pricePointHandle' => $this->getPricePointHandle(), + 'pricePointType' => $this->getPricePointType(), + 'pricePointName' => $this->getPricePointName(), + 'productFamilyId' => $this->productFamilyId, + 'productFamilyHandle' => $this->productFamilyHandle, + 'createdAt' => $this->createdAt, + 'updatedAt' => $this->updatedAt, + 'useSiteExchangeRate' => $this->getUseSiteExchangeRate(), + 'description' => $this->getDescription(), + 'allowFractionalQuantities' => $this->allowFractionalQuantities, + 'subscription' => $this->subscription, + 'historicUsages' => $this->historicUsages, + 'displayOnHostedPage' => $this->displayOnHostedPage, + 'interval' => $this->interval, + 'intervalUnit' => $this->getIntervalUnit(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionComponentAllocationErrorItem.php b/src/Models/SubscriptionComponentAllocationErrorItem.php index 663bc09f..a4dc26a4 100644 --- a/src/Models/SubscriptionComponentAllocationErrorItem.php +++ b/src/Models/SubscriptionComponentAllocationErrorItem.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionComponentAllocationErrorItem implements \JsonSerializable @@ -60,6 +61,24 @@ public function setMessage(?string $message): void $this->message = $message; } + /** + * Converts the SubscriptionComponentAllocationErrorItem object to a human-readable string + * representation. + * + * @return string The string representation of the SubscriptionComponentAllocationErrorItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionComponentAllocationErrorItem', + [ + 'kind' => $this->kind, + 'message' => $this->message, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionComponentResponse.php b/src/Models/SubscriptionComponentResponse.php index 1187273c..78b5ea93 100644 --- a/src/Models/SubscriptionComponentResponse.php +++ b/src/Models/SubscriptionComponentResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionComponentResponse implements \JsonSerializable @@ -37,6 +38,19 @@ public function setComponent(?SubscriptionComponent $component): void $this->component = $component; } + /** + * Converts the SubscriptionComponentResponse object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionComponentResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionComponentResponse', + ['component' => $this->component, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionComponentSubscription.php b/src/Models/SubscriptionComponentSubscription.php index 4334a6b8..c88401f3 100644 --- a/src/Models/SubscriptionComponentSubscription.php +++ b/src/Models/SubscriptionComponentSubscription.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -172,6 +173,23 @@ public function setUpdatedAt(?\DateTime $updatedAt): void $this->updatedAt = $updatedAt; } + /** + * Converts the SubscriptionComponentSubscription object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionComponentSubscription object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionComponentSubscription', + [ + 'state' => $this->state, + 'updatedAt' => $this->updatedAt, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionCustomPrice.php b/src/Models/SubscriptionCustomPrice.php index ec01769d..6b80d3ba 100644 --- a/src/Models/SubscriptionCustomPrice.php +++ b/src/Models/SubscriptionCustomPrice.php @@ -401,6 +401,34 @@ public function setTaxIncluded(?bool $taxIncluded): void $this->taxIncluded = $taxIncluded; } + /** + * Converts the SubscriptionCustomPrice object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionCustomPrice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionCustomPrice', + [ + 'name' => $this->name, + 'handle' => $this->handle, + 'priceInCents' => $this->priceInCents, + 'interval' => $this->interval, + 'intervalUnit' => $this->intervalUnit, + 'trialPriceInCents' => $this->trialPriceInCents, + 'trialInterval' => $this->trialInterval, + 'trialIntervalUnit' => $this->trialIntervalUnit, + 'initialChargeInCents' => $this->initialChargeInCents, + 'initialChargeAfterTrial' => $this->initialChargeAfterTrial, + 'expirationInterval' => $this->expirationInterval, + 'expirationIntervalUnit' => $this->getExpirationIntervalUnit(), + 'taxIncluded' => $this->taxIncluded, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionFilter.php b/src/Models/SubscriptionFilter.php index 86701252..dc17b4a5 100644 --- a/src/Models/SubscriptionFilter.php +++ b/src/Models/SubscriptionFilter.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -214,6 +215,27 @@ public function setEndDatetime(?\DateTime $endDatetime): void $this->endDatetime = $endDatetime; } + /** + * Converts the SubscriptionFilter object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionFilter object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionFilter', + [ + 'states' => $this->states, + 'dateField' => $this->dateField, + 'startDate' => $this->startDate, + 'endDate' => $this->endDate, + 'startDatetime' => $this->startDatetime, + 'endDatetime' => $this->endDatetime, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroup.php b/src/Models/SubscriptionGroup.php index d12879b6..4a50ba45 100644 --- a/src/Models/SubscriptionGroup.php +++ b/src/Models/SubscriptionGroup.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -142,6 +143,26 @@ public function setCreatedAt(?\DateTime $createdAt): void $this->createdAt = $createdAt; } + /** + * Converts the SubscriptionGroup object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroup object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroup', + [ + 'customerId' => $this->customerId, + 'paymentProfile' => $this->paymentProfile, + 'paymentCollectionMethod' => $this->paymentCollectionMethod, + 'subscriptionIds' => $this->subscriptionIds, + 'createdAt' => $this->createdAt, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupBalances.php b/src/Models/SubscriptionGroupBalances.php index 1f4571a8..05fc49f1 100644 --- a/src/Models/SubscriptionGroupBalances.php +++ b/src/Models/SubscriptionGroupBalances.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionGroupBalances implements \JsonSerializable @@ -106,6 +107,25 @@ public function setPendingDiscounts(?AccountBalance $pendingDiscounts): void $this->pendingDiscounts = $pendingDiscounts; } + /** + * Converts the SubscriptionGroupBalances object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupBalances object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupBalances', + [ + 'prepayments' => $this->prepayments, + 'serviceCredits' => $this->serviceCredits, + 'openInvoices' => $this->openInvoices, + 'pendingDiscounts' => $this->pendingDiscounts, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupBankAccount.php b/src/Models/SubscriptionGroupBankAccount.php index 5a59a969..280fd0f6 100644 --- a/src/Models/SubscriptionGroupBankAccount.php +++ b/src/Models/SubscriptionGroupBankAccount.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionGroupBankAccount implements \JsonSerializable @@ -412,6 +413,37 @@ public function setGatewayHandle(?string $gatewayHandle): void $this->gatewayHandle = $gatewayHandle; } + /** + * Converts the SubscriptionGroupBankAccount object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupBankAccount object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupBankAccount', + [ + 'bankName' => $this->bankName, + 'bankAccountNumber' => $this->bankAccountNumber, + 'bankRoutingNumber' => $this->bankRoutingNumber, + 'bankIban' => $this->bankIban, + 'bankBranchCode' => $this->bankBranchCode, + 'bankAccountType' => $this->bankAccountType, + 'bankAccountHolderType' => $this->bankAccountHolderType, + 'paymentType' => $this->paymentType, + 'billingAddress' => $this->billingAddress, + 'billingCity' => $this->billingCity, + 'billingState' => $this->billingState, + 'billingZip' => $this->billingZip, + 'billingCountry' => $this->billingCountry, + 'chargifyToken' => $this->chargifyToken, + 'currentVault' => $this->currentVault, + 'gatewayHandle' => $this->gatewayHandle, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupComponentCustomPrice.php b/src/Models/SubscriptionGroupComponentCustomPrice.php index 563c882d..b6860994 100644 --- a/src/Models/SubscriptionGroupComponentCustomPrice.php +++ b/src/Models/SubscriptionGroupComponentCustomPrice.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -100,6 +101,24 @@ public function setOveragePricing(?array $overagePricing): void $this->overagePricing = $overagePricing; } + /** + * Converts the SubscriptionGroupComponentCustomPrice object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupComponentCustomPrice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupComponentCustomPrice', + [ + 'pricingScheme' => $this->pricingScheme, + 'prices' => $this->prices, + 'overagePricing' => $this->overagePricing, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupCreditCard.php b/src/Models/SubscriptionGroupCreditCard.php index cd4b5cef..6390e76d 100644 --- a/src/Models/SubscriptionGroupCreditCard.php +++ b/src/Models/SubscriptionGroupCreditCard.php @@ -496,6 +496,41 @@ public function setPaymentType(?string $paymentType): void $this->paymentType = $paymentType; } + /** + * Converts the SubscriptionGroupCreditCard object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupCreditCard object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupCreditCard', + [ + 'fullNumber' => $this->fullNumber, + 'expirationMonth' => $this->expirationMonth, + 'expirationYear' => $this->expirationYear, + 'chargifyToken' => $this->chargifyToken, + 'vaultToken' => $this->vaultToken, + 'currentVault' => $this->currentVault, + 'gatewayHandle' => $this->gatewayHandle, + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'billingAddress' => $this->billingAddress, + 'billingAddress2' => $this->billingAddress2, + 'billingCity' => $this->billingCity, + 'billingState' => $this->billingState, + 'billingZip' => $this->billingZip, + 'billingCountry' => $this->billingCountry, + 'lastFour' => $this->lastFour, + 'cardType' => $this->cardType, + 'customerVaultToken' => $this->customerVaultToken, + 'cvv' => $this->cvv, + 'paymentType' => $this->paymentType, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupCustomer.php b/src/Models/SubscriptionGroupCustomer.php index 94b9b16d..e8b631c5 100644 --- a/src/Models/SubscriptionGroupCustomer.php +++ b/src/Models/SubscriptionGroupCustomer.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionGroupCustomer implements \JsonSerializable @@ -129,6 +130,26 @@ public function setReference(?string $reference): void $this->reference = $reference; } + /** + * Converts the SubscriptionGroupCustomer object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupCustomer object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupCustomer', + [ + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'organization' => $this->organization, + 'email' => $this->email, + 'reference' => $this->reference, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupItem.php b/src/Models/SubscriptionGroupItem.php index 6042310b..ef016f04 100644 --- a/src/Models/SubscriptionGroupItem.php +++ b/src/Models/SubscriptionGroupItem.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionGroupItem implements \JsonSerializable @@ -277,6 +278,31 @@ public function setBalanceInCents(?int $balanceInCents): void $this->balanceInCents = $balanceInCents; } + /** + * Converts the SubscriptionGroupItem object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupItem', + [ + 'id' => $this->id, + 'reference' => $this->getReference(), + 'productId' => $this->productId, + 'productHandle' => $this->getProductHandle(), + 'productPricePointId' => $this->productPricePointId, + 'productPricePointHandle' => $this->productPricePointHandle, + 'currency' => $this->currency, + 'couponCode' => $this->getCouponCode(), + 'totalRevenueInCents' => $this->totalRevenueInCents, + 'balanceInCents' => $this->balanceInCents, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupMembersArrayError.php b/src/Models/SubscriptionGroupMembersArrayError.php index 8bdacb6b..e26c3ac7 100644 --- a/src/Models/SubscriptionGroupMembersArrayError.php +++ b/src/Models/SubscriptionGroupMembersArrayError.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionGroupMembersArrayError implements \JsonSerializable @@ -50,6 +51,19 @@ public function setMembers(array $members): void $this->members = $members; } + /** + * Converts the SubscriptionGroupMembersArrayError object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupMembersArrayError object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupMembersArrayError', + ['members' => $this->members, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupPaymentProfile.php b/src/Models/SubscriptionGroupPaymentProfile.php index d3d2f0a2..37defc2b 100644 --- a/src/Models/SubscriptionGroupPaymentProfile.php +++ b/src/Models/SubscriptionGroupPaymentProfile.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionGroupPaymentProfile implements \JsonSerializable @@ -106,6 +107,25 @@ public function setMaskedCardNumber(?string $maskedCardNumber): void $this->maskedCardNumber = $maskedCardNumber; } + /** + * Converts the SubscriptionGroupPaymentProfile object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupPaymentProfile object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupPaymentProfile', + [ + 'id' => $this->id, + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'maskedCardNumber' => $this->maskedCardNumber, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupPrepayment.php b/src/Models/SubscriptionGroupPrepayment.php index a25ead39..4987fe59 100644 --- a/src/Models/SubscriptionGroupPrepayment.php +++ b/src/Models/SubscriptionGroupPrepayment.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionGroupPrepayment implements \JsonSerializable @@ -125,6 +126,25 @@ public function setMethod(string $method): void $this->method = $method; } + /** + * Converts the SubscriptionGroupPrepayment object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupPrepayment object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupPrepayment', + [ + 'amount' => $this->amount, + 'details' => $this->details, + 'memo' => $this->memo, + 'method' => $this->method, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupPrepaymentRequest.php b/src/Models/SubscriptionGroupPrepaymentRequest.php index 833b9581..2fcf9498 100644 --- a/src/Models/SubscriptionGroupPrepaymentRequest.php +++ b/src/Models/SubscriptionGroupPrepaymentRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionGroupPrepaymentRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setPrepayment(SubscriptionGroupPrepayment $prepayment): void $this->prepayment = $prepayment; } + /** + * Converts the SubscriptionGroupPrepaymentRequest object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupPrepaymentRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupPrepaymentRequest', + ['prepayment' => $this->prepayment, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupPrepaymentResponse.php b/src/Models/SubscriptionGroupPrepaymentResponse.php index 7d251fd5..c4e1b9fc 100644 --- a/src/Models/SubscriptionGroupPrepaymentResponse.php +++ b/src/Models/SubscriptionGroupPrepaymentResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionGroupPrepaymentResponse implements \JsonSerializable @@ -150,6 +151,26 @@ public function unsetMemo(): void $this->memo = []; } + /** + * Converts the SubscriptionGroupPrepaymentResponse object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupPrepaymentResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupPrepaymentResponse', + [ + 'id' => $this->id, + 'amountInCents' => $this->amountInCents, + 'endingBalanceInCents' => $this->endingBalanceInCents, + 'entryType' => $this->entryType, + 'memo' => $this->getMemo(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupResponse.php b/src/Models/SubscriptionGroupResponse.php index 4debbb2b..b0047de3 100644 --- a/src/Models/SubscriptionGroupResponse.php +++ b/src/Models/SubscriptionGroupResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionGroupResponse implements \JsonSerializable @@ -46,6 +47,22 @@ public function setSubscriptionGroup(SubscriptionGroup $subscriptionGroup): void $this->subscriptionGroup = $subscriptionGroup; } + /** + * Converts the SubscriptionGroupResponse object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupResponse', + [ + 'subscriptionGroup' => $this->subscriptionGroup, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupSignup.php b/src/Models/SubscriptionGroupSignup.php index ace40c25..420a8fdd 100644 --- a/src/Models/SubscriptionGroupSignup.php +++ b/src/Models/SubscriptionGroupSignup.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionGroupSignup implements \JsonSerializable @@ -218,6 +219,29 @@ public function setSubscriptions(array $subscriptions): void $this->subscriptions = $subscriptions; } + /** + * Converts the SubscriptionGroupSignup object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupSignup object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupSignup', + [ + 'paymentProfileId' => $this->paymentProfileId, + 'payerId' => $this->payerId, + 'payerReference' => $this->payerReference, + 'paymentCollectionMethod' => $this->paymentCollectionMethod, + 'payerAttributes' => $this->payerAttributes, + 'creditCardAttributes' => $this->creditCardAttributes, + 'bankAccountAttributes' => $this->bankAccountAttributes, + 'subscriptions' => $this->subscriptions, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupSignupComponent.php b/src/Models/SubscriptionGroupSignupComponent.php index 6445c1d8..9012c660 100644 --- a/src/Models/SubscriptionGroupSignupComponent.php +++ b/src/Models/SubscriptionGroupSignupComponent.php @@ -156,6 +156,26 @@ public function setCustomPrice(?SubscriptionGroupComponentCustomPrice $customPri $this->customPrice = $customPrice; } + /** + * Converts the SubscriptionGroupSignupComponent object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupSignupComponent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupSignupComponent', + [ + 'componentId' => $this->componentId, + 'allocatedQuantity' => $this->allocatedQuantity, + 'unitBalance' => $this->unitBalance, + 'pricePointId' => $this->pricePointId, + 'customPrice' => $this->customPrice, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupSignupError.php b/src/Models/SubscriptionGroupSignupError.php index 76da3528..41311f2c 100644 --- a/src/Models/SubscriptionGroupSignupError.php +++ b/src/Models/SubscriptionGroupSignupError.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionGroupSignupError implements \JsonSerializable @@ -164,6 +165,27 @@ public function setPayerId(?string $payerId): void $this->payerId = $payerId; } + /** + * Converts the SubscriptionGroupSignupError object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupSignupError object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupSignupError', + [ + 'subscriptions' => $this->subscriptions, + 'payerReference' => $this->payerReference, + 'payer' => $this->payer, + 'subscriptionGroup' => $this->subscriptionGroup, + 'paymentProfileId' => $this->paymentProfileId, + 'payerId' => $this->payerId, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupSignupEventData.php b/src/Models/SubscriptionGroupSignupEventData.php index 082eac90..dc4a8716 100644 --- a/src/Models/SubscriptionGroupSignupEventData.php +++ b/src/Models/SubscriptionGroupSignupEventData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionGroupSignupEventData implements \JsonSerializable @@ -69,6 +70,23 @@ public function setCustomer(?Customer $customer): void $this->customer = $customer; } + /** + * Converts the SubscriptionGroupSignupEventData object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupSignupEventData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupSignupEventData', + [ + 'subscriptionGroup' => $this->subscriptionGroup, + 'customer' => $this->customer, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupSignupFailureData.php b/src/Models/SubscriptionGroupSignupFailureData.php index f90b8e9f..a4ff4492 100644 --- a/src/Models/SubscriptionGroupSignupFailureData.php +++ b/src/Models/SubscriptionGroupSignupFailureData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionGroupSignupFailureData implements \JsonSerializable @@ -202,6 +203,29 @@ public function setSubscriptions(?array $subscriptions): void $this->subscriptions = $subscriptions; } + /** + * Converts the SubscriptionGroupSignupFailureData object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupSignupFailureData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupSignupFailureData', + [ + 'payerId' => $this->payerId, + 'payerReference' => $this->payerReference, + 'paymentProfileId' => $this->paymentProfileId, + 'paymentCollectionMethod' => $this->paymentCollectionMethod, + 'payerAttributes' => $this->payerAttributes, + 'creditCardAttributes' => $this->creditCardAttributes, + 'bankAccountAttributes' => $this->bankAccountAttributes, + 'subscriptions' => $this->subscriptions, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupSignupItem.php b/src/Models/SubscriptionGroupSignupItem.php index 3f8e6808..b66bf14a 100644 --- a/src/Models/SubscriptionGroupSignupItem.php +++ b/src/Models/SubscriptionGroupSignupItem.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionGroupSignupItem implements \JsonSerializable @@ -363,6 +364,34 @@ public function setMetafields(?array $metafields): void $this->metafields = $metafields; } + /** + * Converts the SubscriptionGroupSignupItem object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupSignupItem object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupSignupItem', + [ + 'productHandle' => $this->productHandle, + 'productId' => $this->productId, + 'productPricePointId' => $this->productPricePointId, + 'productPricePointHandle' => $this->productPricePointHandle, + 'offerId' => $this->offerId, + 'reference' => $this->reference, + 'primary' => $this->primary, + 'currency' => $this->currency, + 'couponCodes' => $this->couponCodes, + 'components' => $this->components, + 'customPrice' => $this->customPrice, + 'calendarBilling' => $this->calendarBilling, + 'metafields' => $this->metafields, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupSignupRequest.php b/src/Models/SubscriptionGroupSignupRequest.php index 96f4d6d9..6b50ab7d 100644 --- a/src/Models/SubscriptionGroupSignupRequest.php +++ b/src/Models/SubscriptionGroupSignupRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionGroupSignupRequest implements \JsonSerializable @@ -46,6 +47,22 @@ public function setSubscriptionGroup(SubscriptionGroupSignup $subscriptionGroup) $this->subscriptionGroup = $subscriptionGroup; } + /** + * Converts the SubscriptionGroupSignupRequest object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupSignupRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupSignupRequest', + [ + 'subscriptionGroup' => $this->subscriptionGroup, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupSignupResponse.php b/src/Models/SubscriptionGroupSignupResponse.php index 113e06f3..52c66cb1 100644 --- a/src/Models/SubscriptionGroupSignupResponse.php +++ b/src/Models/SubscriptionGroupSignupResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -391,6 +392,32 @@ public function setPaymentCollectionMethod(?string $paymentCollectionMethod): vo $this->paymentCollectionMethod = $paymentCollectionMethod; } + /** + * Converts the SubscriptionGroupSignupResponse object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupSignupResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupSignupResponse', + [ + 'uid' => $this->uid, + 'scheme' => $this->scheme, + 'customerId' => $this->customerId, + 'paymentProfileId' => $this->paymentProfileId, + 'subscriptionIds' => $this->subscriptionIds, + 'primarySubscriptionId' => $this->primarySubscriptionId, + 'nextAssessmentAt' => $this->nextAssessmentAt, + 'state' => $this->state, + 'cancelAtEndOfPeriod' => $this->cancelAtEndOfPeriod, + 'subscriptions' => $this->subscriptions, + 'paymentCollectionMethod' => $this->paymentCollectionMethod, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupSingleError.php b/src/Models/SubscriptionGroupSingleError.php index 3ebfd50a..582dc8c9 100644 --- a/src/Models/SubscriptionGroupSingleError.php +++ b/src/Models/SubscriptionGroupSingleError.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionGroupSingleError implements \JsonSerializable @@ -46,6 +47,22 @@ public function setSubscriptionGroup(string $subscriptionGroup): void $this->subscriptionGroup = $subscriptionGroup; } + /** + * Converts the SubscriptionGroupSingleError object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupSingleError object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupSingleError', + [ + 'subscriptionGroup' => $this->subscriptionGroup, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupSubscriptionError.php b/src/Models/SubscriptionGroupSubscriptionError.php index cdb97ada..36a84e03 100644 --- a/src/Models/SubscriptionGroupSubscriptionError.php +++ b/src/Models/SubscriptionGroupSubscriptionError.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -233,6 +234,29 @@ public function setPaymentProfileFullNumber(?array $paymentProfileFullNumber): v $this->paymentProfileFullNumber = $paymentProfileFullNumber; } + /** + * Converts the SubscriptionGroupSubscriptionError object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupSubscriptionError object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupSubscriptionError', + [ + 'product' => $this->product, + 'productPricePointId' => $this->productPricePointId, + 'paymentProfile' => $this->paymentProfile, + 'paymentProfileChargifyToken' => $this->paymentProfileChargifyToken, + 'base' => $this->base, + 'paymentProfileExpirationMonth' => $this->paymentProfileExpirationMonth, + 'paymentProfileExpirationYear' => $this->paymentProfileExpirationYear, + 'paymentProfileFullNumber' => $this->paymentProfileFullNumber, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionGroupUpdateError.php b/src/Models/SubscriptionGroupUpdateError.php index 38af9e9b..25412abb 100644 --- a/src/Models/SubscriptionGroupUpdateError.php +++ b/src/Models/SubscriptionGroupUpdateError.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionGroupUpdateError implements \JsonSerializable @@ -41,6 +42,19 @@ public function setMembers(?array $members): void $this->members = $members; } + /** + * Converts the SubscriptionGroupUpdateError object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionGroupUpdateError object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionGroupUpdateError', + ['members' => $this->members, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionIncludedCoupon.php b/src/Models/SubscriptionIncludedCoupon.php index 3f6aed48..4ca8f76d 100644 --- a/src/Models/SubscriptionIncludedCoupon.php +++ b/src/Models/SubscriptionIncludedCoupon.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionIncludedCoupon implements \JsonSerializable @@ -208,6 +209,28 @@ public function unsetPercentage(): void $this->percentage = []; } + /** + * Converts the SubscriptionIncludedCoupon object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionIncludedCoupon object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionIncludedCoupon', + [ + 'code' => $this->code, + 'useCount' => $this->useCount, + 'usesAllowed' => $this->usesAllowed, + 'expiresAt' => $this->getExpiresAt(), + 'recurring' => $this->recurring, + 'amountInCents' => $this->getAmountInCents(), + 'percentage' => $this->getPercentage(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionMRR.php b/src/Models/SubscriptionMRR.php index 01f7928b..932646e1 100644 --- a/src/Models/SubscriptionMRR.php +++ b/src/Models/SubscriptionMRR.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionMRR implements \JsonSerializable @@ -95,6 +96,24 @@ public function setBreakouts(?SubscriptionMRRBreakout $breakouts): void $this->breakouts = $breakouts; } + /** + * Converts the SubscriptionMRR object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionMRR object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionMRR', + [ + 'subscriptionId' => $this->subscriptionId, + 'mrrAmountInCents' => $this->mrrAmountInCents, + 'breakouts' => $this->breakouts, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionMRRBreakout.php b/src/Models/SubscriptionMRRBreakout.php index 65012cc4..f641221c 100644 --- a/src/Models/SubscriptionMRRBreakout.php +++ b/src/Models/SubscriptionMRRBreakout.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionMRRBreakout implements \JsonSerializable @@ -72,6 +73,23 @@ public function setUsageAmountInCents(int $usageAmountInCents): void $this->usageAmountInCents = $usageAmountInCents; } + /** + * Converts the SubscriptionMRRBreakout object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionMRRBreakout object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionMRRBreakout', + [ + 'planAmountInCents' => $this->planAmountInCents, + 'usageAmountInCents' => $this->usageAmountInCents, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionMRRResponse.php b/src/Models/SubscriptionMRRResponse.php index b503158a..2ed61861 100644 --- a/src/Models/SubscriptionMRRResponse.php +++ b/src/Models/SubscriptionMRRResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionMRRResponse implements \JsonSerializable @@ -50,6 +51,19 @@ public function setSubscriptionsMrr(array $subscriptionsMrr): void $this->subscriptionsMrr = $subscriptionsMrr; } + /** + * Converts the SubscriptionMRRResponse object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionMRRResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionMRRResponse', + ['subscriptionsMrr' => $this->subscriptionsMrr, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionMigrationPreview.php b/src/Models/SubscriptionMigrationPreview.php index 1ba3bd42..91b21f94 100644 --- a/src/Models/SubscriptionMigrationPreview.php +++ b/src/Models/SubscriptionMigrationPreview.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionMigrationPreview implements \JsonSerializable @@ -116,6 +117,25 @@ public function setCreditAppliedInCents(?int $creditAppliedInCents): void $this->creditAppliedInCents = $creditAppliedInCents; } + /** + * Converts the SubscriptionMigrationPreview object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionMigrationPreview object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionMigrationPreview', + [ + 'proratedAdjustmentInCents' => $this->proratedAdjustmentInCents, + 'chargeInCents' => $this->chargeInCents, + 'paymentDueInCents' => $this->paymentDueInCents, + 'creditAppliedInCents' => $this->creditAppliedInCents, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionMigrationPreviewOptions.php b/src/Models/SubscriptionMigrationPreviewOptions.php index e99bb8ab..2e32db1a 100644 --- a/src/Models/SubscriptionMigrationPreviewOptions.php +++ b/src/Models/SubscriptionMigrationPreviewOptions.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -286,6 +287,31 @@ public function setProrationDate(?\DateTime $prorationDate): void $this->prorationDate = $prorationDate; } + /** + * Converts the SubscriptionMigrationPreviewOptions object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionMigrationPreviewOptions object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionMigrationPreviewOptions', + [ + 'productId' => $this->productId, + 'productPricePointId' => $this->productPricePointId, + 'includeTrial' => $this->includeTrial, + 'includeInitialCharge' => $this->includeInitialCharge, + 'includeCoupons' => $this->includeCoupons, + 'preservePeriod' => $this->preservePeriod, + 'productHandle' => $this->productHandle, + 'productPricePointHandle' => $this->productPricePointHandle, + 'proration' => $this->proration, + 'prorationDate' => $this->prorationDate, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionMigrationPreviewRequest.php b/src/Models/SubscriptionMigrationPreviewRequest.php index 7eeab676..aaef6b6c 100644 --- a/src/Models/SubscriptionMigrationPreviewRequest.php +++ b/src/Models/SubscriptionMigrationPreviewRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionMigrationPreviewRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setMigration(SubscriptionMigrationPreviewOptions $migration): vo $this->migration = $migration; } + /** + * Converts the SubscriptionMigrationPreviewRequest object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionMigrationPreviewRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionMigrationPreviewRequest', + ['migration' => $this->migration, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionMigrationPreviewResponse.php b/src/Models/SubscriptionMigrationPreviewResponse.php index cb9ef0a5..d1c56661 100644 --- a/src/Models/SubscriptionMigrationPreviewResponse.php +++ b/src/Models/SubscriptionMigrationPreviewResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionMigrationPreviewResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setMigration(SubscriptionMigrationPreview $migration): void $this->migration = $migration; } + /** + * Converts the SubscriptionMigrationPreviewResponse object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionMigrationPreviewResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionMigrationPreviewResponse', + ['migration' => $this->migration, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionNote.php b/src/Models/SubscriptionNote.php index 90d01739..b44c8f12 100644 --- a/src/Models/SubscriptionNote.php +++ b/src/Models/SubscriptionNote.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -155,6 +156,27 @@ public function setSticky(?bool $sticky): void $this->sticky = $sticky; } + /** + * Converts the SubscriptionNote object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionNote object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionNote', + [ + 'id' => $this->id, + 'body' => $this->body, + 'subscriptionId' => $this->subscriptionId, + 'createdAt' => $this->createdAt, + 'updatedAt' => $this->updatedAt, + 'sticky' => $this->sticky, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionNoteResponse.php b/src/Models/SubscriptionNoteResponse.php index 6161e439..e5c2a9cf 100644 --- a/src/Models/SubscriptionNoteResponse.php +++ b/src/Models/SubscriptionNoteResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionNoteResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setNote(SubscriptionNote $note): void $this->note = $note; } + /** + * Converts the SubscriptionNoteResponse object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionNoteResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionNoteResponse', + ['note' => $this->note, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionPreview.php b/src/Models/SubscriptionPreview.php index cb16009d..27bb60c2 100644 --- a/src/Models/SubscriptionPreview.php +++ b/src/Models/SubscriptionPreview.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionPreview implements \JsonSerializable @@ -60,6 +61,23 @@ public function setNextBillingManifest(?BillingManifest $nextBillingManifest): v $this->nextBillingManifest = $nextBillingManifest; } + /** + * Converts the SubscriptionPreview object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionPreview object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionPreview', + [ + 'currentBillingManifest' => $this->currentBillingManifest, + 'nextBillingManifest' => $this->nextBillingManifest, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionPreviewResponse.php b/src/Models/SubscriptionPreviewResponse.php index a3b7a0e2..c2b511f8 100644 --- a/src/Models/SubscriptionPreviewResponse.php +++ b/src/Models/SubscriptionPreviewResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionPreviewResponse implements \JsonSerializable @@ -46,6 +47,22 @@ public function setSubscriptionPreview(SubscriptionPreview $subscriptionPreview) $this->subscriptionPreview = $subscriptionPreview; } + /** + * Converts the SubscriptionPreviewResponse object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionPreviewResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionPreviewResponse', + [ + 'subscriptionPreview' => $this->subscriptionPreview, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionProductChange.php b/src/Models/SubscriptionProductChange.php index 788ccc37..8028aa77 100644 --- a/src/Models/SubscriptionProductChange.php +++ b/src/Models/SubscriptionProductChange.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionProductChange implements \JsonSerializable @@ -72,6 +73,23 @@ public function setNewProductId(int $newProductId): void $this->newProductId = $newProductId; } + /** + * Converts the SubscriptionProductChange object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionProductChange object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionProductChange', + [ + 'previousProductId' => $this->previousProductId, + 'newProductId' => $this->newProductId, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionProductMigration.php b/src/Models/SubscriptionProductMigration.php index bc75a067..43c0ce87 100644 --- a/src/Models/SubscriptionProductMigration.php +++ b/src/Models/SubscriptionProductMigration.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionProductMigration implements \JsonSerializable @@ -259,6 +260,30 @@ public function setProration(?Proration $proration): void $this->proration = $proration; } + /** + * Converts the SubscriptionProductMigration object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionProductMigration object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionProductMigration', + [ + 'productId' => $this->productId, + 'productPricePointId' => $this->productPricePointId, + 'includeTrial' => $this->includeTrial, + 'includeInitialCharge' => $this->includeInitialCharge, + 'includeCoupons' => $this->includeCoupons, + 'preservePeriod' => $this->preservePeriod, + 'productHandle' => $this->productHandle, + 'productPricePointHandle' => $this->productPricePointHandle, + 'proration' => $this->proration, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionProductMigrationRequest.php b/src/Models/SubscriptionProductMigrationRequest.php index c479fb79..2918e026 100644 --- a/src/Models/SubscriptionProductMigrationRequest.php +++ b/src/Models/SubscriptionProductMigrationRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionProductMigrationRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setMigration(SubscriptionProductMigration $migration): void $this->migration = $migration; } + /** + * Converts the SubscriptionProductMigrationRequest object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionProductMigrationRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionProductMigrationRequest', + ['migration' => $this->migration, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionResponse.php b/src/Models/SubscriptionResponse.php index 962db5bb..466e59b2 100644 --- a/src/Models/SubscriptionResponse.php +++ b/src/Models/SubscriptionResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionResponse implements \JsonSerializable @@ -37,6 +38,19 @@ public function setSubscription(?Subscription $subscription): void $this->subscription = $subscription; } + /** + * Converts the SubscriptionResponse object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionResponse', + ['subscription' => $this->subscription, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/SubscriptionStateChange.php b/src/Models/SubscriptionStateChange.php index 33f33b29..beab7ac2 100644 --- a/src/Models/SubscriptionStateChange.php +++ b/src/Models/SubscriptionStateChange.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class SubscriptionStateChange implements \JsonSerializable @@ -72,6 +73,23 @@ public function setNewSubscriptionState(string $newSubscriptionState): void $this->newSubscriptionState = $newSubscriptionState; } + /** + * Converts the SubscriptionStateChange object to a human-readable string representation. + * + * @return string The string representation of the SubscriptionStateChange object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'SubscriptionStateChange', + [ + 'previousSubscriptionState' => $this->previousSubscriptionState, + 'newSubscriptionState' => $this->newSubscriptionState, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/TaxConfiguration.php b/src/Models/TaxConfiguration.php index 2dbfc33c..aaab9dbe 100644 --- a/src/Models/TaxConfiguration.php +++ b/src/Models/TaxConfiguration.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class TaxConfiguration implements \JsonSerializable @@ -91,6 +92,24 @@ public function setFullyConfigured(?bool $fullyConfigured): void $this->fullyConfigured = $fullyConfigured; } + /** + * Converts the TaxConfiguration object to a human-readable string representation. + * + * @return string The string representation of the TaxConfiguration object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'TaxConfiguration', + [ + 'kind' => $this->kind, + 'destinationAddress' => $this->destinationAddress, + 'fullyConfigured' => $this->fullyConfigured, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/TooManyManagementLinkRequests.php b/src/Models/TooManyManagementLinkRequests.php index b04afab0..2425591e 100644 --- a/src/Models/TooManyManagementLinkRequests.php +++ b/src/Models/TooManyManagementLinkRequests.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -74,6 +75,23 @@ public function setNewLinkAvailableAt(\DateTime $newLinkAvailableAt): void $this->newLinkAvailableAt = $newLinkAvailableAt; } + /** + * Converts the TooManyManagementLinkRequests object to a human-readable string representation. + * + * @return string The string representation of the TooManyManagementLinkRequests object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'TooManyManagementLinkRequests', + [ + 'error' => $this->error, + 'newLinkAvailableAt' => $this->newLinkAvailableAt, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateAllocationExpirationDate.php b/src/Models/UpdateAllocationExpirationDate.php index 8163fa89..2de3db04 100644 --- a/src/Models/UpdateAllocationExpirationDate.php +++ b/src/Models/UpdateAllocationExpirationDate.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateAllocationExpirationDate implements \JsonSerializable @@ -37,6 +38,19 @@ public function setAllocation(?AllocationExpirationDate $allocation): void $this->allocation = $allocation; } + /** + * Converts the UpdateAllocationExpirationDate object to a human-readable string representation. + * + * @return string The string representation of the UpdateAllocationExpirationDate object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateAllocationExpirationDate', + ['allocation' => $this->allocation, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateComponent.php b/src/Models/UpdateComponent.php index d573cd7b..ee35c9d7 100644 --- a/src/Models/UpdateComponent.php +++ b/src/Models/UpdateComponent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateComponent implements \JsonSerializable @@ -303,6 +304,30 @@ public function unsetUpgradeCharge(): void $this->upgradeCharge = []; } + /** + * Converts the UpdateComponent object to a human-readable string representation. + * + * @return string The string representation of the UpdateComponent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateComponent', + [ + 'handle' => $this->handle, + 'name' => $this->name, + 'description' => $this->getDescription(), + 'accountingCode' => $this->getAccountingCode(), + 'taxable' => $this->taxable, + 'taxCode' => $this->getTaxCode(), + 'itemCategory' => $this->getItemCategory(), + 'displayOnHostedPage' => $this->displayOnHostedPage, + 'upgradeCharge' => $this->getUpgradeCharge(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateComponentPricePoint.php b/src/Models/UpdateComponentPricePoint.php index 1aafdded..6250ff4e 100644 --- a/src/Models/UpdateComponentPricePoint.php +++ b/src/Models/UpdateComponentPricePoint.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateComponentPricePoint implements \JsonSerializable @@ -237,6 +238,29 @@ public function setPrices(?array $prices): void $this->prices = $prices; } + /** + * Converts the UpdateComponentPricePoint object to a human-readable string representation. + * + * @return string The string representation of the UpdateComponentPricePoint object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateComponentPricePoint', + [ + 'name' => $this->name, + 'handle' => $this->handle, + 'pricingScheme' => $this->pricingScheme, + 'useSiteExchangeRate' => $this->useSiteExchangeRate, + 'taxIncluded' => $this->taxIncluded, + 'interval' => $this->interval, + 'intervalUnit' => $this->getIntervalUnit(), + 'prices' => $this->prices, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateComponentPricePointRequest.php b/src/Models/UpdateComponentPricePointRequest.php index 86ad8b1a..a54c8af8 100644 --- a/src/Models/UpdateComponentPricePointRequest.php +++ b/src/Models/UpdateComponentPricePointRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateComponentPricePointRequest implements \JsonSerializable @@ -37,6 +38,19 @@ public function setPricePoint(?UpdateComponentPricePoint $pricePoint): void $this->pricePoint = $pricePoint; } + /** + * Converts the UpdateComponentPricePointRequest object to a human-readable string representation. + * + * @return string The string representation of the UpdateComponentPricePointRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateComponentPricePointRequest', + ['pricePoint' => $this->pricePoint, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateComponentRequest.php b/src/Models/UpdateComponentRequest.php index 9dfe371a..e054ab67 100644 --- a/src/Models/UpdateComponentRequest.php +++ b/src/Models/UpdateComponentRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateComponentRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setComponent(UpdateComponent $component): void $this->component = $component; } + /** + * Converts the UpdateComponentRequest object to a human-readable string representation. + * + * @return string The string representation of the UpdateComponentRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateComponentRequest', + ['component' => $this->component, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateCouponCurrency.php b/src/Models/UpdateCouponCurrency.php index 85812f75..f30f3390 100644 --- a/src/Models/UpdateCouponCurrency.php +++ b/src/Models/UpdateCouponCurrency.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateCouponCurrency implements \JsonSerializable @@ -76,6 +77,23 @@ public function setPrice(int $price): void $this->price = $price; } + /** + * Converts the UpdateCouponCurrency object to a human-readable string representation. + * + * @return string The string representation of the UpdateCouponCurrency object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateCouponCurrency', + [ + 'currency' => $this->currency, + 'price' => $this->price, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateCurrencyPrice.php b/src/Models/UpdateCurrencyPrice.php index 59fe6420..09e6c8eb 100644 --- a/src/Models/UpdateCurrencyPrice.php +++ b/src/Models/UpdateCurrencyPrice.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateCurrencyPrice implements \JsonSerializable @@ -76,6 +77,19 @@ public function setPrice(float $price): void $this->price = $price; } + /** + * Converts the UpdateCurrencyPrice object to a human-readable string representation. + * + * @return string The string representation of the UpdateCurrencyPrice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateCurrencyPrice', + ['id' => $this->id, 'price' => $this->price, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateCurrencyPricesRequest.php b/src/Models/UpdateCurrencyPricesRequest.php index 2cb5899d..ad961df0 100644 --- a/src/Models/UpdateCurrencyPricesRequest.php +++ b/src/Models/UpdateCurrencyPricesRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateCurrencyPricesRequest implements \JsonSerializable @@ -50,6 +51,19 @@ public function setCurrencyPrices(array $currencyPrices): void $this->currencyPrices = $currencyPrices; } + /** + * Converts the UpdateCurrencyPricesRequest object to a human-readable string representation. + * + * @return string The string representation of the UpdateCurrencyPricesRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateCurrencyPricesRequest', + ['currencyPrices' => $this->currencyPrices, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateCustomer.php b/src/Models/UpdateCustomer.php index 883e0cfa..6bf93475 100644 --- a/src/Models/UpdateCustomer.php +++ b/src/Models/UpdateCustomer.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateCustomer implements \JsonSerializable @@ -515,6 +516,41 @@ public function unsetSalesforceId(): void $this->salesforceId = []; } + /** + * Converts the UpdateCustomer object to a human-readable string representation. + * + * @return string The string representation of the UpdateCustomer object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateCustomer', + [ + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'email' => $this->email, + 'ccEmails' => $this->ccEmails, + 'organization' => $this->organization, + 'reference' => $this->reference, + 'address' => $this->address, + 'address2' => $this->address2, + 'city' => $this->city, + 'state' => $this->state, + 'zip' => $this->zip, + 'country' => $this->country, + 'phone' => $this->phone, + 'locale' => $this->locale, + 'vatNumber' => $this->vatNumber, + 'taxExempt' => $this->taxExempt, + 'taxExemptReason' => $this->taxExemptReason, + 'parentId' => $this->getParentId(), + 'verified' => $this->getVerified(), + 'salesforceId' => $this->getSalesforceId(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateCustomerRequest.php b/src/Models/UpdateCustomerRequest.php index 5342a295..49caaf9f 100644 --- a/src/Models/UpdateCustomerRequest.php +++ b/src/Models/UpdateCustomerRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateCustomerRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setCustomer(UpdateCustomer $customer): void $this->customer = $customer; } + /** + * Converts the UpdateCustomerRequest object to a human-readable string representation. + * + * @return string The string representation of the UpdateCustomerRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateCustomerRequest', + ['customer' => $this->customer, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateMetadata.php b/src/Models/UpdateMetadata.php index 4df28874..459d9a33 100644 --- a/src/Models/UpdateMetadata.php +++ b/src/Models/UpdateMetadata.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateMetadata implements \JsonSerializable @@ -83,6 +84,24 @@ public function setValue(?string $value): void $this->value = $value; } + /** + * Converts the UpdateMetadata object to a human-readable string representation. + * + * @return string The string representation of the UpdateMetadata object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateMetadata', + [ + 'currentName' => $this->currentName, + 'name' => $this->name, + 'value' => $this->value, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateMetadataRequest.php b/src/Models/UpdateMetadataRequest.php index 0cfc87a6..2edacf9a 100644 --- a/src/Models/UpdateMetadataRequest.php +++ b/src/Models/UpdateMetadataRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateMetadataRequest implements \JsonSerializable @@ -37,6 +38,19 @@ public function setMetadata(?UpdateMetadata $metadata): void $this->metadata = $metadata; } + /** + * Converts the UpdateMetadataRequest object to a human-readable string representation. + * + * @return string The string representation of the UpdateMetadataRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateMetadataRequest', + ['metadata' => $this->metadata, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateMetafield.php b/src/Models/UpdateMetafield.php index fd87598c..5fe060e0 100644 --- a/src/Models/UpdateMetafield.php +++ b/src/Models/UpdateMetafield.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateMetafield implements \JsonSerializable @@ -148,6 +149,26 @@ public function setEnum(?array $enum): void $this->enum = $enum; } + /** + * Converts the UpdateMetafield object to a human-readable string representation. + * + * @return string The string representation of the UpdateMetafield object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateMetafield', + [ + 'currentName' => $this->currentName, + 'name' => $this->name, + 'scope' => $this->scope, + 'inputType' => $this->inputType, + 'enum' => $this->enum, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateMetafieldsRequest.php b/src/Models/UpdateMetafieldsRequest.php index 79dccddf..bfc68ade 100644 --- a/src/Models/UpdateMetafieldsRequest.php +++ b/src/Models/UpdateMetafieldsRequest.php @@ -43,6 +43,19 @@ public function setMetafields($metafields): void $this->metafields = $metafields; } + /** + * Converts the UpdateMetafieldsRequest object to a human-readable string representation. + * + * @return string The string representation of the UpdateMetafieldsRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateMetafieldsRequest', + ['metafields' => $this->metafields, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdatePaymentProfile.php b/src/Models/UpdatePaymentProfile.php index 1340b15f..e7a404bf 100644 --- a/src/Models/UpdatePaymentProfile.php +++ b/src/Models/UpdatePaymentProfile.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdatePaymentProfile implements \JsonSerializable @@ -373,6 +374,34 @@ public function unsetBillingAddress2(): void $this->billingAddress2 = []; } + /** + * Converts the UpdatePaymentProfile object to a human-readable string representation. + * + * @return string The string representation of the UpdatePaymentProfile object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdatePaymentProfile', + [ + 'firstName' => $this->firstName, + 'lastName' => $this->lastName, + 'fullNumber' => $this->fullNumber, + 'cardType' => $this->cardType, + 'expirationMonth' => $this->expirationMonth, + 'expirationYear' => $this->expirationYear, + 'currentVault' => $this->currentVault, + 'billingAddress' => $this->billingAddress, + 'billingCity' => $this->billingCity, + 'billingState' => $this->billingState, + 'billingZip' => $this->billingZip, + 'billingCountry' => $this->billingCountry, + 'billingAddress2' => $this->getBillingAddress2(), + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdatePaymentProfileRequest.php b/src/Models/UpdatePaymentProfileRequest.php index 53a3ffb9..62f875ad 100644 --- a/src/Models/UpdatePaymentProfileRequest.php +++ b/src/Models/UpdatePaymentProfileRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdatePaymentProfileRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setPaymentProfile(UpdatePaymentProfile $paymentProfile): void $this->paymentProfile = $paymentProfile; } + /** + * Converts the UpdatePaymentProfileRequest object to a human-readable string representation. + * + * @return string The string representation of the UpdatePaymentProfileRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdatePaymentProfileRequest', + ['paymentProfile' => $this->paymentProfile, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdatePrice.php b/src/Models/UpdatePrice.php index 5c3efe9b..981f5439 100644 --- a/src/Models/UpdatePrice.php +++ b/src/Models/UpdatePrice.php @@ -147,6 +147,26 @@ public function setStartingQuantity($startingQuantity): void $this->startingQuantity = $startingQuantity; } + /** + * Converts the UpdatePrice object to a human-readable string representation. + * + * @return string The string representation of the UpdatePrice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdatePrice', + [ + 'id' => $this->id, + 'endingQuantity' => $this->endingQuantity, + 'unitPrice' => $this->unitPrice, + 'destroy' => $this->destroy, + 'startingQuantity' => $this->startingQuantity, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateProductPricePoint.php b/src/Models/UpdateProductPricePoint.php index 8bc28f66..48d350be 100644 --- a/src/Models/UpdateProductPricePoint.php +++ b/src/Models/UpdateProductPricePoint.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateProductPricePoint implements \JsonSerializable @@ -60,6 +61,23 @@ public function setPriceInCents(?int $priceInCents): void $this->priceInCents = $priceInCents; } + /** + * Converts the UpdateProductPricePoint object to a human-readable string representation. + * + * @return string The string representation of the UpdateProductPricePoint object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateProductPricePoint', + [ + 'handle' => $this->handle, + 'priceInCents' => $this->priceInCents, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateProductPricePointRequest.php b/src/Models/UpdateProductPricePointRequest.php index 61e5e047..4e0b2642 100644 --- a/src/Models/UpdateProductPricePointRequest.php +++ b/src/Models/UpdateProductPricePointRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateProductPricePointRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setPricePoint(UpdateProductPricePoint $pricePoint): void $this->pricePoint = $pricePoint; } + /** + * Converts the UpdateProductPricePointRequest object to a human-readable string representation. + * + * @return string The string representation of the UpdateProductPricePointRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateProductPricePointRequest', + ['pricePoint' => $this->pricePoint, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateReasonCode.php b/src/Models/UpdateReasonCode.php index eb1fd4cf..8ab1befc 100644 --- a/src/Models/UpdateReasonCode.php +++ b/src/Models/UpdateReasonCode.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateReasonCode implements \JsonSerializable @@ -89,6 +90,24 @@ public function setPosition(?int $position): void $this->position = $position; } + /** + * Converts the UpdateReasonCode object to a human-readable string representation. + * + * @return string The string representation of the UpdateReasonCode object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateReasonCode', + [ + 'code' => $this->code, + 'description' => $this->description, + 'position' => $this->position, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateReasonCodeRequest.php b/src/Models/UpdateReasonCodeRequest.php index e04545f1..2a20d748 100644 --- a/src/Models/UpdateReasonCodeRequest.php +++ b/src/Models/UpdateReasonCodeRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateReasonCodeRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setReasonCode(UpdateReasonCode $reasonCode): void $this->reasonCode = $reasonCode; } + /** + * Converts the UpdateReasonCodeRequest object to a human-readable string representation. + * + * @return string The string representation of the UpdateReasonCodeRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateReasonCodeRequest', + ['reasonCode' => $this->reasonCode, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateSegment.php b/src/Models/UpdateSegment.php index 82f225a1..5df4bd1d 100644 --- a/src/Models/UpdateSegment.php +++ b/src/Models/UpdateSegment.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateSegment implements \JsonSerializable @@ -78,6 +79,23 @@ public function setPrices(?array $prices): void $this->prices = $prices; } + /** + * Converts the UpdateSegment object to a human-readable string representation. + * + * @return string The string representation of the UpdateSegment object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateSegment', + [ + 'pricingScheme' => $this->pricingScheme, + 'prices' => $this->prices, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateSegmentRequest.php b/src/Models/UpdateSegmentRequest.php index d52bd446..bcb92efd 100644 --- a/src/Models/UpdateSegmentRequest.php +++ b/src/Models/UpdateSegmentRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateSegmentRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setSegment(UpdateSegment $segment): void $this->segment = $segment; } + /** + * Converts the UpdateSegmentRequest object to a human-readable string representation. + * + * @return string The string representation of the UpdateSegmentRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateSegmentRequest', + ['segment' => $this->segment, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateSubscription.php b/src/Models/UpdateSubscription.php index 3d76b97f..ed2f7d14 100644 --- a/src/Models/UpdateSubscription.php +++ b/src/Models/UpdateSubscription.php @@ -507,6 +507,40 @@ public function setProductPricePointHandle(?string $productPricePointHandle): vo $this->productPricePointHandle = $productPricePointHandle; } + /** + * Converts the UpdateSubscription object to a human-readable string representation. + * + * @return string The string representation of the UpdateSubscription object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateSubscription', + [ + 'creditCardAttributes' => $this->creditCardAttributes, + 'productHandle' => $this->productHandle, + 'productId' => $this->productId, + 'productChangeDelayed' => $this->productChangeDelayed, + 'nextProductId' => $this->nextProductId, + 'nextProductPricePointId' => $this->nextProductPricePointId, + 'snapDay' => $this->snapDay, + 'nextBillingAt' => $this->nextBillingAt, + 'paymentCollectionMethod' => $this->paymentCollectionMethod, + 'receivesInvoiceEmails' => $this->receivesInvoiceEmails, + 'netTerms' => $this->netTerms, + 'storedCredentialTransactionId' => $this->storedCredentialTransactionId, + 'reference' => $this->reference, + 'customPrice' => $this->customPrice, + 'components' => $this->components, + 'dunningCommunicationDelayEnabled' => $this->dunningCommunicationDelayEnabled, + 'dunningCommunicationDelayTimeZone' => $this->getDunningCommunicationDelayTimeZone(), + 'productPricePointId' => $this->productPricePointId, + 'productPricePointHandle' => $this->productPricePointHandle, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateSubscriptionComponent.php b/src/Models/UpdateSubscriptionComponent.php index 62a7dfc7..a4137194 100644 --- a/src/Models/UpdateSubscriptionComponent.php +++ b/src/Models/UpdateSubscriptionComponent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateSubscriptionComponent implements \JsonSerializable @@ -62,6 +63,23 @@ public function setCustomPrice(?ComponentCustomPrice $customPrice): void $this->customPrice = $customPrice; } + /** + * Converts the UpdateSubscriptionComponent object to a human-readable string representation. + * + * @return string The string representation of the UpdateSubscriptionComponent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateSubscriptionComponent', + [ + 'componentId' => $this->componentId, + 'customPrice' => $this->customPrice, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateSubscriptionGroup.php b/src/Models/UpdateSubscriptionGroup.php index 7fa2129b..b73dd8e4 100644 --- a/src/Models/UpdateSubscriptionGroup.php +++ b/src/Models/UpdateSubscriptionGroup.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateSubscriptionGroup implements \JsonSerializable @@ -41,6 +42,19 @@ public function setMemberIds(?array $memberIds): void $this->memberIds = $memberIds; } + /** + * Converts the UpdateSubscriptionGroup object to a human-readable string representation. + * + * @return string The string representation of the UpdateSubscriptionGroup object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateSubscriptionGroup', + ['memberIds' => $this->memberIds, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateSubscriptionGroupRequest.php b/src/Models/UpdateSubscriptionGroupRequest.php index 73056f98..de3e7524 100644 --- a/src/Models/UpdateSubscriptionGroupRequest.php +++ b/src/Models/UpdateSubscriptionGroupRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateSubscriptionGroupRequest implements \JsonSerializable @@ -46,6 +47,22 @@ public function setSubscriptionGroup(UpdateSubscriptionGroup $subscriptionGroup) $this->subscriptionGroup = $subscriptionGroup; } + /** + * Converts the UpdateSubscriptionGroupRequest object to a human-readable string representation. + * + * @return string The string representation of the UpdateSubscriptionGroupRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateSubscriptionGroupRequest', + [ + 'subscriptionGroup' => $this->subscriptionGroup, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateSubscriptionNote.php b/src/Models/UpdateSubscriptionNote.php index f2ef1c48..bf0a2488 100644 --- a/src/Models/UpdateSubscriptionNote.php +++ b/src/Models/UpdateSubscriptionNote.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -75,6 +76,23 @@ public function setSticky(bool $sticky): void $this->sticky = $sticky; } + /** + * Converts the UpdateSubscriptionNote object to a human-readable string representation. + * + * @return string The string representation of the UpdateSubscriptionNote object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateSubscriptionNote', + [ + 'body' => $this->body, + 'sticky' => $this->sticky, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateSubscriptionNoteRequest.php b/src/Models/UpdateSubscriptionNoteRequest.php index f256a9c8..baa6a538 100644 --- a/src/Models/UpdateSubscriptionNoteRequest.php +++ b/src/Models/UpdateSubscriptionNoteRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; /** @@ -51,6 +52,19 @@ public function setNote(UpdateSubscriptionNote $note): void $this->note = $note; } + /** + * Converts the UpdateSubscriptionNoteRequest object to a human-readable string representation. + * + * @return string The string representation of the UpdateSubscriptionNoteRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateSubscriptionNoteRequest', + ['note' => $this->note, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpdateSubscriptionRequest.php b/src/Models/UpdateSubscriptionRequest.php index ed18960a..6ae48d4c 100644 --- a/src/Models/UpdateSubscriptionRequest.php +++ b/src/Models/UpdateSubscriptionRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpdateSubscriptionRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setSubscription(UpdateSubscription $subscription): void $this->subscription = $subscription; } + /** + * Converts the UpdateSubscriptionRequest object to a human-readable string representation. + * + * @return string The string representation of the UpdateSubscriptionRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpdateSubscriptionRequest', + ['subscription' => $this->subscription, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpsertPrepaidConfiguration.php b/src/Models/UpsertPrepaidConfiguration.php index 097cbac2..62b2a7f4 100644 --- a/src/Models/UpsertPrepaidConfiguration.php +++ b/src/Models/UpsertPrepaidConfiguration.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpsertPrepaidConfiguration implements \JsonSerializable @@ -106,6 +107,25 @@ public function setReplenishThresholdAmountInCents(?int $replenishThresholdAmoun $this->replenishThresholdAmountInCents = $replenishThresholdAmountInCents; } + /** + * Converts the UpsertPrepaidConfiguration object to a human-readable string representation. + * + * @return string The string representation of the UpsertPrepaidConfiguration object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpsertPrepaidConfiguration', + [ + 'initialFundingAmountInCents' => $this->initialFundingAmountInCents, + 'replenishToAmountInCents' => $this->replenishToAmountInCents, + 'autoReplenish' => $this->autoReplenish, + 'replenishThresholdAmountInCents' => $this->replenishThresholdAmountInCents, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UpsertPrepaidConfigurationRequest.php b/src/Models/UpsertPrepaidConfigurationRequest.php index ba7773f1..e089dcab 100644 --- a/src/Models/UpsertPrepaidConfigurationRequest.php +++ b/src/Models/UpsertPrepaidConfigurationRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UpsertPrepaidConfigurationRequest implements \JsonSerializable @@ -46,6 +47,22 @@ public function setPrepaidConfiguration(UpsertPrepaidConfiguration $prepaidConfi $this->prepaidConfiguration = $prepaidConfiguration; } + /** + * Converts the UpsertPrepaidConfigurationRequest object to a human-readable string representation. + * + * @return string The string representation of the UpsertPrepaidConfigurationRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UpsertPrepaidConfigurationRequest', + [ + 'prepaidConfiguration' => $this->prepaidConfiguration, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Usage.php b/src/Models/Usage.php index 45d9a1df..de6b4cb9 100644 --- a/src/Models/Usage.php +++ b/src/Models/Usage.php @@ -240,6 +240,30 @@ public function setSubscriptionId(?int $subscriptionId): void $this->subscriptionId = $subscriptionId; } + /** + * Converts the Usage object to a human-readable string representation. + * + * @return string The string representation of the Usage object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Usage', + [ + 'id' => $this->id, + 'memo' => $this->getMemo(), + 'createdAt' => $this->createdAt, + 'pricePointId' => $this->pricePointId, + 'quantity' => $this->quantity, + 'overageQuantity' => $this->overageQuantity, + 'componentId' => $this->componentId, + 'componentHandle' => $this->componentHandle, + 'subscriptionId' => $this->subscriptionId, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/UsageResponse.php b/src/Models/UsageResponse.php index 0bb7d81b..213b4efb 100644 --- a/src/Models/UsageResponse.php +++ b/src/Models/UsageResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class UsageResponse implements \JsonSerializable @@ -46,6 +47,19 @@ public function setUsage(Usage $usage): void $this->usage = $usage; } + /** + * Converts the UsageResponse object to a human-readable string representation. + * + * @return string The string representation of the UsageResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'UsageResponse', + ['usage' => $this->usage, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/VoidInvoice.php b/src/Models/VoidInvoice.php index e8f95256..46efed6b 100644 --- a/src/Models/VoidInvoice.php +++ b/src/Models/VoidInvoice.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class VoidInvoice implements \JsonSerializable @@ -46,6 +47,19 @@ public function setReason(string $reason): void $this->reason = $reason; } + /** + * Converts the VoidInvoice object to a human-readable string representation. + * + * @return string The string representation of the VoidInvoice object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'VoidInvoice', + ['reason' => $this->reason, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/VoidInvoiceEvent.php b/src/Models/VoidInvoiceEvent.php index e0f81952..d23f10b1 100644 --- a/src/Models/VoidInvoiceEvent.php +++ b/src/Models/VoidInvoiceEvent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -160,6 +161,26 @@ public function setEventData(VoidInvoiceEventData $eventData): void $this->eventData = $eventData; } + /** + * Converts the VoidInvoiceEvent object to a human-readable string representation. + * + * @return string The string representation of the VoidInvoiceEvent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'VoidInvoiceEvent', + [ + 'id' => $this->id, + 'timestamp' => $this->timestamp, + 'invoice' => $this->invoice, + 'eventType' => $this->eventType, + 'eventData' => $this->eventData, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/VoidInvoiceEventData.php b/src/Models/VoidInvoiceEventData.php index e3ab48ad..d5be06b5 100644 --- a/src/Models/VoidInvoiceEventData.php +++ b/src/Models/VoidInvoiceEventData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -179,6 +180,27 @@ public function setReason(string $reason): void $this->reason = $reason; } + /** + * Converts the VoidInvoiceEventData object to a human-readable string representation. + * + * @return string The string representation of the VoidInvoiceEventData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'VoidInvoiceEventData', + [ + 'creditNoteAttributes' => $this->creditNoteAttributes, + 'memo' => $this->memo, + 'appliedAmount' => $this->appliedAmount, + 'transactionTime' => $this->transactionTime, + 'isAdvanceInvoice' => $this->isAdvanceInvoice, + 'reason' => $this->reason, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/VoidInvoiceRequest.php b/src/Models/VoidInvoiceRequest.php index df46a777..02e77aa3 100644 --- a/src/Models/VoidInvoiceRequest.php +++ b/src/Models/VoidInvoiceRequest.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class VoidInvoiceRequest implements \JsonSerializable @@ -46,6 +47,19 @@ public function setVoid(VoidInvoice $void): void $this->void = $void; } + /** + * Converts the VoidInvoiceRequest object to a human-readable string representation. + * + * @return string The string representation of the VoidInvoiceRequest object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'VoidInvoiceRequest', + ['void' => $this->void, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/VoidRemainderEvent.php b/src/Models/VoidRemainderEvent.php index b6f47815..e83cef3f 100644 --- a/src/Models/VoidRemainderEvent.php +++ b/src/Models/VoidRemainderEvent.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -160,6 +161,26 @@ public function setEventData(VoidRemainderEventData $eventData): void $this->eventData = $eventData; } + /** + * Converts the VoidRemainderEvent object to a human-readable string representation. + * + * @return string The string representation of the VoidRemainderEvent object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'VoidRemainderEvent', + [ + 'id' => $this->id, + 'timestamp' => $this->timestamp, + 'invoice' => $this->invoice, + 'eventType' => $this->eventType, + 'eventData' => $this->eventData, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/VoidRemainderEventData.php b/src/Models/VoidRemainderEventData.php index 26dbc33d..da09ce48 100644 --- a/src/Models/VoidRemainderEventData.php +++ b/src/Models/VoidRemainderEventData.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -139,6 +140,25 @@ public function setTransactionTime(\DateTime $transactionTime): void $this->transactionTime = $transactionTime; } + /** + * Converts the VoidRemainderEventData object to a human-readable string representation. + * + * @return string The string representation of the VoidRemainderEventData object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'VoidRemainderEventData', + [ + 'creditNoteAttributes' => $this->creditNoteAttributes, + 'memo' => $this->memo, + 'appliedAmount' => $this->appliedAmount, + 'transactionTime' => $this->transactionTime, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/Webhook.php b/src/Models/Webhook.php index 50b07404..b985452c 100644 --- a/src/Models/Webhook.php +++ b/src/Models/Webhook.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use AdvancedBillingLib\Utils\DateTimeHelper; use stdClass; @@ -344,6 +345,33 @@ public function setSignatureHmacSha256(?string $signatureHmacSha256): void $this->signatureHmacSha256 = $signatureHmacSha256; } + /** + * Converts the Webhook object to a human-readable string representation. + * + * @return string The string representation of the Webhook object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'Webhook', + [ + 'event' => $this->event, + 'id' => $this->id, + 'createdAt' => $this->createdAt, + 'lastError' => $this->lastError, + 'lastErrorAt' => $this->lastErrorAt, + 'acceptedAt' => $this->getAcceptedAt(), + 'lastSentAt' => $this->lastSentAt, + 'lastSentUrl' => $this->lastSentUrl, + 'successful' => $this->successful, + 'body' => $this->body, + 'signature' => $this->signature, + 'signatureHmacSha256' => $this->signatureHmacSha256, + 'additionalProperties' => $this->additionalProperties + ] + ); + } + private $additionalProperties = []; /** diff --git a/src/Models/WebhookResponse.php b/src/Models/WebhookResponse.php index e1268c24..93eb9b28 100644 --- a/src/Models/WebhookResponse.php +++ b/src/Models/WebhookResponse.php @@ -10,6 +10,7 @@ namespace AdvancedBillingLib\Models; +use AdvancedBillingLib\ApiHelper; use stdClass; class WebhookResponse implements \JsonSerializable @@ -37,6 +38,19 @@ public function setWebhook(?Webhook $webhook): void $this->webhook = $webhook; } + /** + * Converts the WebhookResponse object to a human-readable string representation. + * + * @return string The string representation of the WebhookResponse object. + */ + public function __toString(): string + { + return ApiHelper::stringify( + 'WebhookResponse', + ['webhook' => $this->webhook, 'additionalProperties' => $this->additionalProperties] + ); + } + private $additionalProperties = []; /** diff --git a/tests/TestData/PaymentProfileTestData.php b/tests/TestData/PaymentProfileTestData.php index b4261f70..34579a96 100644 --- a/tests/TestData/PaymentProfileTestData.php +++ b/tests/TestData/PaymentProfileTestData.php @@ -9,7 +9,7 @@ final class PaymentProfileTestData public const CARD_DISABLED = false; public const VAULT_TOKEN = '1'; public const CURRENT_VAULT = 'bogus'; - public const CARD_EXPIRATION_YEAR = 2024; + public const CARD_EXPIRATION_YEAR = 2050; public const CARD_EXPIRATION_MONTH = 12; public const CARD_TYPE = 'visa'; public const MASKED_CARD_NUMBER = 'XXXX-XXXX-XXXX-1111'; diff --git a/tests/TestFactory/TestSiteFactory.php b/tests/TestFactory/TestSiteFactory.php index 65448537..90d4ec34 100644 --- a/tests/TestFactory/TestSiteFactory.php +++ b/tests/TestFactory/TestSiteFactory.php @@ -37,6 +37,7 @@ public function createSiteWithDefaultValues(): Site ->taxConfiguration($this->createDefaultTaxConfiguration()) ->netTerms($this->createDefaultNetTerms()) ->additionalProperty("brighton_v1_enabled", false) + ->scheduleSubscriptionCancellationEnabled(false) ->test(TestSiteData::TEST) ->build(); }