Skip to content

Commit 3d861f0

Browse files
authored
deprecate: Remove old refund API (#9)
1 parent 4c0b448 commit 3d861f0

34 files changed

+2015
-604
lines changed

.openapi-generator/FILES

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ docs/Model/AddressUpdate.md
1212
docs/Model/ApplePayRequest.md
1313
docs/Model/ApplePaySessionRequest.md
1414
docs/Model/BillingDetails.md
15+
docs/Model/BillingDetailsRequest.md
1516
docs/Model/BillingDetailsUpdateRequest.md
1617
docs/Model/Buyer.md
1718
docs/Model/BuyerRequest.md
1819
docs/Model/BuyerSnapshot.md
1920
docs/Model/BuyerUpdate.md
2021
docs/Model/Buyers.md
22+
docs/Model/CardDetails.md
2123
docs/Model/CardRequest.md
2224
docs/Model/CartItem.md
2325
docs/Model/DigitalWallet.md
@@ -26,6 +28,7 @@ docs/Model/DigitalWalletUpdate.md
2628
docs/Model/DigitalWallets.md
2729
docs/Model/Error400BadRequest.md
2830
docs/Model/Error400IncorrectJson.md
31+
docs/Model/Error400InvalidCredentials.md
2932
docs/Model/Error401Unauthorized.md
3033
docs/Model/Error403Forbidden.md
3134
docs/Model/Error404NotFound.md
@@ -75,7 +78,6 @@ docs/Model/Transaction.md
7578
docs/Model/TransactionCaptureRequest.md
7679
docs/Model/TransactionPaymentMethodRequest.md
7780
docs/Model/TransactionRefundRequest.md
78-
docs/Model/TransactionRefundRequestDeprecated.md
7981
docs/Model/TransactionRequest.md
8082
docs/Model/TransactionSummary.md
8183
docs/Model/Transactions.md
@@ -98,12 +100,14 @@ lib/model/AddressUpdate.php
98100
lib/model/ApplePayRequest.php
99101
lib/model/ApplePaySessionRequest.php
100102
lib/model/BillingDetails.php
103+
lib/model/BillingDetailsRequest.php
101104
lib/model/BillingDetailsUpdateRequest.php
102105
lib/model/Buyer.php
103106
lib/model/BuyerRequest.php
104107
lib/model/BuyerSnapshot.php
105108
lib/model/BuyerUpdate.php
106109
lib/model/Buyers.php
110+
lib/model/CardDetails.php
107111
lib/model/CardRequest.php
108112
lib/model/CartItem.php
109113
lib/model/DigitalWallet.php
@@ -112,6 +116,7 @@ lib/model/DigitalWalletUpdate.php
112116
lib/model/DigitalWallets.php
113117
lib/model/Error400BadRequest.php
114118
lib/model/Error400IncorrectJson.php
119+
lib/model/Error400InvalidCredentials.php
115120
lib/model/Error401Unauthorized.php
116121
lib/model/Error403Forbidden.php
117122
lib/model/Error404NotFound.php
@@ -162,7 +167,6 @@ lib/model/Transaction.php
162167
lib/model/TransactionCaptureRequest.php
163168
lib/model/TransactionPaymentMethodRequest.php
164169
lib/model/TransactionRefundRequest.php
165-
lib/model/TransactionRefundRequestDeprecated.php
166170
lib/model/TransactionRequest.php
167171
lib/model/TransactionSummary.php
168172
lib/model/Transactions.php

docs/Api/PaymentOptionsApi.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Method | HTTP request | Description
1010
## `listPaymentOptions()`
1111

1212
```php
13-
listPaymentOptions($country, $currency, $locale): \Gr4vy\model\PaymentOptions
13+
listPaymentOptions($country, $currency, $amount, $metadata, $locale): \Gr4vy\model\PaymentOptions
1414
```
1515

1616
List payment options
@@ -36,10 +36,12 @@ $apiInstance = new Gr4vy\Api\PaymentOptionsApi(
3636
);
3737
$country = US; // string | Filters the results to only the items which support this country code. A country is formatted as 2-letter ISO country code.
3838
$currency = USD; // string | Filters the results to only the items which support this currency code. A currency is formatted as 3-letter ISO currency code.
39+
$amount = 500; // int | Used by the Flow engine to filter the results based on the transaction amount.
40+
$metadata = {"restricted_items": "True"}; // string | Used by the Flow engine to filter available options based on various client-defined parameters. If present, this must be a string representing a valid JSON dictionary.
3941
$locale = en-US; // string | An ISO 639-1 Language Code and optional ISO 3166 Country Code. This locale determines the language for the labels returned for every payment option.
4042

4143
try {
42-
$result = $apiInstance->listPaymentOptions($country, $currency, $locale);
44+
$result = $apiInstance->listPaymentOptions($country, $currency, $amount, $metadata, $locale);
4345
print_r($result);
4446
} catch (Exception $e) {
4547
echo 'Exception when calling PaymentOptionsApi->listPaymentOptions: ', $e->getMessage(), PHP_EOL;
@@ -52,6 +54,8 @@ Name | Type | Description | Notes
5254
------------- | ------------- | ------------- | -------------
5355
**country** | **string**| Filters the results to only the items which support this country code. A country is formatted as 2-letter ISO country code. | [optional]
5456
**currency** | **string**| Filters the results to only the items which support this currency code. A currency is formatted as 3-letter ISO currency code. | [optional]
57+
**amount** | **int**| Used by the Flow engine to filter the results based on the transaction amount. | [optional]
58+
**metadata** | **string**| Used by the Flow engine to filter available options based on various client-defined parameters. If present, this must be a string representing a valid JSON dictionary. | [optional]
5559
**locale** | **string**| An ISO 639-1 Language Code and optional ISO 3166 Country Code. This locale determines the language for the labels returned for every payment option. | [optional] [default to 'en-US']
5660

5761
### Return type

docs/Api/TransactionsApi.md

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Method | HTTP request | Description
1111
[**listTransactionRefunds()**](TransactionsApi.md#listTransactionRefunds) | **GET** /transactions/{transaction_id}/refunds | List transaction refunds
1212
[**listTransactions()**](TransactionsApi.md#listTransactions) | **GET** /transactions | List transactions
1313
[**refundTransaction()**](TransactionsApi.md#refundTransaction) | **POST** /transactions/{transaction_id}/refunds | Refund transaction
14-
[**refundTransactionDeprecated()**](TransactionsApi.md#refundTransactionDeprecated) | **POST** /transactions/{transaction_id}/refund | Refund or void transactions
1514
[**voidTransaction()**](TransactionsApi.md#voidTransaction) | **POST** /transactions/{transaction_id}/void | Void transaction
1615

1716

@@ -463,68 +462,6 @@ Name | Type | Description | Notes
463462
[[Back to Model list]](../../README.md#models)
464463
[[Back to README]](../../README.md)
465464

466-
## `refundTransactionDeprecated()`
467-
468-
```php
469-
refundTransactionDeprecated($transaction_id, $transaction_refund_request_deprecated): \Gr4vy\model\Transaction
470-
```
471-
472-
Refund or void transactions
473-
474-
Refunds or voids transaction. If this transaction was already captured, it will issue a refund. If the transaction was not yet captured the authorization will instead be voided. **Warning**: this endpoint will be removed eventually, use [Refund transaction](#operation/refund-transaction) or [Void transaction](#operation/void-transaction) endpoints instead.
475-
476-
### Example
477-
478-
```php
479-
<?php
480-
require_once(__DIR__ . '/vendor/autoload.php');
481-
482-
483-
// Configure Bearer (JWT) authorization: BearerAuth
484-
$config = Gr4vy\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
485-
486-
487-
$apiInstance = new Gr4vy\Api\TransactionsApi(
488-
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
489-
// This is optional, `GuzzleHttp\Client` will be used as default.
490-
new GuzzleHttp\Client(),
491-
$config
492-
);
493-
$transaction_id = fe26475d-ec3e-4884-9553-f7356683f7f9; // string | The ID for the transaction to get the information for.
494-
$transaction_refund_request_deprecated = new \Gr4vy\model\TransactionRefundRequestDeprecated(); // \Gr4vy\model\TransactionRefundRequestDeprecated
495-
496-
try {
497-
$result = $apiInstance->refundTransactionDeprecated($transaction_id, $transaction_refund_request_deprecated);
498-
print_r($result);
499-
} catch (Exception $e) {
500-
echo 'Exception when calling TransactionsApi->refundTransactionDeprecated: ', $e->getMessage(), PHP_EOL;
501-
}
502-
```
503-
504-
### Parameters
505-
506-
Name | Type | Description | Notes
507-
------------- | ------------- | ------------- | -------------
508-
**transaction_id** | **string**| The ID for the transaction to get the information for. |
509-
**transaction_refund_request_deprecated** | [**\Gr4vy\model\TransactionRefundRequestDeprecated**](../Model/TransactionRefundRequestDeprecated.md)| | [optional]
510-
511-
### Return type
512-
513-
[**\Gr4vy\model\Transaction**](../Model/Transaction.md)
514-
515-
### Authorization
516-
517-
[BearerAuth](../../README.md#BearerAuth)
518-
519-
### HTTP request headers
520-
521-
- **Content-Type**: `application/json`
522-
- **Accept**: `application/json`
523-
524-
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
525-
[[Back to Model list]](../../README.md#models)
526-
[[Back to README]](../../README.md)
527-
528465
## `voidTransaction()`
529466

530467
```php

docs/Model/AddressUpdate.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**city** | **string** | The city for the billing address. |
8-
**country** | **string** | The country for the billing address. |
9-
**postal_code** | **string** | The postal code or zip code for the billing address. |
10-
**state** | **string** | The state, county, or province for the billing address. |
7+
**city** | **string** | The city for the billing address. | [optional]
8+
**country** | **string** | The country for the billing address. | [optional]
9+
**postal_code** | **string** | The postal code or zip code for the billing address. | [optional]
10+
**state** | **string** | The state, county, or province for the billing address. | [optional]
1111
**state_code** | **string** | The code of state, county, or province for the billing address in ISO 3166-2 format. | [optional]
12-
**house_number_or_name** | **string** | The house number or name for the billing address. Not all payment services use this field but some do. |
13-
**line1** | **string** | The first line of the billing address. |
14-
**line2** | **string** | The second line of the billing address. |
15-
**organization** | **string** | The optional name of the company or organisation to add to the billing address. |
12+
**house_number_or_name** | **string** | The house number or name for the billing address. Not all payment services use this field but some do. | [optional]
13+
**line1** | **string** | The first line of the billing address. | [optional]
14+
**line2** | **string** | The second line of the billing address. | [optional]
15+
**organization** | **string** | The optional name of the company or organisation to add to the billing address. | [optional]
1616

1717
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/BillingDetails.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**first_name** | **string** | The first name(s) or given name for the buyer. | [optional]
7+
**type** | **string** | The type of this resource. Is always &#x60;billing-details&#x60;. | [optional]
8+
**first_name** | **string** | The first name(s) or given name of the buyer. | [optional]
89
**last_name** | **string** | The last name, or family name, of the buyer. | [optional]
9-
**email_address** | **string** | The email address for the buyer. | [optional]
10-
**phone_number** | **string** | The phone number to use for this request. This expect the number in the [E164 number standard](https://www.twilio.com/docs/glossary/what-e164). | [optional]
10+
**email_address** | **string** | The email address of the buyer. | [optional]
11+
**phone_number** | **string** | The phone number of the buyer. This expect the number in the [E164 number standard](https://www.twilio.com/docs/glossary/what-e164). | [optional]
1112
**address** | [**Address**](Address.md) | | [optional]
1213
**tax_id** | [**TaxId**](TaxId.md) | | [optional]
1314

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# # BillingDetailsRequest
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**first_name** | **string** | The first name(s) or given name for the buyer. | [optional]
8+
**last_name** | **string** | The last name, or family name, of the buyer. | [optional]
9+
**email_address** | **string** | The email address for the buyer. | [optional]
10+
**phone_number** | **string** | The phone number to use for this request. This expect the number in the [E164 number standard](https://www.twilio.com/docs/glossary/what-e164). | [optional]
11+
**address** | [**Address**](Address.md) | | [optional]
12+
**tax_id** | [**TaxId**](TaxId.md) | | [optional]
13+
14+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/BuyerRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**external_identifier** | **string** | An external identifier that can be used to match the buyer against your own records. This value needs to be unique for all buyers. | [optional]
88
**display_name** | **string** | A unique name for this buyer which is used in the Gr4vy admin panel to give a buyer a human readable name. | [optional]
9-
**billing_details** | [**BillingDetails**](BillingDetails.md) | | [optional]
9+
**billing_details** | [**BillingDetailsRequest**](BillingDetailsRequest.md) | | [optional]
1010

1111
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/CardDetails.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**suffix** | **string** | The last 4 digits of the card number. | [optional]
8-
**scheme** | **string** | The type of the card. | [optional]
9-
**expiration_date** | **string** | The expiration date for a card. | [optional]
7+
**type** | **string** | &#x60;card-detail&#x60;. | [optional]
8+
**id** | **string** | The 6-8 digit BIN of the card. | [optional]
9+
**card_type** | **string** | The type of card. | [optional]
10+
**scheme** | **string** | The scheme/brand of the card. | [optional]
11+
**country** | **string** | The 2-letter ISO code of the issuing country of the card. | [optional]
12+
**required_fields** | **string[]** | A list of fields that are required to process a transaction for this card. | [optional]
1013

1114
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/CardRequest.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@ Name | Type | Description | Notes
1111
**external_identifier** | **string** | An external identifier that can be used to match the card against your own records. | [optional]
1212
**buyer_id** | **string** | The ID of the buyer to associate this payment method to. If this field is provided then the &#x60;buyer_external_identifier&#x60; field needs to be unset. | [optional]
1313
**buyer_external_identifier** | **string** | The &#x60;external_identifier&#x60; of the buyer to associate this payment method to. If this field is provided then the &#x60;buyer_id&#x60; field needs to be unset. | [optional]
14-
**redirect_url** | **string** | The redirect URL to redirect a buyer after a 3D Secure flow has been completed. This will be appended with both a transaction ID and status (e.g. &#x60;https://example.com/callback? gr4vy_transaction_id&#x3D;123&amp;gr4vy_transaction_status&#x3D;capture_succeeded&#x60;). This is required if the transaction request body does not include &#x60;three_d_secure_data&#x60;. | [optional]
1514

1615
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# # Error400InvalidCredentials
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**type** | **string** | &#x60;error&#x60;. | [optional]
8+
**code** | **string** | &#x60;invalid_credentials&#x60;. | [optional]
9+
**status** | **int** | &#x60;400&#x60;. | [optional]
10+
**message** | **string** | The provided credentials are invalid. | [optional]
11+
12+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

0 commit comments

Comments
 (0)