-
Notifications
You must be signed in to change notification settings - Fork 195
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 #460 from mercadopago/feature/mapping-lists
Feature/mapping lists
- Loading branch information
Showing
65 changed files
with
1,556 additions
and
226 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
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 |
---|---|---|
|
@@ -16,4 +16,7 @@ class Address | |
|
||
/** Street number. */ | ||
public ?string $street_number; | ||
|
||
/** City. */ | ||
public ?string $city; | ||
} |
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,16 @@ | ||
<?php | ||
|
||
namespace MercadoPago\Resources\Common; | ||
|
||
/** Paging class. */ | ||
class Paging | ||
{ | ||
/** Total. */ | ||
public int $total; | ||
|
||
/** Limit. */ | ||
public int $limit; | ||
|
||
/** Offset. */ | ||
public int $offset; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
72 changes: 72 additions & 0 deletions
72
src/MercadoPago/Resources/Customer/CustomerCardListResult.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,72 @@ | ||
<?php | ||
|
||
namespace MercadoPago\Resources\Customer; | ||
|
||
use MercadoPago\Serialization\Mapper; | ||
|
||
/** CustomerCardListResult class. */ | ||
class CustomerCardListResult | ||
{ | ||
/** Class mapper. */ | ||
use mapper; | ||
|
||
/** Id of the card. */ | ||
public ?string $id; | ||
|
||
/** Id of the customer. */ | ||
public ?string $customer_id; | ||
|
||
/** Month the card expires. */ | ||
public ?int $expiration_month; | ||
|
||
/** Year the card expires. */ | ||
public ?int $expiration_year; | ||
|
||
/** First six digits of the card. */ | ||
public ?string $first_six_digits; | ||
|
||
/** Last four digits of the card. */ | ||
public ?string $last_four_digits; | ||
|
||
/** Data related to the chosen payment method. */ | ||
public array|object|null $payment_method; | ||
|
||
/** Security code of the card. */ | ||
public array|object|null $security_code; | ||
|
||
/** Card issuer. */ | ||
public array|object|null $issuer; | ||
|
||
/** Data related to the holder of the card, usually the customer. */ | ||
public array|object|null $cardholder; | ||
|
||
/** Creation date of the record. */ | ||
public ?string $date_created; | ||
|
||
/** Date the record was last updated. */ | ||
public ?string $date_last_updated; | ||
|
||
/** Id of the user. */ | ||
public ?string $user_id; | ||
|
||
/** Flag indicating if this is a record from production or test environment. */ | ||
public ?bool $live_mode; | ||
|
||
/** Card number is. */ | ||
public ?string $card_number_id; | ||
|
||
private $map = [ | ||
"payment_method" => "MercadoPago\Resources\Customer\PaymentMethod", | ||
"security_code" => "MercadoPago\Resources\Customer\SecurityCode", | ||
"issuer" => "MercadoPago\Resources\Customer\Issuer", | ||
"cardholder" => "MercadoPago\Resources\Customer\Cardholder", | ||
]; | ||
|
||
/** | ||
* Method responsible for getting map of entities. | ||
*/ | ||
public function getMap(): array | ||
{ | ||
return $this->map; | ||
} | ||
} |
86 changes: 86 additions & 0 deletions
86
src/MercadoPago/Resources/Customer/CustomerSearchResult.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,86 @@ | ||
<?php | ||
|
||
namespace MercadoPago\Resources\Customer; | ||
|
||
use MercadoPago\Serialization\Mapper; | ||
|
||
/** Customer class. */ | ||
class CustomerSearchResult | ||
{ | ||
/** Class mapper. */ | ||
use mapper; | ||
|
||
/** Id of the customer. */ | ||
public ?string $id; | ||
|
||
/** Email of the customer. */ | ||
public ?string $email; | ||
|
||
/** First name of the customer. */ | ||
public ?string $first_name; | ||
|
||
/** Last name of the customer. */ | ||
public ?string $last_name; | ||
|
||
/** Date registered. */ | ||
public ?string $date_registered; | ||
|
||
/** Description. */ | ||
public ?string $description; | ||
|
||
/** Date created. */ | ||
public ?string $date_created; | ||
|
||
/** Date Last_updated. */ | ||
public ?string $date_last_updated; | ||
|
||
/** Default card. */ | ||
public ?string $default_card; | ||
|
||
/** Default address. */ | ||
public ?string $default_address; | ||
|
||
/** Flag indicating if this is a record from production or test environment. */ | ||
public ?bool $live_mode; | ||
|
||
/** Id of the user. */ | ||
public ?int $user_id; | ||
|
||
/** Id of the merchant. */ | ||
public ?int $merchant_id; | ||
|
||
/** Id of the client. */ | ||
public ?int $client_id; | ||
|
||
/** Status of the customer. */ | ||
public ?string $status; | ||
|
||
/** List cards of the customer. */ | ||
public array $cards; | ||
|
||
/** List addresses of the customer. */ | ||
public array $addresses; | ||
|
||
/** Phone of the customer. */ | ||
public array|object|null $phone; | ||
|
||
/** Identification of the customer. */ | ||
public array|object|null $identification; | ||
|
||
/** Address of the customer. */ | ||
public array|object|null $address; | ||
|
||
private $map = [ | ||
"phone" => "MercadoPago\Resources\Common\Phone", | ||
"identification" => "MercadoPago\Resources\Common\Identification", | ||
"address" => "MercadoPago\Resources\Common\Address", | ||
]; | ||
|
||
/** | ||
* Method responsible for getting map of entities. | ||
*/ | ||
public function getMap(): array | ||
{ | ||
return $this->map; | ||
} | ||
} |
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
22 changes: 22 additions & 0 deletions
22
src/MercadoPago/Resources/IdentificationType/IdentificationTypeListResult.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,22 @@ | ||
<?php | ||
|
||
namespace MercadoPago\Resources\IdentificationType; | ||
|
||
/** IdentificationTypeListResult class. */ | ||
class IdentificationTypeListResult | ||
{ | ||
/** Identification type ID. */ | ||
public ?string $id; | ||
|
||
/** Identification type name. */ | ||
public ?string $name; | ||
|
||
/** Identification type type. */ | ||
public ?string $type; | ||
|
||
/** Identification type min length. */ | ||
public ?int $min_length; | ||
|
||
/** Identification type max length. */ | ||
public ?int $max_length; | ||
} |
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
Oops, something went wrong.