Skip to content

Commit

Permalink
improve: new fields on creditcard and googlepay
Browse files Browse the repository at this point in the history
improve: new fields on creditcard and googlepay
  • Loading branch information
fabiano-mallmann authored Nov 12, 2024
2 parents 58a88ec + 1a4dc01 commit 908b59f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
13 changes: 12 additions & 1 deletion src/Models/CreateCreditCardPaymentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ class CreateCreditCardPaymentRequest implements JsonSerializable
*/
public $recurrenceCycle;

/**
* Defines whether the card has been used one or more times.
* @maps payment_origin
* @var string|null $paymentOrigin public property
*/
public $paymentOrigin;

/**
* Constructor to set initial or default values of member properties
* @param integer $installments Initialization value for $this->installments
Expand All @@ -145,11 +152,13 @@ class CreateCreditCardPaymentRequest implements JsonSerializable
* >recurrencyCycle
* @param string $recurrenceCycle Initialization value for $this-
* >recurrenceCycle
* @param string $paymentOrigin Initialization value for $this-
* >paymentOrigin
*/
public function __construct()
{
switch (func_num_args()) {
case 16:
case 17:
$this->installments = func_get_arg(0);
$this->statementDescriptor = func_get_arg(1);
$this->card = func_get_arg(2);
Expand All @@ -166,6 +175,7 @@ public function __construct()
$this->operationType = func_get_arg(13);
$this->recurrencyCycle = func_get_arg(14);
$this->recurrenceCycle = func_get_arg(15);
$this->paymentOrigin = func_get_arg(16);
break;

default:
Expand Down Expand Up @@ -198,6 +208,7 @@ public function jsonSerialize()
$json['operation_type'] = $this->operationType;
$json['recurrency_cycle'] = $this->recurrencyCycle;
$json['recurrence_cycle'] = $this->recurrenceCycle;
$json['payment_origin'] = $this->paymentOrigin;

return $json;
}
Expand Down
11 changes: 10 additions & 1 deletion src/Models/CreateGooglePayPaymentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,25 @@ class CreateGooglePayPaymentRequest implements JsonSerializable
* @var string $payload public property
*/
public $payload;

/**
* @required
* @var string $card public property
*/
public $card;

/**
* Constructor to set initial or default values of member properties
* @param string $statementDescriptor Initialization value for $this->statementDescriptor
* @param Object $payload Initialization value for $this->payload
* @param Object $card Initialization value for $this->card
*/
public function __construct()
{
if (2 == func_num_args()) {
if (3 == func_num_args()) {
$this->statementDescriptor = func_get_arg(0);
$this->payload = func_get_arg(1);
$this->card = func_get_arg(2);
}
}

Expand All @@ -45,6 +53,7 @@ public function jsonSerialize()
$json = array();
$json['statement_descriptor'] = $this->statementDescriptor;
$json['payload'] = $this->payload;
$json['card'] = $this->card;
return $json;
}
}

0 comments on commit 908b59f

Please sign in to comment.