From 81194d5f2835671a6d331ba9b5ff0b43658ac5c6 Mon Sep 17 00:00:00 2001 From: DX Codefresh Date: Tue, 28 Mar 2023 21:41:19 +0000 Subject: [PATCH 01/10] Generated Latest Changes for v2021-02-25 --- lib/recurly/client.php | 83 ++++++ lib/recurly/resources/external_charge.php | 259 +++++++++++++++++ lib/recurly/resources/external_invoice.php | 308 +++++++++++++++++++++ openapi/api.yaml | 255 +++++++++++++++++ 4 files changed, 905 insertions(+) create mode 100644 lib/recurly/resources/external_charge.php create mode 100644 lib/recurly/resources/external_invoice.php diff --git a/lib/recurly/client.php b/lib/recurly/client.php index add76d02..c7effb88 100644 --- a/lib/recurly/client.php +++ b/lib/recurly/client.php @@ -536,6 +536,29 @@ public function listAccountCreditPayments(string $account_id, array $options = [ return new \Recurly\Pager($this, $path, $options); } + /** + * List the external invoices on an account + * + * @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. + * @param array $options Associative array of optional parameters + * + * Supported optional query string parameters: + * + * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending + * order. In descending order updated records will move behind the cursor and could + * prevent some records from being returned. + * - $options['params']['limit'] (int): Limit number of records 1-200. + * - $options['params']['order'] (string): Sort order. + * + * @return \Recurly\Pager A list of the the external_invoices on an account. + * @link https://developers.recurly.com/api/v2021-02-25#operation/list_account_external_invoices + */ + public function listAccountExternalInvoices(string $account_id, array $options = []): \Recurly\Pager + { + $path = $this->interpolatePath("/accounts/{account_id}/external_invoices", ['account_id' => $account_id]); + return new \Recurly\Pager($this, $path, $options); + } + /** * List an account's invoices * @@ -1567,6 +1590,29 @@ public function getExternalSubscription(string $external_subscription_id, array return $this->makeRequest('GET', $path, [], $options); } + /** + * List the external invoices on an external subscription + * + * @param string $external_subscription_id External subscription id + * @param array $options Associative array of optional parameters + * + * Supported optional query string parameters: + * + * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending + * order. In descending order updated records will move behind the cursor and could + * prevent some records from being returned. + * - $options['params']['limit'] (int): Limit number of records 1-200. + * - $options['params']['order'] (string): Sort order. + * + * @return \Recurly\Pager A list of the the external_invoices on a site. + * @link https://developers.recurly.com/api/v2021-02-25#operation/list_external_subscription_external_invoices + */ + public function listExternalSubscriptionExternalInvoices(string $external_subscription_id, array $options = []): \Recurly\Pager + { + $path = $this->interpolatePath("/external_subscriptions/{external_subscription_id}/external_invoices", ['external_subscription_id' => $external_subscription_id]); + return new \Recurly\Pager($this, $path, $options); + } + /** * List a site's invoices * @@ -3046,6 +3092,43 @@ public function getInvoiceTemplate(string $invoice_template_id, array $options = return $this->makeRequest('GET', $path, [], $options); } + /** + * List the external invoices on a site + * + * @param array $options Associative array of optional parameters + * + * Supported optional query string parameters: + * + * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending + * order. In descending order updated records will move behind the cursor and could + * prevent some records from being returned. + * - $options['params']['limit'] (int): Limit number of records 1-200. + * - $options['params']['order'] (string): Sort order. + * + * @return \Recurly\Pager A list of the the external_invoices on a site. + * @link https://developers.recurly.com/api/v2021-02-25#operation/list_external_invoices + */ + public function listExternalInvoices(array $options = []): \Recurly\Pager + { + $path = $this->interpolatePath("/external_invoices", []); + return new \Recurly\Pager($this, $path, $options); + } + + /** + * Fetch an external invoice + * + * @param string $external_invoice_id External invoice ID, e.g. `e28zov4fw0v2`. + * @param array $options Associative array of optional parameters + * + * @return \Recurly\Resources\ExternalInvoice Returns the external invoice + * @link https://developers.recurly.com/api/v2021-02-25#operation/show_external_invoice + */ + public function showExternalInvoice(string $external_invoice_id, array $options = []): \Recurly\Resources\ExternalInvoice + { + $path = $this->interpolatePath("/external_invoices/{external_invoice_id}", ['external_invoice_id' => $external_invoice_id]); + return $this->makeRequest('GET', $path, [], $options); + } + /** * List entitlements granted to an account * diff --git a/lib/recurly/resources/external_charge.php b/lib/recurly/resources/external_charge.php new file mode 100644 index 00000000..165b1da0 --- /dev/null +++ b/lib/recurly/resources/external_charge.php @@ -0,0 +1,259 @@ +_account; + } + + /** + * Setter method for the account attribute. + * + * @param \Recurly\Resources\AccountMini $account + * + * @return void + */ + public function setAccount(\Recurly\Resources\AccountMini $account): void + { + $this->_account = $account; + } + + /** + * Getter method for the created_at attribute. + * When the external charge was created in Recurly. + * + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->_created_at; + } + + /** + * Setter method for the created_at attribute. + * + * @param string $created_at + * + * @return void + */ + public function setCreatedAt(string $created_at): void + { + $this->_created_at = $created_at; + } + + /** + * Getter method for the currency attribute. + * 3-letter ISO 4217 currency code. + * + * @return ?string + */ + public function getCurrency(): ?string + { + return $this->_currency; + } + + /** + * Setter method for the currency attribute. + * + * @param string $currency + * + * @return void + */ + public function setCurrency(string $currency): void + { + $this->_currency = $currency; + } + + /** + * Getter method for the description attribute. + * + * + * @return ?string + */ + public function getDescription(): ?string + { + return $this->_description; + } + + /** + * Setter method for the description attribute. + * + * @param string $description + * + * @return void + */ + public function setDescription(string $description): void + { + $this->_description = $description; + } + + /** + * Getter method for the external_product_reference attribute. + * External Product Reference details + * + * @return ?\Recurly\Resources\ExternalProductReferenceMini + */ + public function getExternalProductReference(): ?\Recurly\Resources\ExternalProductReferenceMini + { + return $this->_external_product_reference; + } + + /** + * Setter method for the external_product_reference attribute. + * + * @param \Recurly\Resources\ExternalProductReferenceMini $external_product_reference + * + * @return void + */ + public function setExternalProductReference(\Recurly\Resources\ExternalProductReferenceMini $external_product_reference): void + { + $this->_external_product_reference = $external_product_reference; + } + + /** + * Getter method for the id attribute. + * System-generated unique identifier for an external charge ID, e.g. `e28zov4fw0v2`. + * + * @return ?string + */ + public function getId(): ?string + { + return $this->_id; + } + + /** + * Setter method for the id attribute. + * + * @param string $id + * + * @return void + */ + public function setId(string $id): void + { + $this->_id = $id; + } + + /** + * Getter method for the object attribute. + * Object type + * + * @return ?string + */ + public function getObject(): ?string + { + return $this->_object; + } + + /** + * Setter method for the object attribute. + * + * @param string $object + * + * @return void + */ + public function setObject(string $object): void + { + $this->_object = $object; + } + + /** + * Getter method for the quantity attribute. + * + * + * @return ?int + */ + public function getQuantity(): ?int + { + return $this->_quantity; + } + + /** + * Setter method for the quantity attribute. + * + * @param int $quantity + * + * @return void + */ + public function setQuantity(int $quantity): void + { + $this->_quantity = $quantity; + } + + /** + * Getter method for the unit_amount attribute. + * Unit Amount + * + * @return ?float + */ + public function getUnitAmount(): ?float + { + return $this->_unit_amount; + } + + /** + * Setter method for the unit_amount attribute. + * + * @param float $unit_amount + * + * @return void + */ + public function setUnitAmount(float $unit_amount): void + { + $this->_unit_amount = $unit_amount; + } + + /** + * Getter method for the updated_at attribute. + * When the external charge was updated in Recurly. + * + * @return ?string + */ + public function getUpdatedAt(): ?string + { + return $this->_updated_at; + } + + /** + * Setter method for the updated_at attribute. + * + * @param string $updated_at + * + * @return void + */ + public function setUpdatedAt(string $updated_at): void + { + $this->_updated_at = $updated_at; + } +} \ No newline at end of file diff --git a/lib/recurly/resources/external_invoice.php b/lib/recurly/resources/external_invoice.php new file mode 100644 index 00000000..f6e3c96a --- /dev/null +++ b/lib/recurly/resources/external_invoice.php @@ -0,0 +1,308 @@ + '\Recurly\Resources\ExternalCharge', + ]; + + + /** + * Getter method for the account attribute. + * Account mini details + * + * @return ?\Recurly\Resources\AccountMini + */ + public function getAccount(): ?\Recurly\Resources\AccountMini + { + return $this->_account; + } + + /** + * Setter method for the account attribute. + * + * @param \Recurly\Resources\AccountMini $account + * + * @return void + */ + public function setAccount(\Recurly\Resources\AccountMini $account): void + { + $this->_account = $account; + } + + /** + * Getter method for the created_at attribute. + * When the external invoice was created in Recurly. + * + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->_created_at; + } + + /** + * Setter method for the created_at attribute. + * + * @param string $created_at + * + * @return void + */ + public function setCreatedAt(string $created_at): void + { + $this->_created_at = $created_at; + } + + /** + * Getter method for the currency attribute. + * 3-letter ISO 4217 currency code. + * + * @return ?string + */ + public function getCurrency(): ?string + { + return $this->_currency; + } + + /** + * Setter method for the currency attribute. + * + * @param string $currency + * + * @return void + */ + public function setCurrency(string $currency): void + { + $this->_currency = $currency; + } + + /** + * Getter method for the external_id attribute. + * An identifier which associates the external invoice to a corresponding object in an external platform. + * + * @return ?string + */ + public function getExternalId(): ?string + { + return $this->_external_id; + } + + /** + * Setter method for the external_id attribute. + * + * @param string $external_id + * + * @return void + */ + public function setExternalId(string $external_id): void + { + $this->_external_id = $external_id; + } + + /** + * Getter method for the external_subscription attribute. + * Subscription from an external resource such as Apple App Store or Google Play Store. + * + * @return ?\Recurly\Resources\ExternalSubscription + */ + public function getExternalSubscription(): ?\Recurly\Resources\ExternalSubscription + { + return $this->_external_subscription; + } + + /** + * Setter method for the external_subscription attribute. + * + * @param \Recurly\Resources\ExternalSubscription $external_subscription + * + * @return void + */ + public function setExternalSubscription(\Recurly\Resources\ExternalSubscription $external_subscription): void + { + $this->_external_subscription = $external_subscription; + } + + /** + * Getter method for the id attribute. + * System-generated unique identifier for an external invoice ID, e.g. `e28zov4fw0v2`. + * + * @return ?string + */ + public function getId(): ?string + { + return $this->_id; + } + + /** + * Setter method for the id attribute. + * + * @param string $id + * + * @return void + */ + public function setId(string $id): void + { + $this->_id = $id; + } + + /** + * Getter method for the line_items attribute. + * + * + * @return array + */ + public function getLineItems(): array + { + return $this->_line_items ?? [] ; + } + + /** + * Setter method for the line_items attribute. + * + * @param array $line_items + * + * @return void + */ + public function setLineItems(array $line_items): void + { + $this->_line_items = $line_items; + } + + /** + * Getter method for the object attribute. + * Object type + * + * @return ?string + */ + public function getObject(): ?string + { + return $this->_object; + } + + /** + * Setter method for the object attribute. + * + * @param string $object + * + * @return void + */ + public function setObject(string $object): void + { + $this->_object = $object; + } + + /** + * Getter method for the purchased_at attribute. + * When the invoice was created in the external platform. + * + * @return ?string + */ + public function getPurchasedAt(): ?string + { + return $this->_purchased_at; + } + + /** + * Setter method for the purchased_at attribute. + * + * @param string $purchased_at + * + * @return void + */ + public function setPurchasedAt(string $purchased_at): void + { + $this->_purchased_at = $purchased_at; + } + + /** + * Getter method for the state attribute. + * + * + * @return ?string + */ + public function getState(): ?string + { + return $this->_state; + } + + /** + * Setter method for the state attribute. + * + * @param string $state + * + * @return void + */ + public function setState(string $state): void + { + $this->_state = $state; + } + + /** + * Getter method for the total attribute. + * Total + * + * @return ?float + */ + public function getTotal(): ?float + { + return $this->_total; + } + + /** + * Setter method for the total attribute. + * + * @param float $total + * + * @return void + */ + public function setTotal(float $total): void + { + $this->_total = $total; + } + + /** + * Getter method for the updated_at attribute. + * When the external invoice was updated in Recurly. + * + * @return ?string + */ + public function getUpdatedAt(): ?string + { + return $this->_updated_at; + } + + /** + * Setter method for the updated_at attribute. + * + * @param string $updated_at + * + * @return void + */ + public function setUpdatedAt(string $updated_at): void + { + $this->_updated_at = $updated_at; + } +} \ No newline at end of file diff --git a/openapi/api.yaml b/openapi/api.yaml index 8db95d37..f8ab3ede 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -200,6 +200,7 @@ x-tagGroups: - usage - automated_exports - external_subscriptions + - external_invoices - external_products - gift_cards - name: Products and Promotions @@ -346,6 +347,11 @@ tags: description: A subscription from an external resource that is not managed by the Recurly platform and instead is managed by third-party platforms like Apple App Store and Google Play Store. +- name: external_invoices + x-displayName: External Invoices + description: An invoice from an external resource that is not managed by the Recurly + platform and instead is managed by third-party platforms like Apple App Store + and Google Play Store. - name: external_products x-displayName: External Product description: A product from an external resource that is not managed by the Recurly @@ -3244,6 +3250,40 @@ paths: := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, creditPayment := range creditPayments.Data() {\n\t\tfmt.Printf(\"Account Credit Payment %3d: %s\\n\",\n\t\t\ti,\n\t\t\tcreditPayment.Id,\n\t\t)\n\t}\n}" + "/accounts/{account_id}/external_invoices": + parameters: + - "$ref": "#/components/parameters/account_id" + get: + tags: + - account + operationId: list_account_external_invoices + summary: List the external invoices on an account + description: See the [Pagination Guide](/developers/guides/pagination.html) + to learn how to use pagination in the API and Client Libraries. + parameters: + - "$ref": "#/components/parameters/sort_dates" + - "$ref": "#/components/parameters/limit" + - "$ref": "#/components/parameters/order" + responses: + '200': + description: A list of the the external_invoices on an account. + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalInvoiceList" + '404': + description: Incorrect account. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] "/accounts/{account_id}/invoices": get: tags: @@ -7588,6 +7628,40 @@ paths: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] + "/external_subscriptions/{external_subscription_id}/external_invoices": + parameters: + - "$ref": "#/components/parameters/external_subscription_id" + get: + tags: + - external_subscriptions + operationId: list_external_subscription_external_invoices + summary: List the external invoices on an external subscription + description: See the [Pagination Guide](/developers/guides/pagination.html) + to learn how to use pagination in the API and Client Libraries. + parameters: + - "$ref": "#/components/parameters/sort_dates" + - "$ref": "#/components/parameters/limit" + - "$ref": "#/components/parameters/order" + responses: + '200': + description: A list of the the external_invoices on a site. + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalInvoiceList" + '404': + description: Incorrect site. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] "/invoices": get: tags: @@ -15346,6 +15420,72 @@ paths: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] + "/external_invoices": + get: + tags: + - external_invoices + operationId: list_external_invoices + summary: List the external invoices on a site + description: See the [Pagination Guide](/developers/guides/pagination.html) + to learn how to use pagination in the API and Client Libraries. + parameters: + - "$ref": "#/components/parameters/sort_dates" + - "$ref": "#/components/parameters/limit" + - "$ref": "#/components/parameters/order" + responses: + '200': + description: A list of the the external_invoices on a site. + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalInvoiceList" + '404': + description: Incorrect site. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] + "/external_invoices/{external_invoice_id}": + parameters: + - "$ref": "#/components/parameters/external_invoice_id" + get: + tags: + - external_invoices + operationId: show_external_invoice + summary: Fetch an external invoice + responses: + '201': + description: Returns the external invoice + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalInvoice" + '400': + description: Bad request; perhaps missing or invalid parameters. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '404': + description: External invoice cannot be found for the specified reason. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] "/accounts/{account_id}/entitlements": parameters: - "$ref": "#/components/parameters/account_id" @@ -15643,6 +15783,13 @@ components: required: true schema: type: string + external_invoice_id: + name: external_invoice_id + in: path + description: External invoice ID, e.g. `e28zov4fw0v2`. + required: true + schema: + type: string external_product_id: name: external_product_id in: path @@ -22918,6 +23065,110 @@ components: type: array items: "$ref": "#/components/schemas/ExternalSubscription" + ExternalInvoice: + type: object + description: Invoice from an external resource such as Apple App Store or Google + Play Store. + properties: + id: + type: string + title: External invoice ID + description: System-generated unique identifier for an external invoice + ID, e.g. `e28zov4fw0v2`. + object: + type: string + title: Object type + account: + "$ref": "#/components/schemas/AccountMini" + external_subscription: + "$ref": "#/components/schemas/ExternalSubscription" + external_id: + type: string + description: An identifier which associates the external invoice to a corresponding + object in an external platform. + state: + "$ref": "#/components/schemas/ExternalInvoiceStateEnum" + total: + type: number + format: float + title: Total + currency: + type: string + title: Currency + description: 3-letter ISO 4217 currency code. + line_items: + type: array + items: + "$ref": "#/components/schemas/ExternalCharge" + purchased_at: + type: string + format: date-time + description: When the invoice was created in the external platform. + created_at: + type: string + format: date-time + description: When the external invoice was created in Recurly. + updated_at: + type: string + format: date-time + title: Updated at + description: When the external invoice was updated in Recurly. + ExternalInvoiceList: + type: object + properties: + object: + type: string + title: Object type + description: Will always be List. + has_more: + type: boolean + description: Indicates there are more results on subsequent pages. + next: + type: string + description: Path to subsequent page of results. + data: + type: array + items: + "$ref": "#/components/schemas/ExternalInvoice" + ExternalCharge: + type: object + description: Charge from an external resource such as Apple App Store or Google + Play Store. + properties: + id: + type: string + title: External invoice ID + description: System-generated unique identifier for an external charge ID, + e.g. `e28zov4fw0v2`. + object: + type: string + title: Object type + account: + "$ref": "#/components/schemas/AccountMini" + currency: + type: string + title: Currency + description: 3-letter ISO 4217 currency code. + unit_amount: + type: number + format: float + title: Unit Amount + quantity: + type: integer + description: + type: string + external_product_reference: + "$ref": "#/components/schemas/ExternalProductReferenceMini" + created_at: + type: string + format: date-time + title: Created at + description: When the external charge was created in Recurly. + updated_at: + type: string + format: date-time + title: Updated at + description: When the external charge was updated in Recurly. CustomerPermission: type: object properties: @@ -24276,3 +24527,7 @@ components: enum: - ideal - sofort + ExternalInvoiceStateEnum: + type: string + enum: + - paid From bc8e4a87074f3cc164ab9951d8632d8826ebd824 Mon Sep 17 00:00:00 2001 From: Recurly integrations Date: Wed, 29 Mar 2023 20:27:32 +0000 Subject: [PATCH 02/10] 4.30.0 [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.29.0...4.30.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Invoices) [#751](https://github.com/recurly/recurly-client-php/pull/751) ([recurly-integrations](https://github.com/recurly-integrations)) --- .bumpversion.cfg | 2 +- CHANGELOG.md | 11 +++++++++++ composer.json | 2 +- lib/recurly/version.php | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index e1c23f5f..016b765f 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 4.29.0 +current_version = 4.30.0 parse = (?P\d+) \.(?P\d+) \.(?P\d+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc0bd178..e5e7dc5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [4.30.0](https://github.com/recurly/recurly-client-php/tree/4.30.0) (2023-03-29) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.29.0...4.30.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 (External Invoices) [#751](https://github.com/recurly/recurly-client-php/pull/751) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.29.0](https://github.com/recurly/recurly-client-php/tree/4.29.0) (2023-02-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.28.0...4.29.0) diff --git a/composer.json b/composer.json index 8f07352e..66b893cd 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "recurly/recurly-client", - "version": "4.29.0", + "version": "4.30.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], diff --git a/lib/recurly/version.php b/lib/recurly/version.php index f67e8ca4..7053bb1b 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -4,5 +4,5 @@ class Version { - public const CURRENT = '4.29.0'; + public const CURRENT = '4.30.0'; } From 6d45b387eb47220c798f43f692ec8883637d1e48 Mon Sep 17 00:00:00 2001 From: DX Codefresh Date: Tue, 4 Apr 2023 18:18:04 +0000 Subject: [PATCH 03/10] Generated Latest Changes for v2021-02-25 --- lib/recurly/resources/external_charge.php | 8 ++++---- lib/recurly/resources/external_invoice.php | 8 ++++---- openapi/api.yaml | 11 +++++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/lib/recurly/resources/external_charge.php b/lib/recurly/resources/external_charge.php index 165b1da0..a5916aff 100644 --- a/lib/recurly/resources/external_charge.php +++ b/lib/recurly/resources/external_charge.php @@ -215,9 +215,9 @@ public function setQuantity(int $quantity): void * Getter method for the unit_amount attribute. * Unit Amount * - * @return ?float + * @return ?string */ - public function getUnitAmount(): ?float + public function getUnitAmount(): ?string { return $this->_unit_amount; } @@ -225,11 +225,11 @@ public function getUnitAmount(): ?float /** * Setter method for the unit_amount attribute. * - * @param float $unit_amount + * @param string $unit_amount * * @return void */ - public function setUnitAmount(float $unit_amount): void + public function setUnitAmount(string $unit_amount): void { $this->_unit_amount = $unit_amount; } diff --git a/lib/recurly/resources/external_invoice.php b/lib/recurly/resources/external_invoice.php index f6e3c96a..68adda90 100644 --- a/lib/recurly/resources/external_invoice.php +++ b/lib/recurly/resources/external_invoice.php @@ -264,9 +264,9 @@ public function setState(string $state): void * Getter method for the total attribute. * Total * - * @return ?float + * @return ?string */ - public function getTotal(): ?float + public function getTotal(): ?string { return $this->_total; } @@ -274,11 +274,11 @@ public function getTotal(): ?float /** * Setter method for the total attribute. * - * @param float $total + * @param string $total * * @return void */ - public function setTotal(float $total): void + public function setTotal(string $total): void { $this->_total = $total; } diff --git a/openapi/api.yaml b/openapi/api.yaml index f8ab3ede..b41eb369 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -17604,6 +17604,9 @@ components: title: Security code or CVV description: "*STRONGLY RECOMMENDED*" maxLength: 4 + currency: + type: string + description: 3-letter ISO 4217 currency code. vat_number: type: string title: VAT number @@ -23089,8 +23092,8 @@ components: state: "$ref": "#/components/schemas/ExternalInvoiceStateEnum" total: - type: number - format: float + type: string + format: decimal title: Total currency: type: string @@ -23150,8 +23153,8 @@ components: title: Currency description: 3-letter ISO 4217 currency code. unit_amount: - type: number - format: float + type: string + format: decimal title: Unit Amount quantity: type: integer From 1a19fe81c9dce9b004d9bd7b908cffc0c3604aa9 Mon Sep 17 00:00:00 2001 From: Recurly integrations Date: Wed, 5 Apr 2023 17:05:39 +0000 Subject: [PATCH 04/10] 4.31.0 [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.30.0...4.31.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#753](https://github.com/recurly/recurly-client-php/pull/753) ([recurly-integrations](https://github.com/recurly-integrations)) --- .bumpversion.cfg | 2 +- CHANGELOG.md | 11 +++++++++++ composer.json | 2 +- lib/recurly/version.php | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 016b765f..af9808d8 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 4.30.0 +current_version = 4.31.0 parse = (?P\d+) \.(?P\d+) \.(?P\d+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5e7dc5d..d1dbfd98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [4.31.0](https://github.com/recurly/recurly-client-php/tree/4.31.0) (2023-04-05) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.30.0...4.31.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 [#753](https://github.com/recurly/recurly-client-php/pull/753) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.30.0](https://github.com/recurly/recurly-client-php/tree/4.30.0) (2023-03-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.29.0...4.30.0) diff --git a/composer.json b/composer.json index 66b893cd..a340f8c0 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "recurly/recurly-client", - "version": "4.30.0", + "version": "4.31.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], diff --git a/lib/recurly/version.php b/lib/recurly/version.php index 7053bb1b..627bc68c 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -4,5 +4,5 @@ class Version { - public const CURRENT = '4.30.0'; + public const CURRENT = '4.31.0'; } From ce29c031a2e75da9b5fb5b509a7f1d8a33d3236c Mon Sep 17 00:00:00 2001 From: DX Codefresh Date: Tue, 11 Apr 2023 23:39:43 +0000 Subject: [PATCH 05/10] Generated Latest Changes for v2021-02-25 --- lib/recurly/client.php | 80 ++++++ lib/recurly/resources/account.php | 25 ++ lib/recurly/resources/external_account.php | 163 ++++++++++++ openapi/api.yaml | 289 +++++++++++++++++++++ 4 files changed, 557 insertions(+) create mode 100644 lib/recurly/resources/external_account.php diff --git a/lib/recurly/client.php b/lib/recurly/client.php index c7effb88..6104128e 100644 --- a/lib/recurly/client.php +++ b/lib/recurly/client.php @@ -536,6 +536,86 @@ public function listAccountCreditPayments(string $account_id, array $options = [ return new \Recurly\Pager($this, $path, $options); } + /** + * List external accounts for an account + * + * @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. + * @param array $options Associative array of optional parameters + * + * @return \Recurly\Pager A list of external accounts on an account. + * @link https://developers.recurly.com/api/v2021-02-25#operation/list_account_external_account + */ + public function listAccountExternalAccount(string $account_id, array $options = []): \Recurly\Pager + { + $path = $this->interpolatePath("/accounts/{account_id}/external_accounts", ['account_id' => $account_id]); + return new \Recurly\Pager($this, $path, $options); + } + + /** + * Create an external account + * + * @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. + * @param array $body The body of the request. + * @param array $options Associative array of optional parameters + * + * @return \Recurly\Resources\ExternalAccount A representation of the created external_account. + * @link https://developers.recurly.com/api/v2021-02-25#operation/create_account_external_account + */ + public function createAccountExternalAccount(string $account_id, array $body, array $options = []): \Recurly\Resources\ExternalAccount + { + $path = $this->interpolatePath("/accounts/{account_id}/external_accounts", ['account_id' => $account_id]); + return $this->makeRequest('POST', $path, $body, $options); + } + + /** + * Get an external account for an account + * + * @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. + * @param string $external_account_id External account ID, e.g. `s28zov4fw0cb`. + * @param array $options Associative array of optional parameters + * + * @return \Recurly\Resources\ExternalAccount A external account on an account. + * @link https://developers.recurly.com/api/v2021-02-25#operation/get_account_external_account + */ + public function getAccountExternalAccount(string $account_id, string $external_account_id, array $options = []): \Recurly\Resources\ExternalAccount + { + $path = $this->interpolatePath("/accounts/{account_id}/external_accounts/{external_account_id}", ['account_id' => $account_id, 'external_account_id' => $external_account_id]); + return $this->makeRequest('GET', $path, [], $options); + } + + /** + * Update an external account + * + * @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. + * @param string $external_account_id External account ID, e.g. `s28zov4fw0cb`. + * @param array $body The body of the request. + * @param array $options Associative array of optional parameters + * + * @return \Recurly\Resources\ExternalAccount A representation of the updated external_account. + * @link https://developers.recurly.com/api/v2021-02-25#operation/update_account_external_account + */ + public function updateAccountExternalAccount(string $account_id, string $external_account_id, array $body, array $options = []): \Recurly\Resources\ExternalAccount + { + $path = $this->interpolatePath("/accounts/{account_id}/external_accounts/{external_account_id}", ['account_id' => $account_id, 'external_account_id' => $external_account_id]); + return $this->makeRequest('PUT', $path, $body, $options); + } + + /** + * Delete an external account for an account + * + * @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. + * @param string $external_account_id External account ID, e.g. `s28zov4fw0cb`. + * @param array $options Associative array of optional parameters + * + * @return \Recurly\Resources\ExternalAccount Successful Delete + * @link https://developers.recurly.com/api/v2021-02-25#operation/delete_account_external_account + */ + public function deleteAccountExternalAccount(string $account_id, string $external_account_id, array $options = []): \Recurly\Resources\ExternalAccount + { + $path = $this->interpolatePath("/accounts/{account_id}/external_accounts/{external_account_id}", ['account_id' => $account_id, 'external_account_id' => $external_account_id]); + return $this->makeRequest('DELETE', $path, [], $options); + } + /** * List the external invoices on an account * diff --git a/lib/recurly/resources/account.php b/lib/recurly/resources/account.php index e99c9a4f..b938ad47 100644 --- a/lib/recurly/resources/account.php +++ b/lib/recurly/resources/account.php @@ -24,6 +24,7 @@ class Account extends RecurlyResource private $_dunning_campaign_id; private $_email; private $_exemption_certificate; + private $_external_accounts; private $_first_name; private $_has_active_subscription; private $_has_canceled_subscription; @@ -48,6 +49,7 @@ class Account extends RecurlyResource protected static $array_hints = [ 'setCustomFields' => '\Recurly\Resources\CustomField', + 'setExternalAccounts' => '\Recurly\Resources\ExternalAccount', 'setShippingAddresses' => '\Recurly\Resources\ShippingAddress', ]; @@ -328,6 +330,29 @@ public function setExemptionCertificate(string $exemption_certificate): void $this->_exemption_certificate = $exemption_certificate; } + /** + * Getter method for the external_accounts attribute. + * The external accounts belonging to this account + * + * @return array + */ + public function getExternalAccounts(): array + { + return $this->_external_accounts ?? [] ; + } + + /** + * Setter method for the external_accounts attribute. + * + * @param array $external_accounts + * + * @return void + */ + public function setExternalAccounts(array $external_accounts): void + { + $this->_external_accounts = $external_accounts; + } + /** * Getter method for the first_name attribute. * diff --git a/lib/recurly/resources/external_account.php b/lib/recurly/resources/external_account.php new file mode 100644 index 00000000..259409de --- /dev/null +++ b/lib/recurly/resources/external_account.php @@ -0,0 +1,163 @@ +_created_at; + } + + /** + * Setter method for the created_at attribute. + * + * @param string $created_at + * + * @return void + */ + public function setCreatedAt(string $created_at): void + { + $this->_created_at = $created_at; + } + + /** + * Getter method for the external_account_code attribute. + * Represents the account code for the external account. + * + * @return ?string + */ + public function getExternalAccountCode(): ?string + { + return $this->_external_account_code; + } + + /** + * Setter method for the external_account_code attribute. + * + * @param string $external_account_code + * + * @return void + */ + public function setExternalAccountCode(string $external_account_code): void + { + $this->_external_account_code = $external_account_code; + } + + /** + * Getter method for the external_connection_type attribute. + * Represents the connection type. `AppleAppStore` or `GooglePlayStore` + * + * @return ?string + */ + public function getExternalConnectionType(): ?string + { + return $this->_external_connection_type; + } + + /** + * Setter method for the external_connection_type attribute. + * + * @param string $external_connection_type + * + * @return void + */ + public function setExternalConnectionType(string $external_connection_type): void + { + $this->_external_connection_type = $external_connection_type; + } + + /** + * Getter method for the id attribute. + * UUID of the external_account . + * + * @return ?string + */ + public function getId(): ?string + { + return $this->_id; + } + + /** + * Setter method for the id attribute. + * + * @param string $id + * + * @return void + */ + public function setId(string $id): void + { + $this->_id = $id; + } + + /** + * Getter method for the object attribute. + * + * + * @return ?string + */ + public function getObject(): ?string + { + return $this->_object; + } + + /** + * Setter method for the object attribute. + * + * @param string $object + * + * @return void + */ + public function setObject(string $object): void + { + $this->_object = $object; + } + + /** + * Getter method for the updated_at attribute. + * Last updated at + * + * @return ?string + */ + public function getUpdatedAt(): ?string + { + return $this->_updated_at; + } + + /** + * Setter method for the updated_at attribute. + * + * @param string $updated_at + * + * @return void + */ + public function setUpdatedAt(string $updated_at): void + { + $this->_updated_at = $updated_at; + } +} \ No newline at end of file diff --git a/openapi/api.yaml b/openapi/api.yaml index b41eb369..493071ba 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -202,6 +202,7 @@ x-tagGroups: - external_subscriptions - external_invoices - external_products + - external_accounts - gift_cards - name: Products and Promotions tags: @@ -361,6 +362,11 @@ tags: x-displayName: Gift Cards description: Add gift card purchases to your checkout and allow gift card recipients to redeem the gift card for credit towards any of your products. +- name: external_accounts + x-displayName: External Accounts + description: An account from an external resource that is not managed by the Recurly + platform and instead is managed by third-party platforms like Apple App Store + and Google Play Store. paths: "/sites": get: @@ -3250,6 +3256,208 @@ paths: := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, creditPayment := range creditPayments.Data() {\n\t\tfmt.Printf(\"Account Credit Payment %3d: %s\\n\",\n\t\t\ti,\n\t\t\tcreditPayment.Id,\n\t\t)\n\t}\n}" + "/accounts/{account_id}/external_accounts": + parameters: + - "$ref": "#/components/parameters/account_id" + get: + tags: + - external_accounts + operationId: list_account_external_account + summary: List external accounts for an account + responses: + '200': + description: A list of external accounts on an account. + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalAccountList" + '404': + description: Incorrect account or external_account ID. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '406': + description: Unavailable API version + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '422': + description: Feature not enabled on site + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] + post: + tags: + - external_accounts + operationId: create_account_external_account + summary: Create an external account + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalAccountCreate" + responses: + '200': + description: A representation of the created external_account. + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalAccount" + '404': + description: Incorrect account or external_account ID. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '406': + description: Unavailable API version + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '422': + description: Feature not enabled on site + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] + "/accounts/{account_id}/external_accounts/{external_account_id}": + parameters: + - "$ref": "#/components/parameters/account_id" + - "$ref": "#/components/parameters/external_account_id" + get: + tags: + - external_accounts + operationId: get_account_external_account + summary: Get an external account for an account + responses: + '200': + description: A external account on an account. + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalAccount" + '404': + description: Incorrect account or external_account ID. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '406': + description: Unavailable API version + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '422': + description: Feature not enabled on site + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] + put: + tags: + - external_accounts + operationId: update_account_external_account + summary: Update an external account + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalAccountUpdate" + responses: + '200': + description: A representation of the updated external_account. + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalAccount" + '404': + description: Incorrect account or external_account ID. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '406': + description: Unavailable API version + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '422': + description: Feature not enabled on site + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] + delete: + tags: + - external_accounts + operationId: delete_account_external_account + summary: Delete an external account for an account + responses: + '200': + description: Successful Delete + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalAccount" + '404': + description: External Account not found + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '406': + description: Unavailable API version + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '422': + description: Feature not enabled on site + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] "/accounts/{account_id}/external_invoices": parameters: - "$ref": "#/components/parameters/account_id" @@ -15783,6 +15991,13 @@ components: required: true schema: type: string + external_account_id: + name: external_account_id + in: path + description: External account ID, e.g. `s28zov4fw0cb`. + required: true + schema: + type: string external_invoice_id: name: external_invoice_id in: path @@ -16566,6 +16781,11 @@ components: maxLength: 50 acquisition: "$ref": "#/components/schemas/AccountAcquisitionUpdate" + external_accounts: + type: array + title: External Accounts + items: + "$ref": "#/components/schemas/ExternalAccountCreate" shipping_addresses: type: array items: @@ -16763,6 +16983,11 @@ components: merchant has an integration for the Vertex tax provider, this optional value will be sent in any tax calculation requests for the account. maxLength: 30 + external_accounts: + type: array + description: The external accounts belonging to this account + items: + "$ref": "#/components/schemas/ExternalAccount" parent_account_id: type: string maxLength: 13 @@ -22951,6 +23176,70 @@ components: type: array items: "$ref": "#/components/schemas/ExternalProduct" + ExternalAccountList: + type: object + properties: + object: + type: string + title: Object type + description: Will always be List. + has_more: + type: boolean + description: Indicates there are more results on subsequent pages. + next: + type: string + description: Path to subsequent page of results. + data: + type: array + items: + "$ref": "#/components/schemas/ExternalAccount" + ExternalAccountCreate: + type: object + properties: + external_account_code: + type: string + description: Represents the account code for the external account. + external_connection_type: + type: string + description: Represents the connection type. `AppleAppStore` or `GooglePlayStore` + required: + - external_account_code + - external_connection_type + ExternalAccountUpdate: + type: object + properties: + external_account_code: + type: string + description: Represents the account code for the external account. + external_connection_type: + type: string + description: Represents the connection type. `AppleAppStore` or `GooglePlayStore` + ExternalAccount: + type: object + title: External Account + properties: + object: + type: string + default: external_account + id: + type: string + description: UUID of the external_account . + external_account_code: + type: string + description: Represents the account code for the external account. + external_connection_type: + type: string + description: Represents the connection type. `AppleAppStore` or `GooglePlayStore` + created_at: + type: string + format: date-time + description: Created at + readOnly: true + updated_at: + type: string + format: date-time + description: Last updated at + readOnly: true ExternalProductReferenceMini: type: object title: External Product Reference details From 004040d2836faec669564e35e379d9e03e0c55ba Mon Sep 17 00:00:00 2001 From: Recurly integrations Date: Thu, 13 Apr 2023 16:22:17 +0000 Subject: [PATCH 06/10] 4.32.0 [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.31.0...4.32.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Accounts) [#756](https://github.com/recurly/recurly-client-php/pull/756) ([recurly-integrations](https://github.com/recurly-integrations)) --- .bumpversion.cfg | 2 +- CHANGELOG.md | 11 +++++++++++ composer.json | 2 +- lib/recurly/version.php | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index af9808d8..5484c9c7 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 4.31.0 +current_version = 4.32.0 parse = (?P\d+) \.(?P\d+) \.(?P\d+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1dbfd98..ff339552 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [4.32.0](https://github.com/recurly/recurly-client-php/tree/4.32.0) (2023-04-13) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.31.0...4.32.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 (External Accounts) [#756](https://github.com/recurly/recurly-client-php/pull/756) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.31.0](https://github.com/recurly/recurly-client-php/tree/4.31.0) (2023-04-05) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.30.0...4.31.0) diff --git a/composer.json b/composer.json index a340f8c0..e6534c4e 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "recurly/recurly-client", - "version": "4.31.0", + "version": "4.32.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], diff --git a/lib/recurly/version.php b/lib/recurly/version.php index 627bc68c..14cc4533 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -4,5 +4,5 @@ class Version { - public const CURRENT = '4.31.0'; + public const CURRENT = '4.32.0'; } From 0c84c0bbe7f47ac9c7668ace194b615e79518731 Mon Sep 17 00:00:00 2001 From: DX Codefresh Date: Wed, 26 Apr 2023 20:23:09 +0000 Subject: [PATCH 07/10] Generated Latest Changes for v2021-02-25 --- lib/recurly/resources/invoice.php | 24 ++++++++++++++++++++++++ openapi/api.yaml | 9 +++++++++ 2 files changed, 33 insertions(+) diff --git a/lib/recurly/resources/invoice.php b/lib/recurly/resources/invoice.php index cdad2aab..ff624e81 100644 --- a/lib/recurly/resources/invoice.php +++ b/lib/recurly/resources/invoice.php @@ -49,6 +49,7 @@ class Invoice extends RecurlyResource private $_transactions; private $_type; private $_updated_at; + private $_used_tax_service; private $_uuid; private $_vat_number; private $_vat_reverse_charge_notes; @@ -912,6 +913,29 @@ public function setUpdatedAt(string $updated_at): void $this->_updated_at = $updated_at; } + /** + * Getter method for the used_tax_service attribute. + * Will be `true` when the invoice had a successful response from the tax service and `false` when the invoice was not sent to tax service due to a lack of address or enabled jurisdiction or was processed without tax due to a non-blocking error returned from the tax service. + * + * @return ?bool + */ + public function getUsedTaxService(): ?bool + { + return $this->_used_tax_service; + } + + /** + * Setter method for the used_tax_service attribute. + * + * @param bool $used_tax_service + * + * @return void + */ + public function setUsedTaxService(bool $used_tax_service): void + { + $this->_used_tax_service = $used_tax_service; + } + /** * Getter method for the uuid attribute. * Invoice UUID diff --git a/openapi/api.yaml b/openapi/api.yaml index 493071ba..a7a7a542 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -19032,6 +19032,13 @@ components: description: The outstanding balance remaining on this invoice. tax_info: "$ref": "#/components/schemas/TaxInfo" + used_tax_service: + type: boolean + title: Used Tax Service? + description: Will be `true` when the invoice had a successful response from + the tax service and `false` when the invoice was not sent to tax service + due to a lack of address or enabled jurisdiction or was processed without + tax due to a non-blocking error returned from the tax service. vat_number: type: string title: VAT number @@ -24043,7 +24050,9 @@ components: - es-MX - es-US - fi-FI + - fr-BE - fr-CA + - fr-CH - fr-FR - hi-IN - it-IT From 4cf7a4b5c2285da08aca65bdcb2fee3023556b7c Mon Sep 17 00:00:00 2001 From: Recurly integrations Date: Wed, 26 Apr 2023 21:45:38 +0000 Subject: [PATCH 08/10] 4.33.0 [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.32.0...4.33.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (used_tax_service on Invoice) [#759](https://github.com/recurly/recurly-client-php/pull/759) ([recurly-integrations](https://github.com/recurly-integrations)) --- .bumpversion.cfg | 2 +- CHANGELOG.md | 11 +++++++++++ composer.json | 2 +- lib/recurly/version.php | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 5484c9c7..839c941a 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 4.32.0 +current_version = 4.33.0 parse = (?P\d+) \.(?P\d+) \.(?P\d+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff339552..d1c974f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [4.33.0](https://github.com/recurly/recurly-client-php/tree/4.33.0) (2023-04-26) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.32.0...4.33.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 (used_tax_service on Invoice) [#759](https://github.com/recurly/recurly-client-php/pull/759) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.32.0](https://github.com/recurly/recurly-client-php/tree/4.32.0) (2023-04-13) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.31.0...4.32.0) diff --git a/composer.json b/composer.json index e6534c4e..a41bc536 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "recurly/recurly-client", - "version": "4.32.0", + "version": "4.33.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], diff --git a/lib/recurly/version.php b/lib/recurly/version.php index 14cc4533..a655d6dd 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -4,5 +4,5 @@ class Version { - public const CURRENT = '4.32.0'; + public const CURRENT = '4.33.0'; } From 4f0032a8b255672cbaabc551eaa2b80343f9f396 Mon Sep 17 00:00:00 2001 From: DX Codefresh Date: Wed, 3 May 2023 19:36:40 +0000 Subject: [PATCH 09/10] Generated Latest Changes for v2021-02-25 --- lib/recurly/resources/tax_detail.php | 76 +++++++++++++++++++++++++++- lib/recurly/resources/tax_info.php | 8 +-- openapi/api.yaml | 36 ++++++++++--- 3 files changed, 108 insertions(+), 12 deletions(-) diff --git a/lib/recurly/resources/tax_detail.php b/lib/recurly/resources/tax_detail.php index d31c43b3..83728017 100644 --- a/lib/recurly/resources/tax_detail.php +++ b/lib/recurly/resources/tax_detail.php @@ -12,6 +12,9 @@ // phpcs:disable class TaxDetail extends RecurlyResource { + private $_billable; + private $_level; + private $_name; private $_rate; private $_region; private $_tax; @@ -21,6 +24,75 @@ class TaxDetail extends RecurlyResource ]; + /** + * Getter method for the billable attribute. + * Whether or not the line item is taxable. Only populated for a single LineItem fetch when Avalara for Communications is enabled. + * + * @return ?bool + */ + public function getBillable(): ?bool + { + return $this->_billable; + } + + /** + * Setter method for the billable attribute. + * + * @param bool $billable + * + * @return void + */ + public function setBillable(bool $billable): void + { + $this->_billable = $billable; + } + + /** + * Getter method for the level attribute. + * Provides the jurisdiction level for the Communications tax applied. Example values include city, state and federal. Present only when Avalara for Communications is enabled. + * + * @return ?string + */ + public function getLevel(): ?string + { + return $this->_level; + } + + /** + * Setter method for the level attribute. + * + * @param string $level + * + * @return void + */ + public function setLevel(string $level): void + { + $this->_level = $level; + } + + /** + * Getter method for the name attribute. + * Provides the name of the Communications tax applied. Present only when Avalara for Communications is enabled. + * + * @return ?string + */ + public function getName(): ?string + { + return $this->_name; + } + + /** + * Setter method for the name attribute. + * + * @param string $name + * + * @return void + */ + public function setName(string $name): void + { + $this->_name = $name; + } + /** * Getter method for the rate attribute. * Provides the tax rate for the region. @@ -46,7 +118,7 @@ public function setRate(float $rate): void /** * Getter method for the region attribute. - * Provides the tax region applied on an invoice. For Canadian Sales Tax, this will be either the 2 letter province code or country code. + * Provides the tax region applied on an invoice. For Canadian Sales Tax, this will be either the 2 letter province code or country code. Not present when Avalara for Communications is enabled. * * @return ?string */ @@ -92,7 +164,7 @@ public function setTax(float $tax): void /** * Getter method for the type attribute. - * Provides the tax type for the region. For Canadian Sales Tax, this will be GST, HST, QST or PST. + * Provides the tax type for the region or type of Comminications tax when Avalara for Communications is enabled. For Canadian Sales Tax, this will be GST, HST, QST or PST. * * @return ?string */ diff --git a/lib/recurly/resources/tax_info.php b/lib/recurly/resources/tax_info.php index 6ed8e000..cba8b7a0 100644 --- a/lib/recurly/resources/tax_info.php +++ b/lib/recurly/resources/tax_info.php @@ -24,7 +24,7 @@ class TaxInfo extends RecurlyResource /** * Getter method for the rate attribute. - * Rate + * The combined tax rate. Not present when Avalara for Communications is enabled. * * @return ?float */ @@ -47,7 +47,7 @@ public function setRate(float $rate): void /** * Getter method for the region attribute. - * Provides the tax region applied on an invoice. For U.S. Sales Tax, this will be the 2 letter state code. For EU VAT this will be the 2 letter country code. For all country level tax types, this will display the regional tax, like VAT, GST, or PST. + * Provides the tax region applied on an invoice. For U.S. Sales Tax, this will be the 2 letter state code. For EU VAT this will be the 2 letter country code. For all country level tax types, this will display the regional tax, like VAT, GST, or PST. Not present when Avalara for Communications is enabled. * * @return ?string */ @@ -70,7 +70,7 @@ public function setRegion(string $region): void /** * Getter method for the tax_details attribute. - * Provides additional tax details for Canadian Sales Tax when there is tax applied at both the country and province levels. This will only be populated for the Invoice response when fetching a single invoice and not for the InvoiceList or LineItem. + * Provides additional tax details for Communications taxes when Avalara for Communications is enabled or Canadian Sales Tax when there is tax applied at both the country and province levels. This will only be populated for the Invoice response when fetching a single invoice and not for the InvoiceList or LineItemList. Only populated for a single LineItem fetch when Avalara for Communications is enabled. * * @return array */ @@ -93,7 +93,7 @@ public function setTaxDetails(array $tax_details): void /** * Getter method for the type attribute. - * Provides the tax type as "vat" for EU VAT, "usst" for U.S. Sales Tax, or the 2 letter country code for country level tax types like Canada, Australia, New Zealand, Israel, and all non-EU European countries. + * Provides the tax type as "vat" for EU VAT, "usst" for U.S. Sales Tax, or the 2 letter country code for country level tax types like Canada, Australia, New Zealand, Israel, and all non-EU European countries. Not present when Avalara for Communications is enabled. * * @return ?string */ diff --git a/openapi/api.yaml b/openapi/api.yaml index a7a7a542..7a5a9afe 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -22347,23 +22347,29 @@ components: description: Provides the tax type as "vat" for EU VAT, "usst" for U.S. Sales Tax, or the 2 letter country code for country level tax types like Canada, Australia, New Zealand, Israel, and all non-EU European countries. + Not present when Avalara for Communications is enabled. region: type: string title: Region description: Provides the tax region applied on an invoice. For U.S. Sales Tax, this will be the 2 letter state code. For EU VAT this will be the 2 letter country code. For all country level tax types, this will display - the regional tax, like VAT, GST, or PST. + the regional tax, like VAT, GST, or PST. Not present when Avalara for + Communications is enabled. rate: type: number format: float title: Rate + description: The combined tax rate. Not present when Avalara for Communications + is enabled. tax_details: type: array - description: Provides additional tax details for Canadian Sales Tax when - there is tax applied at both the country and province levels. This will - only be populated for the Invoice response when fetching a single invoice - and not for the InvoiceList or LineItem. + description: Provides additional tax details for Communications taxes when + Avalara for Communications is enabled or Canadian Sales Tax when there + is tax applied at both the country and province levels. This will only + be populated for the Invoice response when fetching a single invoice and + not for the InvoiceList or LineItemList. Only populated for a single LineItem + fetch when Avalara for Communications is enabled. items: "$ref": "#/components/schemas/TaxDetail" TaxDetail: @@ -22373,13 +22379,15 @@ components: type: type: string title: Type - description: Provides the tax type for the region. For Canadian Sales Tax, + description: Provides the tax type for the region or type of Comminications + tax when Avalara for Communications is enabled. For Canadian Sales Tax, this will be GST, HST, QST or PST. region: type: string title: Region description: Provides the tax region applied on an invoice. For Canadian Sales Tax, this will be either the 2 letter province code or country code. + Not present when Avalara for Communications is enabled. rate: type: number format: float @@ -22390,6 +22398,22 @@ components: format: float title: Tax description: The total tax applied for this tax type. + name: + type: string + title: Name + description: Provides the name of the Communications tax applied. Present + only when Avalara for Communications is enabled. + level: + type: string + title: Level + description: Provides the jurisdiction level for the Communications tax + applied. Example values include city, state and federal. Present only + when Avalara for Communications is enabled. + billable: + type: boolean + title: Billable + description: Whether or not the line item is taxable. Only populated for + a single LineItem fetch when Avalara for Communications is enabled. Transaction: type: object properties: From bfc6e06dc38c04fd2493aa6b703633003dd5aa70 Mon Sep 17 00:00:00 2001 From: Recurly integrations Date: Wed, 3 May 2023 21:21:18 +0000 Subject: [PATCH 10/10] 4.34.0 [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.33.0...4.34.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#761](https://github.com/recurly/recurly-client-php/pull/761) ([recurly-integrations](https://github.com/recurly-integrations)) --- .bumpversion.cfg | 2 +- CHANGELOG.md | 11 +++++++++++ composer.json | 2 +- lib/recurly/version.php | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 839c941a..c40cd895 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 4.33.0 +current_version = 4.34.0 parse = (?P\d+) \.(?P\d+) \.(?P\d+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1c974f2..7233b212 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [4.34.0](https://github.com/recurly/recurly-client-php/tree/4.34.0) (2023-05-03) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.33.0...4.34.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 [#761](https://github.com/recurly/recurly-client-php/pull/761) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.33.0](https://github.com/recurly/recurly-client-php/tree/4.33.0) (2023-04-26) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.32.0...4.33.0) diff --git a/composer.json b/composer.json index a41bc536..1c1b68dd 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "recurly/recurly-client", - "version": "4.33.0", + "version": "4.34.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], diff --git a/lib/recurly/version.php b/lib/recurly/version.php index a655d6dd..4432ad78 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -4,5 +4,5 @@ class Version { - public const CURRENT = '4.33.0'; + public const CURRENT = '4.34.0'; }