transferzero-sdk 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -4
- data/docs/Document.md +2 -0
- data/docs/PayoutMethodDetails.md +2 -0
- data/docs/PayoutMethodDetailsGBPBank.md +29 -0
- data/docs/PayoutMethodDetailsIBAN.md +1 -1
- data/docs/Recipient.md +1 -1
- data/docs/RecipientsApi.md +1 -1
- data/docs/Sender.md +3 -1
- data/lib/transferzero-sdk.rb +1 -0
- data/lib/transferzero-sdk/api/recipients_api.rb +2 -2
- data/lib/transferzero-sdk/api_client.rb +5 -3
- data/lib/transferzero-sdk/models/account.rb +70 -69
- data/lib/transferzero-sdk/models/account_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/account_meta.rb +61 -60
- data/lib/transferzero-sdk/models/account_response.rb +66 -65
- data/lib/transferzero-sdk/models/account_validation_error.rb +61 -60
- data/lib/transferzero-sdk/models/account_validation_request.rb +164 -163
- data/lib/transferzero-sdk/models/account_validation_response.rb +66 -65
- data/lib/transferzero-sdk/models/account_validation_result.rb +61 -60
- data/lib/transferzero-sdk/models/api_log.rb +136 -135
- data/lib/transferzero-sdk/models/api_log_list_response.rb +70 -69
- data/lib/transferzero-sdk/models/api_log_response.rb +60 -59
- data/lib/transferzero-sdk/models/currency.rb +142 -141
- data/lib/transferzero-sdk/models/currency_exchange.rb +158 -157
- data/lib/transferzero-sdk/models/currency_exchange_list_response.rb +62 -61
- data/lib/transferzero-sdk/models/currency_list_response.rb +62 -61
- data/lib/transferzero-sdk/models/currency_opposite.rb +166 -165
- data/lib/transferzero-sdk/models/debit.rb +151 -150
- data/lib/transferzero-sdk/models/debit_list_request.rb +61 -60
- data/lib/transferzero-sdk/models/debit_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/debit_request.rb +60 -59
- data/lib/transferzero-sdk/models/debit_request_wrapper.rb +80 -79
- data/lib/transferzero-sdk/models/debit_response.rb +60 -59
- data/lib/transferzero-sdk/models/document.rb +180 -169
- data/lib/transferzero-sdk/models/document_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/document_request.rb +60 -59
- data/lib/transferzero-sdk/models/document_response.rb +60 -59
- data/lib/transferzero-sdk/models/document_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/error_status.rb +66 -65
- data/lib/transferzero-sdk/models/field_description.rb +95 -94
- data/lib/transferzero-sdk/models/field_select_validation.rb +70 -69
- data/lib/transferzero-sdk/models/field_validation.rb +78 -77
- data/lib/transferzero-sdk/models/pagination.rb +97 -96
- data/lib/transferzero-sdk/models/pagination_meta.rb +60 -59
- data/lib/transferzero-sdk/models/payin_method.rb +97 -96
- data/lib/transferzero-sdk/models/payin_method_details.rb +122 -121
- data/lib/transferzero-sdk/models/payin_method_details_btc.rb +62 -61
- data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +75 -74
- data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +71 -70
- data/lib/transferzero-sdk/models/payin_method_request.rb +60 -59
- data/lib/transferzero-sdk/models/payment_method.rb +109 -108
- data/lib/transferzero-sdk/models/payment_method_list_response.rb +61 -60
- data/lib/transferzero-sdk/models/payment_method_opposite.rb +124 -123
- data/lib/transferzero-sdk/models/payout_method.rb +107 -106
- data/lib/transferzero-sdk/models/payout_method_bank_account_type_enum.rb +14 -19
- data/lib/transferzero-sdk/models/payout_method_details.rb +331 -320
- data/lib/transferzero-sdk/models/payout_method_details_balance.rb +61 -60
- data/lib/transferzero-sdk/models/payout_method_details_btc.rb +97 -96
- data/lib/transferzero-sdk/models/payout_method_details_gbp_bank.rb +267 -0
- data/lib/transferzero-sdk/models/payout_method_details_ghs_bank.rb +97 -96
- data/lib/transferzero-sdk/models/payout_method_details_iban.rb +100 -104
- data/lib/transferzero-sdk/models/payout_method_details_mad_cash.rb +162 -161
- data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +86 -85
- data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +104 -103
- data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +108 -107
- data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +97 -96
- data/lib/transferzero-sdk/models/payout_method_gender_enum.rb +14 -19
- data/lib/transferzero-sdk/models/payout_method_identity_card_type_enum.rb +15 -20
- data/lib/transferzero-sdk/models/payout_method_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +14 -19
- data/lib/transferzero-sdk/models/payout_method_request.rb +60 -59
- data/lib/transferzero-sdk/models/payout_method_response.rb +60 -59
- data/lib/transferzero-sdk/models/payout_method_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/politically_exposed_person.rb +123 -122
- data/lib/transferzero-sdk/models/recipient.rb +230 -229
- data/lib/transferzero-sdk/models/recipient_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/recipient_request.rb +60 -59
- data/lib/transferzero-sdk/models/recipient_response.rb +60 -59
- data/lib/transferzero-sdk/models/recipient_state.rb +22 -27
- data/lib/transferzero-sdk/models/recipient_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/sender.rb +491 -480
- data/lib/transferzero-sdk/models/sender_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/sender_request.rb +60 -59
- data/lib/transferzero-sdk/models/sender_response.rb +66 -65
- data/lib/transferzero-sdk/models/sender_response_existing.rb +60 -59
- data/lib/transferzero-sdk/models/sender_response_meta.rb +60 -59
- data/lib/transferzero-sdk/models/sender_state.rb +19 -24
- data/lib/transferzero-sdk/models/sender_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/transaction.rb +192 -191
- data/lib/transferzero-sdk/models/transaction_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/transaction_request.rb +60 -59
- data/lib/transferzero-sdk/models/transaction_response.rb +66 -65
- data/lib/transferzero-sdk/models/transaction_response_existing.rb +66 -65
- data/lib/transferzero-sdk/models/transaction_response_meta.rb +60 -59
- data/lib/transferzero-sdk/models/transaction_state.rb +23 -28
- data/lib/transferzero-sdk/models/transaction_traits.rb +71 -70
- data/lib/transferzero-sdk/models/transaction_webhook.rb +96 -95
- data/lib/transferzero-sdk/models/validation_error_description.rb +62 -61
- data/lib/transferzero-sdk/models/webhook.rb +92 -91
- data/lib/transferzero-sdk/models/webhook_definition.rb +107 -106
- data/lib/transferzero-sdk/models/webhook_definition_event_list_response.rb +61 -60
- data/lib/transferzero-sdk/models/webhook_definition_list_response.rb +67 -66
- data/lib/transferzero-sdk/models/webhook_definition_request.rb +60 -59
- data/lib/transferzero-sdk/models/webhook_definition_response.rb +60 -59
- data/lib/transferzero-sdk/models/webhook_log.rb +97 -96
- data/lib/transferzero-sdk/models/webhook_log_list_response.rb +70 -69
- data/lib/transferzero-sdk/models/webhook_log_metadata.rb +129 -128
- data/lib/transferzero-sdk/models/webhook_log_metadata_request.rb +80 -79
- data/lib/transferzero-sdk/models/webhook_log_metadata_response.rb +81 -80
- data/lib/transferzero-sdk/models/webhook_log_response.rb +60 -59
- data/lib/transferzero-sdk/version.rb +1 -1
- data/spec/models/payout_method_details_gbp_bank_spec.rb +77 -0
- metadata +7 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f333393e130ce032c7ae5f25df97e719a671e3f0071aaef40c6c67ad81295473
|
|
4
|
+
data.tar.gz: 556e231d7edf40381c86bf3dadcf3b3559d9c799976d1f7a4d2ea69e7428094c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0100867ae3b2c304d8914632fcccbaf8312e3d16a65dc136c76f868ef3fabd43479b13aeb2aac5323ca18c83ce8504cc6693d289cee1408b8ea868a746ca16bc'
|
|
7
|
+
data.tar.gz: a9b1c802ff472b829eca858a92d2a252b41ee163d28eb50c740d778c7aa86cf4fef5a48a876cb028e37ca4e4c3c6378826d7663d5c87d58ca0aec7056f680e12
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Reference documentation for the TransferZero API V1
|
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
8
8
|
|
|
9
9
|
- API version: 1.0
|
|
10
|
-
- Package version: 1.
|
|
10
|
+
- Package version: 1.7.0
|
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
12
12
|
|
|
13
13
|
For more information, please visit:
|
|
@@ -31,15 +31,15 @@ gem build transferzero-sdk.gemspec
|
|
|
31
31
|
Then either install the gem locally:
|
|
32
32
|
|
|
33
33
|
```shell
|
|
34
|
-
gem install ./transferzero-sdk-1.
|
|
34
|
+
gem install ./transferzero-sdk-1.7.0.gem
|
|
35
35
|
```
|
|
36
|
-
(for development, run `gem install --dev ./transferzero-sdk-1.
|
|
36
|
+
(for development, run `gem install --dev ./transferzero-sdk-1.7.0.gem` to install the development dependencies)
|
|
37
37
|
|
|
38
38
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
39
39
|
|
|
40
40
|
Finally add this to the Gemfile:
|
|
41
41
|
|
|
42
|
-
gem 'transferzero-sdk', '~> 1.
|
|
42
|
+
gem 'transferzero-sdk', '~> 1.7.0'
|
|
43
43
|
|
|
44
44
|
### Install from Git
|
|
45
45
|
|
|
@@ -199,6 +199,7 @@ Class | Method | HTTP request | Description
|
|
|
199
199
|
- [TransferZero::PayoutMethodDetails](docs/PayoutMethodDetails.md)
|
|
200
200
|
- [TransferZero::PayoutMethodDetailsBTC](docs/PayoutMethodDetailsBTC.md)
|
|
201
201
|
- [TransferZero::PayoutMethodDetailsBalance](docs/PayoutMethodDetailsBalance.md)
|
|
202
|
+
- [TransferZero::PayoutMethodDetailsGBPBank](docs/PayoutMethodDetailsGBPBank.md)
|
|
202
203
|
- [TransferZero::PayoutMethodDetailsGHSBank](docs/PayoutMethodDetailsGHSBank.md)
|
|
203
204
|
- [TransferZero::PayoutMethodDetailsIBAN](docs/PayoutMethodDetailsIBAN.md)
|
|
204
205
|
- [TransferZero::PayoutMethodDetailsMADCash](docs/PayoutMethodDetailsMADCash.md)
|
data/docs/Document.md
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**upload** | **String** | Base64 encoded data uri of an image/pdf file or a fully qualified url |
|
|
8
|
+
**url** | **String** | URL of the document location | [optional]
|
|
8
9
|
**upload_file_name** | **String** | Name of the upload |
|
|
9
10
|
**metadata** | [**Object**](.md) | Metadata of document | [optional]
|
|
10
11
|
**upload_content_type** | **String** | | [optional]
|
|
@@ -22,6 +23,7 @@ Name | Type | Description | Notes
|
|
|
22
23
|
require 'TransferZero'
|
|
23
24
|
|
|
24
25
|
instance = TransferZero::Document.new(upload: data:image/png;base64,iVBORw0KGg...lFTkSuQmCC,
|
|
26
|
+
url: https://bitpesa-documents.amazonaws.com/document.pdf,
|
|
25
27
|
upload_file_name: example.png,
|
|
26
28
|
metadata: {},
|
|
27
29
|
upload_content_type: image/png,
|
data/docs/PayoutMethodDetails.md
CHANGED
|
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
|
|
|
14
14
|
**iban** | **String** | |
|
|
15
15
|
**bank_name** | **String** | |
|
|
16
16
|
**bank_country** | **String** | |
|
|
17
|
+
**sort_code** | **String** | | [optional]
|
|
17
18
|
**bic** | **String** | | [optional]
|
|
18
19
|
**sender_identity_card_type** | [**PayoutMethodIdentityCardTypeEnum**](PayoutMethodIdentityCardTypeEnum.md) | |
|
|
19
20
|
**sender_identity_card_id** | **String** | |
|
|
@@ -42,6 +43,7 @@ instance = TransferZero::PayoutMethodDetails.new(first_name: null,
|
|
|
42
43
|
iban: null,
|
|
43
44
|
bank_name: null,
|
|
44
45
|
bank_country: null,
|
|
46
|
+
sort_code: null,
|
|
45
47
|
bic: null,
|
|
46
48
|
sender_identity_card_type: null,
|
|
47
49
|
sender_identity_card_id: null,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# TransferZero::PayoutMethodDetailsGBPBank
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**first_name** | **String** | |
|
|
8
|
+
**last_name** | **String** | |
|
|
9
|
+
**bank_name** | **String** | | [optional]
|
|
10
|
+
**bank_account** | **String** | | [optional]
|
|
11
|
+
**sort_code** | **String** | | [optional]
|
|
12
|
+
**iban** | **String** | | [optional]
|
|
13
|
+
**bic** | **String** | | [optional]
|
|
14
|
+
|
|
15
|
+
## Code Sample
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'TransferZero'
|
|
19
|
+
|
|
20
|
+
instance = TransferZero::PayoutMethodDetailsGBPBank.new(first_name: null,
|
|
21
|
+
last_name: null,
|
|
22
|
+
bank_name: null,
|
|
23
|
+
bank_account: null,
|
|
24
|
+
sort_code: null,
|
|
25
|
+
iban: null,
|
|
26
|
+
bic: null)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
|
|
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
|
7
7
|
**first_name** | **String** | |
|
|
8
8
|
**last_name** | **String** | |
|
|
9
|
-
**bank_name** | **String** | |
|
|
9
|
+
**bank_name** | **String** | | [optional]
|
|
10
10
|
**iban** | **String** | |
|
|
11
11
|
**bic** | **String** | | [optional]
|
|
12
12
|
|
data/docs/Recipient.md
CHANGED
|
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
|
|
|
12
12
|
**editable** | **Boolean** | Shows whether the recipient can be edited using the PATCH /v1/recipients/{id} endpoint or not | [optional]
|
|
13
13
|
**retriable** | **Boolean** | Shows whether the transaction made to the recipient can be retried or not | [optional]
|
|
14
14
|
**input_usd_amount** | **Float** | Shows how much this payment is worth in USD | [optional]
|
|
15
|
-
**may_cancel** | **Boolean** |
|
|
15
|
+
**may_cancel** | **Boolean** | If true it shows that the payment can be cancelled immediately using the DELETE /v1/recipients/{id} endpoint. If false you can still try to cancel it, however it will only gets cancelled once we have confirmation from our partner that the payment has failed. | [optional]
|
|
16
16
|
**state_reason** | **String** | In case the payment is unsuccessful it holds the error message associated with the last unsuccessful payout. | [optional]
|
|
17
17
|
**state** | [**RecipientState**](RecipientState.md) | | [optional]
|
|
18
18
|
**transaction_id** | **String** | The ID of the transaction that is related to this recipient | [optional]
|
data/docs/RecipientsApi.md
CHANGED
|
@@ -14,7 +14,7 @@ Method | HTTP request | Description
|
|
|
14
14
|
|
|
15
15
|
Cancelling a recipient
|
|
16
16
|
|
|
17
|
-
Cancels the payment to the recipient specified in the URL path. Please note
|
|
17
|
+
Cancels the payment to the recipient specified in the URL path. Please note recipients where the `may_cancel` attribute is true will be cancelled immediately. If the `may_cancel` attribute is false you can still try to cancel the recipient, however it will only gets cancelled if we will receive a confirmation from our partner that the payment has failed
|
|
18
18
|
|
|
19
19
|
### Example
|
|
20
20
|
```ruby
|
data/docs/Sender.md
CHANGED
|
@@ -47,6 +47,7 @@ Name | Type | Description | Notes
|
|
|
47
47
|
**onboarding_status** | **String** | The onboarding status of the sender | [optional]
|
|
48
48
|
**politically_exposed_people** | [**Array<PoliticallyExposedPerson>**](PoliticallyExposedPerson.md) | An optional list of politically exposed people, individuals who are or have been entrusted with prominent public functions by a country, for example heads of state or heads of government, senior politicians, senior government, judicial or military officials, senior executives of state owned corporations, important political party officials. There is a limit of three (3) politically exposed people per Sender. Politically exposed person example: ```json { \"politically_exposed_person\": { \"name\": \"Ronald Reagan\", \"position\": \"President of the United States\", \"started_date\": \"1981-01-20T00:00:00.000Z\", \"ended_date\": \"1989-01-20T00:00:00.000Z\", \"sender_id\": \"344fb668-196d-43db-9d94-b34b7e6c7e0b\" } } ``` | [optional]
|
|
49
49
|
**external_id** | **String** | Optional ID that is supplied by partner linking it to the partner's own Sender ID. Note: if present we will validate whether the sent ID is a duplicate in our system or not. | [optional]
|
|
50
|
+
**created_at** | **String** | Date and time of sender was created | [optional]
|
|
50
51
|
|
|
51
52
|
## Code Sample
|
|
52
53
|
|
|
@@ -95,7 +96,8 @@ instance = TransferZero::Sender.new(id: bf9ff782-e182-45ac-abea-5bce83ad6670,
|
|
|
95
96
|
errors: {"phone_number":[{"error":"invalid"}],"documents":[{"error":"blank"}]},
|
|
96
97
|
onboarding_status: null,
|
|
97
98
|
politically_exposed_people: [{"id":"40","name":"Ronald Reagan","position":"President of the United States","started_date":"1981-01-20T00:00:00.000Z","ended_date":"1989-01-20T00:00:00.000Z","sender_id":"f9dc79ca-0c39-4add-9f4d-5ad7e6f187fb"}],
|
|
98
|
-
external_id: 806ec63a-a5a7-43cc-9d75-1ee74fbcc026
|
|
99
|
+
external_id: 806ec63a-a5a7-43cc-9d75-1ee74fbcc026,
|
|
100
|
+
created_at: 2019-01-11T00:00:00.001+0000)
|
|
99
101
|
```
|
|
100
102
|
|
|
101
103
|
|
data/lib/transferzero-sdk.rb
CHANGED
|
@@ -64,6 +64,7 @@ require 'transferzero-sdk/models/payout_method_bank_account_type_enum'
|
|
|
64
64
|
require 'transferzero-sdk/models/payout_method_details'
|
|
65
65
|
require 'transferzero-sdk/models/payout_method_details_btc'
|
|
66
66
|
require 'transferzero-sdk/models/payout_method_details_balance'
|
|
67
|
+
require 'transferzero-sdk/models/payout_method_details_gbp_bank'
|
|
67
68
|
require 'transferzero-sdk/models/payout_method_details_ghs_bank'
|
|
68
69
|
require 'transferzero-sdk/models/payout_method_details_iban'
|
|
69
70
|
require 'transferzero-sdk/models/payout_method_details_mad_cash'
|
|
@@ -22,7 +22,7 @@ module TransferZero
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
# Cancelling a recipient
|
|
25
|
-
# Cancels the payment to the recipient specified in the URL path. Please note
|
|
25
|
+
# Cancels the payment to the recipient specified in the URL path. Please note recipients where the `may_cancel` attribute is true will be cancelled immediately. If the `may_cancel` attribute is false you can still try to cancel the recipient, however it will only gets cancelled if we will receive a confirmation from our partner that the payment has failed
|
|
26
26
|
# @param recipient_id ID of recipient to cancel. Example: `/v1/recipients/9d4d7b73-a94c-4979-ab57-09074fd55d33`
|
|
27
27
|
# @param [Hash] opts the optional parameters
|
|
28
28
|
# @return [RecipientResponse]
|
|
@@ -32,7 +32,7 @@ module TransferZero
|
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
# Cancelling a recipient
|
|
35
|
-
# Cancels the payment to the recipient specified in the URL path. Please note
|
|
35
|
+
# Cancels the payment to the recipient specified in the URL path. Please note recipients where the `may_cancel` attribute is true will be cancelled immediately. If the `may_cancel` attribute is false you can still try to cancel the recipient, however it will only gets cancelled if we will receive a confirmation from our partner that the payment has failed
|
|
36
36
|
# @param recipient_id ID of recipient to cancel. Example: `/v1/recipients/9d4d7b73-a94c-4979-ab57-09074fd55d33`
|
|
37
37
|
# @param [Hash] opts the optional parameters
|
|
38
38
|
# @return [Array<(RecipientResponse, Fixnum, Hash)>] RecipientResponse data, response status code and response headers
|
|
@@ -35,7 +35,7 @@ module TransferZero
|
|
|
35
35
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
|
36
36
|
def initialize(config = Configuration.default)
|
|
37
37
|
@config = config
|
|
38
|
-
@user_agent = "TransferZero-SDK/Ruby/1.
|
|
38
|
+
@user_agent = "TransferZero-SDK/Ruby/1.7.0"
|
|
39
39
|
@default_headers = {
|
|
40
40
|
'Content-Type' => 'application/json',
|
|
41
41
|
'User-Agent' => @user_agent
|
|
@@ -106,12 +106,14 @@ module TransferZero
|
|
|
106
106
|
url_with_params = add_query(url, query_params)
|
|
107
107
|
form_params = opts[:form_params] || {}
|
|
108
108
|
|
|
109
|
+
request_body = opts[:body].to_s.gsub(/[[:space:]]+/, ' ').strip
|
|
110
|
+
|
|
109
111
|
request_nonce = SecureRandom.uuid
|
|
110
112
|
request_signature = sign_request([
|
|
111
113
|
request_nonce,
|
|
112
114
|
http_method.to_s.upcase,
|
|
113
115
|
url_with_params,
|
|
114
|
-
DIGEST.hexdigest(
|
|
116
|
+
DIGEST.hexdigest(request_body)
|
|
115
117
|
])
|
|
116
118
|
|
|
117
119
|
header_params['Authorization-Nonce'] = request_nonce
|
|
@@ -138,7 +140,7 @@ module TransferZero
|
|
|
138
140
|
req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert
|
|
139
141
|
|
|
140
142
|
if [:post, :patch, :put, :delete].include?(http_method)
|
|
141
|
-
req_body = build_request_body(header_params, form_params,
|
|
143
|
+
req_body = build_request_body(header_params, form_params, request_body)
|
|
142
144
|
req_opts.update :body => req_body
|
|
143
145
|
if @config.debugging
|
|
144
146
|
@config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
|
|
@@ -13,86 +13,86 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module TransferZero
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
# Attribute type mapping.
|
|
32
|
-
def self.openapi_types
|
|
33
|
-
{
|
|
34
|
-
:'amount' => :'Float',
|
|
35
|
-
:'currency' => :'String'
|
|
36
|
-
}
|
|
37
|
-
end
|
|
16
|
+
class Account
|
|
17
|
+
# The account balance for the given currency
|
|
18
|
+
attr_accessor :amount
|
|
19
|
+
|
|
20
|
+
# The currency of this balance
|
|
21
|
+
attr_accessor :currency
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'amount' => :'amount',
|
|
27
|
+
:'currency' => :'currency'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
38
30
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
31
|
+
# Attribute type mapping.
|
|
32
|
+
def self.openapi_types
|
|
33
|
+
{
|
|
34
|
+
:'amount' => :'Float',
|
|
35
|
+
:'currency' => :'String'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
45
38
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
39
|
+
# Initializes the object
|
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
41
|
+
def initialize(attributes = {})
|
|
42
|
+
if (!attributes.is_a?(Hash))
|
|
43
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::Account` initialize method"
|
|
44
|
+
end
|
|
53
45
|
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
48
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
49
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::Account`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
56
50
|
end
|
|
51
|
+
h[k.to_sym] = v
|
|
52
|
+
}
|
|
57
53
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
end
|
|
54
|
+
if attributes.key?(:'amount')
|
|
55
|
+
self.amount = attributes[:'amount']
|
|
61
56
|
end
|
|
62
57
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
def list_invalid_properties
|
|
66
|
-
invalid_properties = Array.new
|
|
67
|
-
invalid_properties
|
|
58
|
+
if attributes.key?(:'currency')
|
|
59
|
+
self.currency = attributes[:'currency']
|
|
68
60
|
end
|
|
61
|
+
end
|
|
69
62
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
63
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
64
|
+
# @return Array for valid properties with the reasons
|
|
65
|
+
def list_invalid_properties
|
|
66
|
+
invalid_properties = Array.new
|
|
67
|
+
invalid_properties
|
|
68
|
+
end
|
|
75
69
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
amount == o.amount &&
|
|
82
|
-
currency == o.currency
|
|
83
|
-
end
|
|
70
|
+
# Check to see if the all the properties in the model are valid
|
|
71
|
+
# @return true if the model is valid
|
|
72
|
+
def valid?
|
|
73
|
+
true
|
|
74
|
+
end
|
|
84
75
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
76
|
+
# Checks equality by comparing each attribute.
|
|
77
|
+
# @param [Object] Object to be compared
|
|
78
|
+
def ==(o)
|
|
79
|
+
return true if self.equal?(o)
|
|
80
|
+
self.class == o.class &&
|
|
81
|
+
amount == o.amount &&
|
|
82
|
+
currency == o.currency
|
|
83
|
+
end
|
|
90
84
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
85
|
+
# @see the `==` method
|
|
86
|
+
# @param [Object] Object to be compared
|
|
87
|
+
def eql?(o)
|
|
88
|
+
self == o
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Calculates hash code according to all attributes.
|
|
92
|
+
# @return [Integer] Hash code
|
|
93
|
+
def hash
|
|
94
|
+
[amount, currency].hash
|
|
95
|
+
end
|
|
96
96
|
|
|
97
97
|
require 'active_support/core_ext/hash'
|
|
98
98
|
require 'active_support/hash_with_indifferent_access.rb'
|
|
@@ -208,5 +208,6 @@ def _to_hash(value)
|
|
|
208
208
|
end
|
|
209
209
|
end
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
end
|
|
212
|
+
|
|
212
213
|
end
|
|
@@ -13,86 +13,86 @@ OpenAPI Generator version: 4.0.0-beta3
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module TransferZero
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
class AccountListResponse
|
|
17
|
+
attr_accessor :object
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
attr_accessor :meta
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'object' => :'object',
|
|
25
|
+
:'meta' => :'meta'
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
# Attribute type mapping.
|
|
30
|
+
def self.openapi_types
|
|
31
|
+
{
|
|
32
|
+
:'object' => :'Array<Account>',
|
|
33
|
+
:'meta' => :'AccountMeta'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
# Initializes the object
|
|
38
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
39
|
+
def initialize(attributes = {})
|
|
40
|
+
if (!attributes.is_a?(Hash))
|
|
41
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::AccountListResponse` initialize method"
|
|
42
|
+
end
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
end
|
|
49
|
-
h[k.to_sym] = v
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if attributes.key?(:'object')
|
|
53
|
-
if (value = attributes[:'object']).is_a?(Array)
|
|
54
|
-
self.object = value
|
|
55
|
-
end
|
|
44
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
45
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
46
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
47
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::AccountListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
56
48
|
end
|
|
49
|
+
h[k.to_sym] = v
|
|
50
|
+
}
|
|
57
51
|
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
if attributes.key?(:'object')
|
|
53
|
+
if (value = attributes[:'object']).is_a?(Array)
|
|
54
|
+
self.object = value
|
|
60
55
|
end
|
|
61
56
|
end
|
|
62
57
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
def list_invalid_properties
|
|
66
|
-
invalid_properties = Array.new
|
|
67
|
-
invalid_properties
|
|
58
|
+
if attributes.key?(:'meta')
|
|
59
|
+
self.meta = attributes[:'meta']
|
|
68
60
|
end
|
|
61
|
+
end
|
|
69
62
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
63
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
64
|
+
# @return Array for valid properties with the reasons
|
|
65
|
+
def list_invalid_properties
|
|
66
|
+
invalid_properties = Array.new
|
|
67
|
+
invalid_properties
|
|
68
|
+
end
|
|
75
69
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
object == o.object &&
|
|
82
|
-
meta == o.meta
|
|
83
|
-
end
|
|
70
|
+
# Check to see if the all the properties in the model are valid
|
|
71
|
+
# @return true if the model is valid
|
|
72
|
+
def valid?
|
|
73
|
+
true
|
|
74
|
+
end
|
|
84
75
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
76
|
+
# Checks equality by comparing each attribute.
|
|
77
|
+
# @param [Object] Object to be compared
|
|
78
|
+
def ==(o)
|
|
79
|
+
return true if self.equal?(o)
|
|
80
|
+
self.class == o.class &&
|
|
81
|
+
object == o.object &&
|
|
82
|
+
meta == o.meta
|
|
83
|
+
end
|
|
90
84
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
85
|
+
# @see the `==` method
|
|
86
|
+
# @param [Object] Object to be compared
|
|
87
|
+
def eql?(o)
|
|
88
|
+
self == o
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Calculates hash code according to all attributes.
|
|
92
|
+
# @return [Integer] Hash code
|
|
93
|
+
def hash
|
|
94
|
+
[object, meta].hash
|
|
95
|
+
end
|
|
96
96
|
|
|
97
97
|
require 'active_support/core_ext/hash'
|
|
98
98
|
require 'active_support/hash_with_indifferent_access.rb'
|
|
@@ -208,5 +208,6 @@ def _to_hash(value)
|
|
|
208
208
|
end
|
|
209
209
|
end
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
end
|
|
212
|
+
|
|
212
213
|
end
|