Skip to content

Commit 1861083

Browse files
committed
update openapi spec
1 parent 19bfc16 commit 1861083

File tree

110 files changed

+9280
-494
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+9280
-494
lines changed

.openapi-generator/FILES

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
11
.php_cs
22
docs/Api/BuyersApi.md
3+
docs/Api/PaymentMethodTokensApi.md
34
docs/Api/PaymentMethodsApi.md
45
docs/Api/PaymentOptionsApi.md
56
docs/Api/PaymentServiceDefinitionsApi.md
67
docs/Api/PaymentServicesApi.md
78
docs/Api/TransactionsApi.md
8-
docs/Api/UsersApi.md
9+
docs/Model/Address.md
10+
docs/Model/AddressUpdate.md
11+
docs/Model/BillingDetails.md
12+
docs/Model/BillingDetailsUpdateRequest.md
913
docs/Model/Buyer.md
1014
docs/Model/BuyerRequest.md
1115
docs/Model/BuyerSnapshot.md
1216
docs/Model/BuyerUpdate.md
1317
docs/Model/Buyers.md
1418
docs/Model/CardRequest.md
15-
docs/Model/CardRule.md
16-
docs/Model/CardRuleCondition.md
17-
docs/Model/CardRuleNumberCondition.md
18-
docs/Model/CardRuleRequest.md
19-
docs/Model/CardRuleTextCondition.md
20-
docs/Model/CardRuleUpdate.md
21-
docs/Model/CardRules.md
2219
docs/Model/Error400BadRequest.md
2320
docs/Model/Error400IncorrectJson.md
2421
docs/Model/Error401Unauthorized.md
@@ -29,15 +26,19 @@ docs/Model/Error409DuplicateRecord.md
2926
docs/Model/ErrorDetail.md
3027
docs/Model/ErrorGeneric.md
3128
docs/Model/PaymentMethod.md
29+
docs/Model/PaymentMethodRequest.md
3230
docs/Model/PaymentMethodSnapshot.md
31+
docs/Model/PaymentMethodToken.md
3332
docs/Model/PaymentMethodTokenized.md
33+
docs/Model/PaymentMethodTokens.md
3434
docs/Model/PaymentMethods.md
3535
docs/Model/PaymentMethodsTokenized.md
3636
docs/Model/PaymentOption.md
3737
docs/Model/PaymentOptions.md
3838
docs/Model/PaymentService.md
3939
docs/Model/PaymentServiceDefinition.md
4040
docs/Model/PaymentServiceDefinitionFields.md
41+
docs/Model/PaymentServiceDefinitionSupportedFeatures.md
4142
docs/Model/PaymentServiceDefinitions.md
4243
docs/Model/PaymentServiceRequest.md
4344
docs/Model/PaymentServiceRequestAllOf.md
@@ -50,6 +51,10 @@ docs/Model/ResetPasswordRequest.md
5051
docs/Model/SetPasswordRequest.md
5152
docs/Model/Status.md
5253
docs/Model/Statuses.md
54+
docs/Model/TaxId.md
55+
docs/Model/ThreeDSecureData.md
56+
docs/Model/ThreeDSecureDataV1.md
57+
docs/Model/ThreeDSecureDataV2.md
5358
docs/Model/TokenizedRequest.md
5459
docs/Model/Transaction.md
5560
docs/Model/TransactionCaptureRequest.md
@@ -64,25 +69,22 @@ lib/Configuration.php
6469
lib/HeaderSelector.php
6570
lib/ObjectSerializer.php
6671
lib/api/BuyersApi.php
72+
lib/api/PaymentMethodTokensApi.php
6773
lib/api/PaymentMethodsApi.php
6874
lib/api/PaymentOptionsApi.php
6975
lib/api/PaymentServiceDefinitionsApi.php
7076
lib/api/PaymentServicesApi.php
7177
lib/api/TransactionsApi.php
72-
lib/api/UsersApi.php
78+
lib/model/Address.php
79+
lib/model/AddressUpdate.php
80+
lib/model/BillingDetails.php
81+
lib/model/BillingDetailsUpdateRequest.php
7382
lib/model/Buyer.php
7483
lib/model/BuyerRequest.php
7584
lib/model/BuyerSnapshot.php
7685
lib/model/BuyerUpdate.php
7786
lib/model/Buyers.php
7887
lib/model/CardRequest.php
79-
lib/model/CardRule.php
80-
lib/model/CardRuleCondition.php
81-
lib/model/CardRuleNumberCondition.php
82-
lib/model/CardRuleRequest.php
83-
lib/model/CardRuleTextCondition.php
84-
lib/model/CardRuleUpdate.php
85-
lib/model/CardRules.php
8688
lib/model/Error400BadRequest.php
8789
lib/model/Error400IncorrectJson.php
8890
lib/model/Error401Unauthorized.php
@@ -94,15 +96,19 @@ lib/model/ErrorDetail.php
9496
lib/model/ErrorGeneric.php
9597
lib/model/ModelInterface.php
9698
lib/model/PaymentMethod.php
99+
lib/model/PaymentMethodRequest.php
97100
lib/model/PaymentMethodSnapshot.php
101+
lib/model/PaymentMethodToken.php
98102
lib/model/PaymentMethodTokenized.php
103+
lib/model/PaymentMethodTokens.php
99104
lib/model/PaymentMethods.php
100105
lib/model/PaymentMethodsTokenized.php
101106
lib/model/PaymentOption.php
102107
lib/model/PaymentOptions.php
103108
lib/model/PaymentService.php
104109
lib/model/PaymentServiceDefinition.php
105110
lib/model/PaymentServiceDefinitionFields.php
111+
lib/model/PaymentServiceDefinitionSupportedFeatures.php
106112
lib/model/PaymentServiceDefinitions.php
107113
lib/model/PaymentServiceRequest.php
108114
lib/model/PaymentServiceRequestAllOf.php
@@ -115,6 +121,10 @@ lib/model/ResetPasswordRequest.php
115121
lib/model/SetPasswordRequest.php
116122
lib/model/Status.php
117123
lib/model/Statuses.php
124+
lib/model/TaxId.php
125+
lib/model/ThreeDSecureData.php
126+
lib/model/ThreeDSecureDataV1.php
127+
lib/model/ThreeDSecureDataV2.php
118128
lib/model/TokenizedRequest.php
119129
lib/model/Transaction.php
120130
lib/model/TransactionCaptureRequest.php

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.2.0-SNAPSHOT
1+
5.1.1-SNAPSHOT

