-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from square/release/38.2.0.20241017
Generated PR for Release: 38.2.0.20241017
- Loading branch information
Showing
20 changed files
with
720 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
# Destination Details Cash Refund Details | ||
|
||
Stores details about a cash refund. Contains only non-confidential information. | ||
|
||
## Structure | ||
|
||
`DestinationDetailsCashRefundDetails` | ||
|
||
## Fields | ||
|
||
| Name | Type | Tags | Description | Getter | Setter | | ||
| --- | --- | --- | --- | --- | --- | | ||
| `sellerSuppliedMoney` | [`Money`](../../doc/models/money.md) | Required | 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. | getSellerSuppliedMoney(): Money | setSellerSuppliedMoney(Money sellerSuppliedMoney): void | | ||
| `changeBackMoney` | [`?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. | getChangeBackMoney(): ?Money | setChangeBackMoney(?Money changeBackMoney): void | | ||
|
||
## Example (as JSON) | ||
|
||
```json | ||
{ | ||
"seller_supplied_money": { | ||
"amount": 36, | ||
"currency": "AZN" | ||
}, | ||
"change_back_money": { | ||
"amount": 78, | ||
"currency": "DJF" | ||
} | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
# Destination Details External Refund Details | ||
|
||
Stores details about an external refund. Contains only non-confidential information. | ||
|
||
## Structure | ||
|
||
`DestinationDetailsExternalRefundDetails` | ||
|
||
## Fields | ||
|
||
| Name | Type | Tags | Description | Getter | Setter | | ||
| --- | --- | --- | --- | --- | --- | | ||
| `type` | `string` | Required | The type of external refund the seller paid to the buyer. It can be one of the<br>following:<br><br>- CHECK - Refunded using a physical check.<br>- BANK_TRANSFER - Refunded using external bank transfer.<br>- OTHER\_GIFT\_CARD - Refunded using a non-Square gift card.<br>- CRYPTO - Refunded using a crypto currency.<br>- SQUARE_CASH - Refunded using Square Cash App.<br>- SOCIAL - Refunded using peer-to-peer payment applications.<br>- EXTERNAL - A third-party application gathered this refund outside of Square.<br>- EMONEY - Refunded using an E-money provider.<br>- CARD - A credit or debit card that Square does not support.<br>- STORED_BALANCE - Use for house accounts, store credit, and so forth.<br>- FOOD_VOUCHER - Restaurant voucher provided by employers to employees to pay for meals<br>- OTHER - A type not listed here.<br>**Constraints**: *Maximum Length*: `50` | getType(): string | setType(string type): void | | ||
| `source` | `string` | Required | A description of the external refund source. For example,<br>"Food Delivery Service".<br>**Constraints**: *Maximum Length*: `255` | getSource(): string | setSource(string source): void | | ||
| `sourceId` | `?string` | Optional | An ID to associate the refund to its originating source.<br>**Constraints**: *Maximum Length*: `255` | getSourceId(): ?string | setSourceId(?string sourceId): void | | ||
|
||
## Example (as JSON) | ||
|
||
```json | ||
{ | ||
"type": "type4", | ||
"source": "source2", | ||
"source_id": "source_id0" | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
src/Models/Builders/DestinationDetailsCashRefundDetailsBuilder.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Square\Models\Builders; | ||
|
||
use Core\Utils\CoreHelper; | ||
use Square\Models\DestinationDetailsCashRefundDetails; | ||
use Square\Models\Money; | ||
|
||
/** | ||
* Builder for model DestinationDetailsCashRefundDetails | ||
* | ||
* @see DestinationDetailsCashRefundDetails | ||
*/ | ||
class DestinationDetailsCashRefundDetailsBuilder | ||
{ | ||
/** | ||
* @var DestinationDetailsCashRefundDetails | ||
*/ | ||
private $instance; | ||
|
||
private function __construct(DestinationDetailsCashRefundDetails $instance) | ||
{ | ||
$this->instance = $instance; | ||
} | ||
|
||
/** | ||
* Initializes a new destination details cash refund details Builder object. | ||
*/ | ||
public static function init(Money $sellerSuppliedMoney): self | ||
{ | ||
return new self(new DestinationDetailsCashRefundDetails($sellerSuppliedMoney)); | ||
} | ||
|
||
/** | ||
* Sets change back money field. | ||
*/ | ||
public function changeBackMoney(?Money $value): self | ||
{ | ||
$this->instance->setChangeBackMoney($value); | ||
return $this; | ||
} | ||
|
||
/** | ||
* Initializes a new destination details cash refund details object. | ||
*/ | ||
public function build(): DestinationDetailsCashRefundDetails | ||
{ | ||
return CoreHelper::clone($this->instance); | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
src/Models/Builders/DestinationDetailsExternalRefundDetailsBuilder.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Square\Models\Builders; | ||
|
||
use Core\Utils\CoreHelper; | ||
use Square\Models\DestinationDetailsExternalRefundDetails; | ||
|
||
/** | ||
* Builder for model DestinationDetailsExternalRefundDetails | ||
* | ||
* @see DestinationDetailsExternalRefundDetails | ||
*/ | ||
class DestinationDetailsExternalRefundDetailsBuilder | ||
{ | ||
/** | ||
* @var DestinationDetailsExternalRefundDetails | ||
*/ | ||
private $instance; | ||
|
||
private function __construct(DestinationDetailsExternalRefundDetails $instance) | ||
{ | ||
$this->instance = $instance; | ||
} | ||
|
||
/** | ||
* Initializes a new destination details external refund details Builder object. | ||
*/ | ||
public static function init(string $type, string $source): self | ||
{ | ||
return new self(new DestinationDetailsExternalRefundDetails($type, $source)); | ||
} | ||
|
||
/** | ||
* Sets source id field. | ||
*/ | ||
public function sourceId(?string $value): self | ||
{ | ||
$this->instance->setSourceId($value); | ||
return $this; | ||
} | ||
|
||
/** | ||
* Unsets source id field. | ||
*/ | ||
public function unsetSourceId(): self | ||
{ | ||
$this->instance->unsetSourceId(); | ||
return $this; | ||
} | ||
|
||
/** | ||
* Initializes a new destination details external refund details object. | ||
*/ | ||
public function build(): DestinationDetailsExternalRefundDetails | ||
{ | ||
return CoreHelper::clone($this->instance); | ||
} | ||
} |
Oops, something went wrong.