Skip to content

Commit

Permalink
Codegen for openapi v161
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym-stripe committed Jun 30, 2022
1 parent 55a8c0f commit f54036d
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 62 deletions.
1 change: 1 addition & 0 deletions lib/Treasury/OutboundTransfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* @property null|string $hosted_regulatory_receipt_url A <a href="https://stripe.com/docs/treasury/moving-money/regulatory-receipts">hosted transaction receipt</a> URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property null|\Stripe\StripeObject $network_details Details about the network used for the OutboundTransfer.
* @property null|\Stripe\StripeObject $returned_details Details about a returned OutboundTransfer. Only set when the status is <code>returned</code>.
* @property string $statement_descriptor Information about the OutboundTransfer to be sent to the recipient account.
* @property string $status Current status of the OutboundTransfer: <code>processing</code>, <code>failed</code>, <code>canceled</code>, <code>posted</code>, <code>returned</code>. An OutboundTransfer is <code>processing</code> if it has been created and is pending. The status changes to <code>posted</code> once the OutboundTransfer has been &quot;confirmed&quot; and funds have left the account, or to <code>failed</code> or <code>canceled</code>. If an OutboundTransfer fails to arrive at its destination, its status will change to <code>returned</code>.
Expand Down
1 change: 1 addition & 0 deletions lib/Treasury/ReceivedCredit.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* @property \Stripe\StripeObject $linked_flows
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property string $network The rails used to send the funds.
* @property null|\Stripe\StripeObject $network_details Details specific to the money movement rails.
* @property null|\Stripe\StripeObject $reversal_details Details describing when a ReceivedCredit may be reversed.
* @property string $status Status of the ReceivedCredit. ReceivedCredits are created either <code>succeeded</code> (approved) or <code>failed</code> (declined). If a ReceivedCredit is declined, the failure reason can be found in the <code>failure_code</code> field.
* @property null|string|\Stripe\Treasury\Transaction $transaction The Transaction associated with this object.
Expand Down
1 change: 1 addition & 0 deletions lib/Treasury/ReceivedDebit.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* @property \Stripe\StripeObject $linked_flows
* @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
* @property string $network The network used for the ReceivedDebit.
* @property null|\Stripe\StripeObject $network_details Details specific to the money movement rails.
* @property null|\Stripe\StripeObject $reversal_details Details describing when a ReceivedDebit might be reversed.
* @property string $status Status of the ReceivedDebit. ReceivedDebits are created with a status of either <code>succeeded</code> (approved) or <code>failed</code> (declined). The failure reason can be found under the <code>failure_code</code>.
* @property null|string|\Stripe\Treasury\Transaction $transaction The Transaction associated with this object.
Expand Down
124 changes: 62 additions & 62 deletions tests/Stripe/GeneratedExamplesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,16 @@ public function testListLineItemsPaymentLink()
static::assertInstanceOf(\Stripe\LineItem::class, $result->data[0]);
}

public function testListSetupAttempt()
{
$this->expectsRequest('get', '/v1/setup_attempts');
$result = $this->client->setupAttempts->all(
['limit' => 3, 'setup_intent' => 'si_xyz']
);
static::assertInstanceOf(\Stripe\Collection::class, $result);
static::assertInstanceOf(\Stripe\SetupAttempt::class, $result->data[0]);
}

public function testVerifyMicrodepositsSetupIntent()
{
$this->expectsRequest(
Expand Down Expand Up @@ -399,6 +409,58 @@ public function testFundCashBalanceCustomer()
static::assertInstanceOf(\Stripe\CustomerBalanceTransaction::class, $result);
}

public function testDeliverCardCard()
{
$this->expectsRequest(
'post',
'/v1/test_helpers/issuing/cards/card_123/shipping/deliver'
);
$result = $this->client->testHelpers->issuing->cards->deliverCard(
'card_123',
[]
);
static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
}

public function testFailCardCard()
{
$this->expectsRequest(
'post',
'/v1/test_helpers/issuing/cards/card_123/shipping/fail'
);
$result = $this->client->testHelpers->issuing->cards->failCard(
'card_123',
[]
);
static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
}

public function testReturnCardCard()
{
$this->expectsRequest(
'post',
'/v1/test_helpers/issuing/cards/card_123/shipping/return'
);
$result = $this->client->testHelpers->issuing->cards->returnCard(
'card_123',
[]
);
static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
}

public function testShipCardCard()
{
$this->expectsRequest(
'post',
'/v1/test_helpers/issuing/cards/card_123/shipping/ship'
);
$result = $this->client->testHelpers->issuing->cards->shipCard(
'card_123',
[]
);
static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
}

public function testExpireRefund()
{
$this->expectsRequest('post', '/v1/test_helpers/refunds/re_123/expire');
Expand Down Expand Up @@ -572,68 +634,6 @@ public function testCreateToken()
static::assertInstanceOf(\Stripe\Token::class, $result);
}

public function testListSetupAttempt()
{
$this->expectsRequest('get', '/v1/setup_attempts');
$result = $this->client->setupAttempts->all(
['limit' => 3, 'setup_intent' => 'si_xyz']
);
static::assertInstanceOf(\Stripe\Collection::class, $result);
static::assertInstanceOf(\Stripe\SetupAttempt::class, $result->data[0]);
}

public function testDeliverCardCard()
{
$this->expectsRequest(
'post',
'/v1/test_helpers/issuing/cards/card_123/shipping/deliver'
);
$result = $this->client->testHelpers->issuing->cards->deliverCard(
'card_123',
[]
);
static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
}

public function testFailCardCard()
{
$this->expectsRequest(
'post',
'/v1/test_helpers/issuing/cards/card_123/shipping/fail'
);
$result = $this->client->testHelpers->issuing->cards->failCard(
'card_123',
[]
);
static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
}

public function testReturnCardCard()
{
$this->expectsRequest(
'post',
'/v1/test_helpers/issuing/cards/card_123/shipping/return'
);
$result = $this->client->testHelpers->issuing->cards->returnCard(
'card_123',
[]
);
static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
}

public function testShipCardCard()
{
$this->expectsRequest(
'post',
'/v1/test_helpers/issuing/cards/card_123/shipping/ship'
);
$result = $this->client->testHelpers->issuing->cards->shipCard(
'card_123',
[]
);
static::assertInstanceOf(\Stripe\Issuing\Card::class, $result);
}

public function testCreateAccountLink()
{
$this->expectsRequest('post', '/v1/account_links');
Expand Down

0 comments on commit f54036d

Please sign in to comment.