Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated PR for Release: 34.0.1.20240118 #129

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "square/square",
"description": "Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.",
"version": "34.0.0.20240118",
"version": "34.0.1.20240118",
"type": "library",
"keywords": [
"Square",
Expand Down
1 change: 0 additions & 1 deletion doc/models/fulfillment.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ However, orders returned by the Orders API might contain multiple fulfillments b
| `pickupDetails` | [`?FulfillmentPickupDetails`](../../doc/models/fulfillment-pickup-details.md) | Optional | Contains details necessary to fulfill a pickup order. | getPickupDetails(): ?FulfillmentPickupDetails | setPickupDetails(?FulfillmentPickupDetails pickupDetails): void |
| `shipmentDetails` | [`?FulfillmentShipmentDetails`](../../doc/models/fulfillment-shipment-details.md) | Optional | Contains the details necessary to fulfill a shipment order. | getShipmentDetails(): ?FulfillmentShipmentDetails | setShipmentDetails(?FulfillmentShipmentDetails shipmentDetails): void |
| `deliveryDetails` | [`?FulfillmentDeliveryDetails`](../../doc/models/fulfillment-delivery-details.md) | Optional | Describes delivery details of an order fulfillment. | getDeliveryDetails(): ?FulfillmentDeliveryDetails | setDeliveryDetails(?FulfillmentDeliveryDetails deliveryDetails): void |
| `version` | `?int` | Optional | The version number attributed to the fulfillment and incremented every time there is a<br>fulfillment-related update. The fulfillment version is an internal field only for use<br>between Orders and the Fulfillment service. | getVersion(): ?int | setVersion(?int version): void |

## Example (as JSON)

Expand Down
2 changes: 0 additions & 2 deletions doc/models/order-return-service-charge.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ Represents the service charge applied to the original order.
| `appliedTaxes` | [`?(OrderLineItemAppliedTax[])`](../../doc/models/order-line-item-applied-tax.md) | Optional | The list of references to `OrderReturnTax` entities applied to the<br>`OrderReturnServiceCharge`. Each `OrderLineItemAppliedTax` has a `tax_uid`<br>that references the `uid` of a top-level `OrderReturnTax` that is being<br>applied to the `OrderReturnServiceCharge`. On reads, the applied amount is<br>populated. | getAppliedTaxes(): ?array | setAppliedTaxes(?array appliedTaxes): void |
| `treatmentType` | [`?string(OrderServiceChargeTreatmentType)`](../../doc/models/order-service-charge-treatment-type.md) | Optional | Indicates whether the service charge will be treated as a value-holding line item or<br>apportioned toward a line item. | getTreatmentType(): ?string | setTreatmentType(?string treatmentType): void |
| `scope` | [`?string(OrderServiceChargeScope)`](../../doc/models/order-service-charge-scope.md) | Optional | Indicates whether this is a line-item or order-level apportioned<br>service charge. | getScope(): ?string | setScope(?string scope): void |
| `appliedServiceCharges` | [`?(OrderLineItemAppliedServiceCharge[])`](../../doc/models/order-line-item-applied-service-charge.md) | Optional | The list of references to service charges applied to the`OrderReturnServiceCharge`. Each<br>`OrderLineItemAppliedServiceCharge` has a `service_charge_id` that references the `uid` of a<br>top-level `OrderReturnServiceCharge`. On reads, the amount applied is populated. | getAppliedServiceCharges(): ?array | setAppliedServiceCharges(?array appliedServiceCharges): void |
| `totalServiceChargeMoney` | [`?Money`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.<br>Fields that do not explicitly define whether they are signed or unsigned are<br>considered unsigned and can only hold positive amounts. For signed fields, the<br>sign of the value indicates the purpose of the money transfer. See<br>[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)<br>for more information. | getTotalServiceChargeMoney(): ?Money | setTotalServiceChargeMoney(?Money totalServiceChargeMoney): void |

## Example (as JSON)

Expand Down
2 changes: 0 additions & 2 deletions doc/models/order-service-charge.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ Represents a service charge applied to an order.
| `type` | [`?string(OrderServiceChargeType)`](../../doc/models/order-service-charge-type.md) | Optional | - | getType(): ?string | setType(?string type): void |
| `treatmentType` | [`?string(OrderServiceChargeTreatmentType)`](../../doc/models/order-service-charge-treatment-type.md) | Optional | Indicates whether the service charge will be treated as a value-holding line item or<br>apportioned toward a line item. | getTreatmentType(): ?string | setTreatmentType(?string treatmentType): void |
| `scope` | [`?string(OrderServiceChargeScope)`](../../doc/models/order-service-charge-scope.md) | Optional | Indicates whether this is a line-item or order-level apportioned<br>service charge. | getScope(): ?string | setScope(?string scope): void |
| `appliedServiceCharges` | [`?(OrderLineItemAppliedServiceCharge[])`](../../doc/models/order-line-item-applied-service-charge.md) | Optional | The list of references to service charges applied to this service charge. Each<br>`OrderLineItemAppliedServiceCharge` has a `service_charge_id` that references the `uid` of a<br>top-level `OrderServiceCharge`. On reads, the amount applied is populated.<br><br>To change the amount of a service charge, modify the referenced top-level service charge. | getAppliedServiceCharges(): ?array | setAppliedServiceCharges(?array appliedServiceCharges): void |
| `totalServiceChargeMoney` | [`?Money`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.<br>Fields that do not explicitly define whether they are signed or unsigned are<br>considered unsigned and can only hold positive amounts. For signed fields, the<br>sign of the value indicates the purpose of the money transfer. See<br>[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)<br>for more information. | getTotalServiceChargeMoney(): ?Money | setTotalServiceChargeMoney(?Money totalServiceChargeMoney): void |

## Example (as JSON)

Expand Down
3 changes: 2 additions & 1 deletion src/Exceptions/ApiException.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ class ApiException extends \Exception implements ExceptionInterface
/**
* @param string $reason the reason for raising an exception
* @param HttpRequest $request
* @param HttpResponse|null $response
*/
public function __construct(string $reason, HttpRequest $request, ?HttpResponse $response = null)
public function __construct(string $reason, HttpRequest $request, ?HttpResponse $response)
{
parent::__construct($reason, \is_null($response) ? 0 : $response->getStatusCode());
$this->request = $request;
Expand Down
9 changes: 0 additions & 9 deletions src/Models/Builders/FulfillmentBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,6 @@ public function deliveryDetails(?FulfillmentDeliveryDetails $value): self
return $this;
}

/**
* Sets version field.
*/
public function version(?int $value): self
{
$this->instance->setVersion($value);
return $this;
}

/**
* Initializes a new fulfillment object.
*/
Expand Down
27 changes: 0 additions & 27 deletions src/Models/Builders/OrderReturnServiceChargeBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,33 +240,6 @@ public function scope(?string $value): self
return $this;
}

/**
* Sets applied service charges field.
*/
public function appliedServiceCharges(?array $value): self
{
$this->instance->setAppliedServiceCharges($value);
return $this;
}

/**
* Unsets applied service charges field.
*/
public function unsetAppliedServiceCharges(): self
{
$this->instance->unsetAppliedServiceCharges();
return $this;
}

/**
* Sets total service charge money field.
*/
public function totalServiceChargeMoney(?Money $value): self
{
$this->instance->setTotalServiceChargeMoney($value);
return $this;
}

/**
* Initializes a new order return service charge object.
*/
Expand Down
27 changes: 0 additions & 27 deletions src/Models/Builders/OrderServiceChargeBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,33 +249,6 @@ public function scope(?string $value): self
return $this;
}

/**
* Sets applied service charges field.
*/
public function appliedServiceCharges(?array $value): self
{
$this->instance->setAppliedServiceCharges($value);
return $this;
}

/**
* Unsets applied service charges field.
*/
public function unsetAppliedServiceCharges(): self
{
$this->instance->unsetAppliedServiceCharges();
return $this;
}

/**
* Sets total service charge money field.
*/
public function totalServiceChargeMoney(?Money $value): self
{
$this->instance->setTotalServiceChargeMoney($value);
return $this;
}

/**
* Initializes a new order service charge object.
*/
Expand Down
32 changes: 0 additions & 32 deletions src/Models/Fulfillment.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ class Fulfillment implements \JsonSerializable
*/
private $deliveryDetails;

/**
* @var int|null
*/
private $version;

/**
* Returns Uid.
* A unique ID that identifies the fulfillment only within this order.
Expand Down Expand Up @@ -349,30 +344,6 @@ public function setDeliveryDetails(?FulfillmentDeliveryDetails $deliveryDetails)
$this->deliveryDetails = $deliveryDetails;
}

/**
* Returns Version.
* The version number attributed to the fulfillment and incremented every time there is a
* fulfillment-related update. The fulfillment version is an internal field only for use
* between Orders and the Fulfillment service.
*/
public function getVersion(): ?int
{
return $this->version;
}

/**
* Sets Version.
* The version number attributed to the fulfillment and incremented every time there is a
* fulfillment-related update. The fulfillment version is an internal field only for use
* between Orders and the Fulfillment service.
*
* @maps version
*/
public function setVersion(?int $version): void
{
$this->version = $version;
}

/**
* Encode this object to JSON
*
Expand Down Expand Up @@ -412,9 +383,6 @@ public function jsonSerialize(bool $asArrayWhenEmpty = false)
if (isset($this->deliveryDetails)) {
$json['delivery_details'] = $this->deliveryDetails;
}
if (isset($this->version)) {
$json['version'] = $this->version;
}
$json = array_filter($json, function ($val) {
return $val !== null;
});
Expand Down
120 changes: 15 additions & 105 deletions src/Models/OrderReturnServiceCharge.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,6 @@ class OrderReturnServiceCharge implements \JsonSerializable
*/
private $scope;

/**
* @var array
*/
private $appliedServiceCharges = [];

/**
* @var Money|null
*/
private $totalServiceChargeMoney;

/**
* Returns Uid.
* A unique ID that identifies the return service charge only within this order.
Expand Down Expand Up @@ -589,80 +579,6 @@ public function setScope(?string $scope): void
$this->scope = $scope;
}

/**
* Returns Applied Service Charges.
* The list of references to service charges applied to the`OrderReturnServiceCharge`. Each
* `OrderLineItemAppliedServiceCharge` has a `service_charge_id` that references the `uid` of a
* top-level `OrderReturnServiceCharge`. On reads, the amount applied is populated.
*
* @return OrderLineItemAppliedServiceCharge[]|null
*/
public function getAppliedServiceCharges(): ?array
{
if (count($this->appliedServiceCharges) == 0) {
return null;
}
return $this->appliedServiceCharges['value'];
}

/**
* Sets Applied Service Charges.
* The list of references to service charges applied to the`OrderReturnServiceCharge`. Each
* `OrderLineItemAppliedServiceCharge` has a `service_charge_id` that references the `uid` of a
* top-level `OrderReturnServiceCharge`. On reads, the amount applied is populated.
*
* @maps applied_service_charges
*
* @param OrderLineItemAppliedServiceCharge[]|null $appliedServiceCharges
*/
public function setAppliedServiceCharges(?array $appliedServiceCharges): void
{
$this->appliedServiceCharges['value'] = $appliedServiceCharges;
}

/**
* Unsets Applied Service Charges.
* The list of references to service charges applied to the`OrderReturnServiceCharge`. Each
* `OrderLineItemAppliedServiceCharge` has a `service_charge_id` that references the `uid` of a
* top-level `OrderReturnServiceCharge`. On reads, the amount applied is populated.
*/
public function unsetAppliedServiceCharges(): void
{
$this->appliedServiceCharges = [];
}

/**
* Returns Total Service Charge Money.
* Represents an amount of money. `Money` fields can be signed or unsigned.
* Fields that do not explicitly define whether they are signed or unsigned are
* considered unsigned and can only hold positive amounts. For signed fields, the
* sign of the value indicates the purpose of the money transfer. See
* [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-
* monetary-amounts)
* for more information.
*/
public function getTotalServiceChargeMoney(): ?Money
{
return $this->totalServiceChargeMoney;
}

/**
* Sets Total Service Charge Money.
* Represents an amount of money. `Money` fields can be signed or unsigned.
* Fields that do not explicitly define whether they are signed or unsigned are
* considered unsigned and can only hold positive amounts. For signed fields, the
* sign of the value indicates the purpose of the money transfer. See
* [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-
* monetary-amounts)
* for more information.
*
* @maps total_service_charge_money
*/
public function setTotalServiceChargeMoney(?Money $totalServiceChargeMoney): void
{
$this->totalServiceChargeMoney = $totalServiceChargeMoney;
}

/**
* Encode this object to JSON
*
Expand All @@ -676,55 +592,49 @@ public function jsonSerialize(bool $asArrayWhenEmpty = false)
{
$json = [];
if (!empty($this->uid)) {
$json['uid'] = $this->uid['value'];
$json['uid'] = $this->uid['value'];
}
if (!empty($this->sourceServiceChargeUid)) {
$json['source_service_charge_uid'] = $this->sourceServiceChargeUid['value'];
$json['source_service_charge_uid'] = $this->sourceServiceChargeUid['value'];
}
if (!empty($this->name)) {
$json['name'] = $this->name['value'];
$json['name'] = $this->name['value'];
}
if (!empty($this->catalogObjectId)) {
$json['catalog_object_id'] = $this->catalogObjectId['value'];
$json['catalog_object_id'] = $this->catalogObjectId['value'];
}
if (!empty($this->catalogVersion)) {
$json['catalog_version'] = $this->catalogVersion['value'];
$json['catalog_version'] = $this->catalogVersion['value'];
}
if (!empty($this->percentage)) {
$json['percentage'] = $this->percentage['value'];
$json['percentage'] = $this->percentage['value'];
}
if (isset($this->amountMoney)) {
$json['amount_money'] = $this->amountMoney;
$json['amount_money'] = $this->amountMoney;
}
if (isset($this->appliedMoney)) {
$json['applied_money'] = $this->appliedMoney;
$json['applied_money'] = $this->appliedMoney;
}
if (isset($this->totalMoney)) {
$json['total_money'] = $this->totalMoney;
$json['total_money'] = $this->totalMoney;
}
if (isset($this->totalTaxMoney)) {
$json['total_tax_money'] = $this->totalTaxMoney;
$json['total_tax_money'] = $this->totalTaxMoney;
}
if (isset($this->calculationPhase)) {
$json['calculation_phase'] = $this->calculationPhase;
$json['calculation_phase'] = $this->calculationPhase;
}
if (!empty($this->taxable)) {
$json['taxable'] = $this->taxable['value'];
$json['taxable'] = $this->taxable['value'];
}
if (!empty($this->appliedTaxes)) {
$json['applied_taxes'] = $this->appliedTaxes['value'];
$json['applied_taxes'] = $this->appliedTaxes['value'];
}
if (isset($this->treatmentType)) {
$json['treatment_type'] = $this->treatmentType;
$json['treatment_type'] = $this->treatmentType;
}
if (isset($this->scope)) {
$json['scope'] = $this->scope;
}
if (!empty($this->appliedServiceCharges)) {
$json['applied_service_charges'] = $this->appliedServiceCharges['value'];
}
if (isset($this->totalServiceChargeMoney)) {
$json['total_service_charge_money'] = $this->totalServiceChargeMoney;
$json['scope'] = $this->scope;
}
$json = array_filter($json, function ($val) {
return $val !== null;
Expand Down
Loading
Loading