Skip to content

Commit

Permalink
Rename OrderBuilder.php to PaymentPreferenceBuilder.php. (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
marianogoldman authored Oct 11, 2020
1 parent 5bfaac2 commit 70156f6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
44 changes: 22 additions & 22 deletions src/OrderBuilder.php → src/PaymentPreferenceBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Carbon\Carbon;

class OrderBuilder
class PaymentPreferenceBuilder
{
const MP_DATE_TIME_FORMAT = 'Y-m-d\TH:i:s.000P';

Expand All @@ -31,105 +31,105 @@ public function __construct()

/**
* @param string $externalId
* @return OrderBuilder
* @return PaymentPreferenceBuilder
*/
public function externalId(string $externalId): OrderBuilder
public function externalId(string $externalId): PaymentPreferenceBuilder
{
$this->externalId = $externalId;
return $this;
}

public function currency(string $currency): OrderBuilder
public function currency(string $currency): PaymentPreferenceBuilder
{
$this->currency = $currency;
return $this;
}

/**
* @param int $amount
* @return OrderBuilder
* @return PaymentPreferenceBuilder
*/
public function amount(int $amount): OrderBuilder
public function amount(int $amount): PaymentPreferenceBuilder
{
$this->amount = $amount;
return $this;
}

/**
* @param string $description
* @return OrderBuilder
* @return PaymentPreferenceBuilder
*/
public function description(string $description): OrderBuilder
public function description(string $description): PaymentPreferenceBuilder
{
$this->description = $description;
return $this;
}

/**
* @param string $payerFirstName
* @return OrderBuilder
* @return PaymentPreferenceBuilder
*/
public function payerFirstName(string $payerFirstName): OrderBuilder
public function payerFirstName(string $payerFirstName): PaymentPreferenceBuilder
{
$this->payerFirstName = $payerFirstName;
return $this;
}

/**
* @param string $payerLastName
* @return OrderBuilder
* @return PaymentPreferenceBuilder
*/
public function payerLastName(string $payerLastName): OrderBuilder
public function payerLastName(string $payerLastName): PaymentPreferenceBuilder
{
$this->payerLastName = $payerLastName;
return $this;
}

/**
* @param string $payerEmail
* @return OrderBuilder
* @return PaymentPreferenceBuilder
*/
public function payerEmail(string $payerEmail): OrderBuilder
public function payerEmail(string $payerEmail): PaymentPreferenceBuilder
{
$this->payerEmail = $payerEmail;
return $this;
}

/**
* @param array $excludedPaymentMethods
* @return OrderBuilder
* @return PaymentPreferenceBuilder
*/
public function excludedPaymentMethods(array $excludedPaymentMethods): OrderBuilder
public function excludedPaymentMethods(array $excludedPaymentMethods): PaymentPreferenceBuilder
{
$this->excludedPaymentMethods = $excludedPaymentMethods;
return $this;
}

/**
* @param string $returnUrl
* @return OrderBuilder
* @return PaymentPreferenceBuilder
*/
public function returnUrl(string $returnUrl): OrderBuilder
public function returnUrl(string $returnUrl): PaymentPreferenceBuilder
{
$this->returnUrl = $returnUrl;
return $this;
}

/**
* @param string $notificationUrl
* @return OrderBuilder
* @return PaymentPreferenceBuilder
*/
public function notificationUrl(string $notificationUrl): OrderBuilder
public function notificationUrl(string $notificationUrl): PaymentPreferenceBuilder
{
$this->notificationUrl = $notificationUrl;
return $this;
}

/**
* @param bool $binaryMode
* @return OrderBuilder
* @return PaymentPreferenceBuilder
*/
public function binaryMode(bool $binaryMode): OrderBuilder
public function binaryMode(bool $binaryMode): PaymentPreferenceBuilder
{
$this->binaryMode = $binaryMode;
return $this;
Expand Down
4 changes: 2 additions & 2 deletions tests/MercadoPagoApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Illuminate\Http\Client\RequestException;
use Illuminate\Support\Facades\Log;
use Puntodev\Payments\MercadoPagoApi;
use Puntodev\Payments\OrderBuilder;
use Puntodev\Payments\PaymentPreferenceBuilder;

class MercadoPagoApiTest extends TestCase
{
Expand Down Expand Up @@ -38,7 +38,7 @@ protected function getEnvironmentSetUp($app)
*/
public function testCreateOrder()
{
$order = (new OrderBuilder())
$order = (new PaymentPreferenceBuilder())
->description('My custom product')
->amount(23)
->currency('ARS')
Expand Down

0 comments on commit 70156f6

Please sign in to comment.