.openapi-generator/replace.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ var1="'buyer' => 'BuyerSnapshot',"
1515
rep1="'buyer' => '\\\Gr4vy\\\model\\\BuyerSnapshot',"
1616
sed -i '' "s/$var1/$rep1/g" lib/model/*.php
1717

18+
var1="'billing_details' => 'BillingDetails',"
19+
rep1="'billing_details' => '\\\Gr4vy\\\model\\\BillingDetails',"
20+
sed -i '' "s/$var1/$rep1/g" lib/model/*.php
21+
22+
var1="'address' => 'Address',"
23+
rep1="'address' => '\\\Gr4vy\\\model\\\Address',"
24+
sed -i '' "s/$var1/$rep1/g" lib/model/*.php
25+
1826
var1="'payment_method' => 'PaymentMethodSnapshot',"
1927
rep1="'payment_method' => '\\\Gr4vy\\\model\\\PaymentMethodSnapshot',"
2028
sed -i '' "s/$var1/$rep1/g" lib/model/*.php
@@ -38,3 +46,7 @@ sed -i '' "s/$var1/$rep1/g" lib/model/*.php
3846
var1=' CREDENTIALS_MODE_LIVE;'
3947
rep1=' self::CREDENTIALS_MODE_LIVE;'
4048
sed -i '' "s/$var1/$rep1/g" lib/model/*.php
49+
50+
var1="const METHOD_GOCARDLESS = 'gocardless';"
51+
rep1=''
52+
sed -i '' "1,/$var1/s/$var1/$rep1/g" lib/model/PaymentMethod.php

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"ext-json": "*",
2626
"ext-mbstring": "*",
2727
"guzzlehttp/guzzle": "^6.2",
28-
"lcobucci/jwt": "^3.4"
28+
"lcobucci/jwt": "^3.4.6"
2929
},
3030
"require-dev": {
3131
"phpunit/phpunit": "^8.0 || ^9.0",

docs/Api/PaymentMethodTokensApi.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Gr4vy\PaymentMethodTokensApi
2+
3+
All URIs are relative to https://api.plantly.gr4vy.app.
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**listPaymentMethodTokens()**](PaymentMethodTokensApi.md#listPaymentMethodTokens) | **GET** /payment-methods/{payment_method_id}/tokens | List payment method tokens
8+
9+
10+
## `listPaymentMethodTokens()`
11+
12+
```php
13+
listPaymentMethodTokens($payment_method_id): \Gr4vy\model\PaymentMethodTokens
14+
```
15+
16+
List payment method tokens
17+
18+
Returns a list of PSP tokens for a given payment method.
19+
20+
### Example
21+
22+
```php
23+
<?php
24+
require_once(__DIR__ . '/vendor/autoload.php');
25+
26+
27+
// Configure Bearer (JWT) authorization: BearerAuth
28+
$config = Gr4vy\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
29+
30+
31+
$apiInstance = new Gr4vy\Api\PaymentMethodTokensApi(
32+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
33+
// This is optional, `GuzzleHttp\Client` will be used as default.
34+
new GuzzleHttp\Client(),
35+
$config
36+
);
37+
$payment_method_id = 46973e9d-88a7-44a6-abfe-be4ff0134ff4; // string | The ID of the payment method.
38+
39+
try {
40+
$result = $apiInstance->listPaymentMethodTokens($payment_method_id);
41+
print_r($result);
42+
} catch (Exception $e) {
43+
echo 'Exception when calling PaymentMethodTokensApi->listPaymentMethodTokens: ', $e->getMessage(), PHP_EOL;
44+
}
45+
```
46+
47+
### Parameters
48+
49+
Name | Type | Description | Notes
50+
------------- | ------------- | ------------- | -------------
51+
**payment_method_id** | [**string**](../Model/.md)| The ID of the payment method. |
52+
53+
### Return type
54+
55+
[**\Gr4vy\model\PaymentMethodTokens**](../Model/PaymentMethodTokens.md)
56+
57+
### Authorization
58+
59+
[BearerAuth](../../README.md#BearerAuth)
60+
61+
### HTTP request headers
62+
63+
- **Content-Type**: Not defined
64+
- **Accept**: `application/json`
65+
66+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
67+
[[Back to Model list]](../../README.md#models)
68+
[[Back to README]](../../README.md)

docs/Api/PaymentMethodsApi.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ listBuyerPaymentMethods($buyer_id, $buyer_external_identifier, $country, $curren
138138

139139
List stored payment methods for a buyer
140140

141-
Returns a list of stored (tokenized) payment methods for a buyer in a short tokenized format.
141+
Returns a list of stored (tokenized) payment methods for a buyer in a short tokenized format. Only payment methods that are compatible with at least one active payment service in that region are shown.
142142

143143
### Example
144144

@@ -269,7 +269,7 @@ Name | Type | Description | Notes
269269
## `storePaymentMethod()`
270270

271271
```php
272-
storePaymentMethod($card_request): \Gr4vy\model\PaymentMethod
272+
storePaymentMethod($payment_method_request): \Gr4vy\model\PaymentMethod
273273
```
274274

275275
New payment method
@@ -293,10 +293,10 @@ $apiInstance = new Gr4vy\Api\PaymentMethodsApi(
293293
new GuzzleHttp\Client(),
294294
$config
295295
);
296-
$card_request = new \Gr4vy\model\CardRequest(); // \Gr4vy\model\CardRequest
296+
$payment_method_request = new \Gr4vy\model\PaymentMethodRequest(); // \Gr4vy\model\PaymentMethodRequest
297297

298298
try {
299-
$result = $apiInstance->storePaymentMethod($card_request);
299+
$result = $apiInstance->storePaymentMethod($payment_method_request);
300300
print_r($result);
301301
} catch (Exception $e) {
302302
echo 'Exception when calling PaymentMethodsApi->storePaymentMethod: ', $e->getMessage(), PHP_EOL;
@@ -307,7 +307,7 @@ try {
307307

308308
Name | Type | Description | Notes
309309
------------- | ------------- | ------------- | -------------
310-
**card_request** | [**\Gr4vy\model\CardRequest**](../Model/CardRequest.md)| | [optional]
310+
**payment_method_request** | [**\Gr4vy\model\PaymentMethodRequest**](../Model/PaymentMethodRequest.md)| | [optional]
311311

312312
### Return type
313313

docs/Api/TransactionsApi.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ $apiInstance = new Gr4vy\Api\TransactionsApi(
3838
new GuzzleHttp\Client(),
3939
$config
4040
);
41-
$transaction_request = {"amount":1299,"currency":"USD","payment_method":{"method":"card","number":"4111111111111111","expiration_date":"11/25","security_code":"123"}}; // \Gr4vy\model\TransactionRequest
41+
$transaction_request = {"amount":1299,"currency":"USD","payment_method":{"method":"card","number":"4111111111111111","expiration_date":"11/25","security_code":"123","redirect_url":"https://example.com/callback"}}; // \Gr4vy\model\TransactionRequest
4242

4343
try {
4444
$result = $apiInstance->authorizeNewTransaction($transaction_request);
@@ -196,7 +196,7 @@ Name | Type | Description | Notes
196196
## `listTransactions()`
197197

198198
```php
199-
listTransactions($search, $transaction_status, $buyer_id, $buyer_external_identifier, $before_created_at, $after_created_at, $before_updated_at, $after_updated_at, $limit, $cursor): \Gr4vy\model\Transactions
199+
listTransactions($search, $transaction_status, $buyer_id, $buyer_external_identifier, $before_created_at, $after_created_at, $before_updated_at, $after_updated_at, $environment, $limit, $cursor): \Gr4vy\model\Transactions
200200
```
201201

202202
List transactions
@@ -228,11 +228,12 @@ $before_created_at = 2012-12-12T10:53:43+00:00; // string | Filters the results
228228
$after_created_at = 2012-12-12T10:53:43+00:00; // string | Filters the results to only transactions created after this ISO date-time string.
229229
$before_updated_at = 2012-12-12T10:53:43+00:00; // string | Filters the results to only transactions last updated before this ISO date-time string.
230230
$after_updated_at = 2012-12-12T10:53:43+00:00; // string | Filters the results to only transactions last updated after this ISO date-time string.
231+
$environment = staging; // string | Filters the results to only the items available in this environment.
231232
$limit = 1; // int | Defines the maximum number of items to return for this request.
232233
$cursor = ZXhhbXBsZTE; // string | A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the `next_cursor` field. Similarly the `previous_cursor` can be used to reverse backwards in the list.
233234

234235
try {
235-
$result = $apiInstance->listTransactions($search, $transaction_status, $buyer_id, $buyer_external_identifier, $before_created_at, $after_created_at, $before_updated_at, $after_updated_at, $limit, $cursor);
236+
$result = $apiInstance->listTransactions($search, $transaction_status, $buyer_id, $buyer_external_identifier, $before_created_at, $after_created_at, $before_updated_at, $after_updated_at, $environment, $limit, $cursor);
236237
print_r($result);
237238
} catch (Exception $e) {
238239
echo 'Exception when calling TransactionsApi->listTransactions: ', $e->getMessage(), PHP_EOL;
@@ -251,6 +252,7 @@ Name | Type | Description | Notes
251252
**after_created_at** | **string**| Filters the results to only transactions created after this ISO date-time string. | [optional]
252253
**before_updated_at** | **string**| Filters the results to only transactions last updated before this ISO date-time string. | [optional]
253254
**after_updated_at** | **string**| Filters the results to only transactions last updated after this ISO date-time string. | [optional]
255+
**environment** | **string**| Filters the results to only the items available in this environment. | [optional] [default to &#39;production&#39;]
254256
**limit** | **int**| Defines the maximum number of items to return for this request. | [optional] [default to 20]
255257
**cursor** | **string**| A cursor that identifies the page of results to return. This is used to paginate the results of this API. For the first page of results, this parameter can be left out. For additional pages, use the value returned by the API in the &#x60;next_cursor&#x60; field. Similarly the &#x60;previous_cursor&#x60; can be used to reverse backwards in the list. | [optional]
256258

docs/Model/Address.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# # Address
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
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. |
11+
**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. | [optional]
13+
**line1** | **string** | The first line of the billing address. |
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]
16+
17+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/AddressUpdate.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# # AddressUpdate
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
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. |
11+
**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. |
16+
17+
[[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: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# # BillingDetails
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) | The billing address for the buyer. | [optional]
12+
**tax_id** | [**TaxId**](TaxId.md) | The tax information associated with the billing details. | [optional]
13+
14+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

0 commit comments

Comments
 (0)