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

Include sub_merchant #523

Merged
merged 6 commits into from
Jul 3, 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
51 changes: 51 additions & 0 deletions src/MercadoPago/Resources/Common/SubMerchant.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

namespace MercadoPago\Resources\Common;

/** Submerchant identification class. */
class SubMerchant
{
/** Submerchant code. */
public ?string $sub_merchant_id;

/** Submerchant MCC according to Abecs decision and/or primary CNAE. */
public ?string $mcc;

/** Country where the submerchant is located. */
public ?string $country;

/** Street number where the submerchant is located. */
public ?number $address_door_number;

/** CEP of the submerchant. */
public ?string $zip;

/** CPF or CNPJ identification of the submerchant. */
public ?string $document_number;

/** City where the submerchant is located. */
public ?string $city;

/** Street where the submerchant is located. */
public ?string $address_street;

/** Name of the submerchant . */
public ?string $business_name;

/** State where the submerchant is located . */
public ?string $region_code_iso;

/** Postal code of the submerchant . */
public ?string $region_code;

/** CPF or CNPJ number of the submerchant . */
public ?string $document_type;

/** Phone number of the submerchant . */
public ?string $phone;

/** Payment Facilitator URL . */
public ?string $url;


}
4 changes: 4 additions & 0 deletions src/MercadoPago/Resources/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ class Payment extends MPResource
/** Payer. */
public array|object|null $payer;

/** ForwardData. */
public array|object|null $forward_data;

/** Collector ID. */
public ?int $collector_id;

Expand Down Expand Up @@ -222,6 +225,7 @@ class Payment extends MPResource
public array|object|null $three_ds_info;

private $map = [
"forward_data" => "MercadoPago\Resources\Payment\ForwardData",
"payer" => "MercadoPago\Resources\Payment\Payer",
"fee_details" => "MercadoPago\Resources\Payment\FeeDetails",
"additional_info" => "MercadoPago\Resources\Payment\AdditionalInfo",
Expand Down
27 changes: 27 additions & 0 deletions src/MercadoPago/Resources/Payment/ForwardData.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace MercadoPago\Resources\Payment;

use MercadoPago\Serialization\Mapper;

/** ForwardData class. */
class ForwardData
{
/** Class mapper. */
use Mapper;

public array|object|null $sub_merchant;


private $map = [
"identification" => "MercadoPago\Resources\Common\SubMerchant",
];

/**
* Method responsible for getting map of entities.
*/
public function getMap(): array
{
return $this->map;
}
}
Loading