transferzero-sdk 1.16.0 → 1.19.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.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +92 -0
  3. data/README.md +15 -4
  4. data/docs/Document.md +2 -0
  5. data/docs/PayinMethod.md +12 -4
  6. data/docs/PayinMethodDetails.md +5 -5
  7. data/docs/PayinMethodDetailsMobile.md +3 -3
  8. data/docs/PayinMethodDetailsNGNBank.md +2 -2
  9. data/docs/PayinMethodResponse.md +17 -0
  10. data/docs/PayinMethodState.md +16 -0
  11. data/docs/PayinMethodUxFlow.md +16 -0
  12. data/docs/PayinMethodsApi.md +256 -0
  13. data/docs/PayoutMethod.md +1 -1
  14. data/docs/PayoutMethodDetails.md +4 -2
  15. data/docs/PayoutMethodDetailsGNFMobile.md +23 -0
  16. data/docs/PayoutMethodDetailsKESBank.md +3 -1
  17. data/docs/PayoutMethodDetailsKESMobile.md +3 -1
  18. data/docs/PayoutMethodDetailsXAFMobile.md +25 -0
  19. data/docs/PayoutMethodDetailsXOFBank.md +3 -1
  20. data/docs/PayoutMethodDetailsXOFCash.md +1 -1
  21. data/docs/PayoutMethodDetailsXOFMobile.md +3 -1
  22. data/docs/PayoutMethodDetailsZARBank.md +2 -0
  23. data/docs/PayoutMethodTransferReasonEnum.md +16 -0
  24. data/docs/Recipient.md +2 -0
  25. data/docs/RecipientStateReasonDetails.md +3 -3
  26. data/docs/Sender.md +4 -0
  27. data/docs/StateReasonDetails.md +23 -0
  28. data/lib/transferzero-sdk/api/payin_methods_api.rb +244 -0
  29. data/lib/transferzero-sdk/api_client.rb +1 -1
  30. data/lib/transferzero-sdk/models/document.rb +11 -1
  31. data/lib/transferzero-sdk/models/payin_method.rb +47 -9
  32. data/lib/transferzero-sdk/models/payin_method_details.rb +9 -15
  33. data/lib/transferzero-sdk/models/payin_method_details_mobile.rb +8 -14
  34. data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +2 -2
  35. data/lib/transferzero-sdk/models/payin_method_response.rb +202 -0
  36. data/lib/transferzero-sdk/models/payin_method_state.rb +39 -0
  37. data/lib/transferzero-sdk/models/payin_method_ux_flow.rb +31 -0
  38. data/lib/transferzero-sdk/models/payout_method.rb +1 -1
  39. data/lib/transferzero-sdk/models/payout_method_details.rb +17 -6
  40. data/lib/transferzero-sdk/models/payout_method_details_gnf_mobile.rb +250 -0
  41. data/lib/transferzero-sdk/models/payout_method_details_kes_bank.rb +11 -7
  42. data/lib/transferzero-sdk/models/payout_method_details_kes_mobile.rb +11 -7
  43. data/lib/transferzero-sdk/models/payout_method_details_mobile.rb +1 -1
  44. data/lib/transferzero-sdk/models/payout_method_details_xaf_mobile.rb +259 -0
  45. data/lib/transferzero-sdk/models/payout_method_details_xof_bank.rb +14 -5
  46. data/lib/transferzero-sdk/models/payout_method_details_xof_cash.rb +6 -1
  47. data/lib/transferzero-sdk/models/payout_method_details_xof_mobile.rb +14 -5
  48. data/lib/transferzero-sdk/models/payout_method_details_zar_bank.rb +11 -2
  49. data/lib/transferzero-sdk/models/payout_method_mobile_provider_enum.rb +1 -0
  50. data/lib/transferzero-sdk/models/payout_method_transfer_reason_enum.rb +137 -0
  51. data/lib/transferzero-sdk/models/recipient.rb +45 -1
  52. data/lib/transferzero-sdk/models/recipient_state_reason_details.rb +21 -2
  53. data/lib/transferzero-sdk/models/sender.rb +21 -1
  54. data/lib/transferzero-sdk/models/state_reason_details.rb +235 -0
  55. data/lib/transferzero-sdk/version.rb +1 -1
  56. data/lib/transferzero-sdk.rb +8 -0
  57. data/spec/api/payin_methods_api_spec.rb +84 -0
  58. data/spec/models/payin_method_response_spec.rb +41 -0
  59. data/spec/models/payin_method_state_spec.rb +35 -0
  60. data/spec/models/payin_method_ux_flow_spec.rb +35 -0
  61. data/spec/models/payout_method_details_gnf_mobile_spec.rb +59 -0
  62. data/spec/models/payout_method_details_xaf_mobile_spec.rb +65 -0
  63. data/spec/models/payout_method_transfer_reason_enum_spec.rb +35 -0
  64. data/spec/models/state_reason_details_spec.rb +59 -0
  65. metadata +35 -2
@@ -0,0 +1,23 @@
1
+ # TransferZero::PayoutMethodDetailsGNFMobile
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **first_name** | **String** | |
8
+ **last_name** | **String** | |
9
+ **phone_number** | **String** | |
10
+ **mobile_provider** | [**PayoutMethodMobileProviderEnum**](PayoutMethodMobileProviderEnum.md) | |
11
+
12
+ ## Code Sample
13
+
14
+ ```ruby
15
+ require 'TransferZero'
16
+
17
+ instance = TransferZero::PayoutMethodDetailsGNFMobile.new(first_name: null,
18
+ last_name: null,
19
+ phone_number: null,
20
+ mobile_provider: null)
21
+ ```
22
+
23
+
@@ -12,7 +12,8 @@ Name | Type | Description | Notes
12
12
  **bank_name** | **String** | |
13
13
  **branch_code** | **String** | | [optional]
14
14
  **swift_code** | **String** | |
15
- **transfer_reason_code** | **String** | |
15
+ **transfer_reason_code** | **String** | | [optional]
16
+ **transfer_reason** | [**PayoutMethodTransferReasonEnum**](PayoutMethodTransferReasonEnum.md) | | [optional]
16
17
  **identity_card_type** | [**PayoutMethodIdentityCardTypeEnum**](PayoutMethodIdentityCardTypeEnum.md) | |
17
18
  **identity_card_id** | **String** | |
18
19
 
@@ -30,6 +31,7 @@ instance = TransferZero::PayoutMethodDetailsKESBank.new(first_name: null,
30
31
  branch_code: null,
31
32
  swift_code: null,
32
33
  transfer_reason_code: null,
34
+ transfer_reason: null,
33
35
  identity_card_type: null,
34
36
  identity_card_id: null)
35
37
  ```
@@ -9,7 +9,8 @@ Name | Type | Description | Notes
9
9
  **street** | **String** | |
10
10
  **phone_number** | **String** | |
11
11
  **mobile_provider** | [**PayoutMethodMobileProviderEnum**](PayoutMethodMobileProviderEnum.md) | |
12
- **transfer_reason_code** | **String** | |
12
+ **transfer_reason_code** | **String** | | [optional]
13
+ **transfer_reason** | [**PayoutMethodTransferReasonEnum**](PayoutMethodTransferReasonEnum.md) | | [optional]
13
14
  **identity_card_type** | [**PayoutMethodIdentityCardTypeEnum**](PayoutMethodIdentityCardTypeEnum.md) | |
14
15
  **identity_card_id** | **String** | |
15
16
 
@@ -24,6 +25,7 @@ instance = TransferZero::PayoutMethodDetailsKESMobile.new(first_name: null,
24
25
  phone_number: null,
25
26
  mobile_provider: null,
26
27
  transfer_reason_code: null,
28
+ transfer_reason: null,
27
29
  identity_card_type: null,
28
30
  identity_card_id: null)
29
31
  ```
@@ -0,0 +1,25 @@
1
+ # TransferZero::PayoutMethodDetailsXAFMobile
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **first_name** | **String** | |
8
+ **last_name** | **String** | |
9
+ **phone_number** | **String** | |
10
+ **mobile_provider** | [**PayoutMethodMobileProviderEnum**](PayoutMethodMobileProviderEnum.md) | |
11
+ **country** | [**PayoutMethodCountryEnum**](PayoutMethodCountryEnum.md) | | [optional]
12
+
13
+ ## Code Sample
14
+
15
+ ```ruby
16
+ require 'TransferZero'
17
+
18
+ instance = TransferZero::PayoutMethodDetailsXAFMobile.new(first_name: null,
19
+ last_name: null,
20
+ phone_number: null,
21
+ mobile_provider: null,
22
+ country: null)
23
+ ```
24
+
25
+
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
10
10
  **bank_name** | **String** | | [optional]
11
11
  **bank_country** | **String** | | [optional]
12
12
  **bank_code** | **String** | | [optional]
13
+ **transfer_reason** | [**PayoutMethodTransferReasonEnum**](PayoutMethodTransferReasonEnum.md) | | [optional]
13
14
 
14
15
  ## Code Sample
15
16
 
@@ -21,7 +22,8 @@ instance = TransferZero::PayoutMethodDetailsXOFBank.new(first_name: null,
21
22
  iban: null,
22
23
  bank_name: null,
23
24
  bank_country: null,
24
- bank_code: null)
25
+ bank_code: null,
26
+ transfer_reason: null)
25
27
  ```
26
28
 
27
29
 
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
7
7
  **first_name** | **String** | |
8
8
  **last_name** | **String** | |
9
9
  **phone_number** | **String** | |
10
- **cash_provider** | [**PayoutMethodCashProviderEnum**](PayoutMethodCashProviderEnum.md) | | [optional]
10
+ **cash_provider** | [**PayoutMethodCashProviderEnum**](PayoutMethodCashProviderEnum.md) | |
11
11
  **country** | [**PayoutMethodCountryEnum**](PayoutMethodCountryEnum.md) | | [optional]
12
12
 
13
13
  ## Code Sample
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
9
9
  **phone_number** | **String** | |
10
10
  **mobile_provider** | [**PayoutMethodMobileProviderEnum**](PayoutMethodMobileProviderEnum.md) | |
11
11
  **country** | [**PayoutMethodCountryEnum**](PayoutMethodCountryEnum.md) | | [optional]
12
+ **transfer_reason** | [**PayoutMethodTransferReasonEnum**](PayoutMethodTransferReasonEnum.md) | | [optional]
12
13
 
13
14
  ## Code Sample
14
15
 
@@ -19,7 +20,8 @@ instance = TransferZero::PayoutMethodDetailsXOFMobile.new(first_name: null,
19
20
  last_name: null,
20
21
  phone_number: null,
21
22
  mobile_provider: null,
22
- country: null)
23
+ country: null,
24
+ transfer_reason: null)
23
25
  ```
24
26
 
25
27
 
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
14
14
  **bank_account** | **String** | |
15
15
  **phone_number** | **String** | |
16
16
  **transfer_reason_code** | **String** | | [optional]
17
+ **transfer_reason** | [**PayoutMethodTransferReasonEnum**](PayoutMethodTransferReasonEnum.md) | | [optional]
17
18
  **name** | **String** | | [optional]
18
19
  **contact_first_name** | **String** | | [optional]
19
20
  **contact_last_name** | **String** | | [optional]
@@ -36,6 +37,7 @@ instance = TransferZero::PayoutMethodDetailsZARBank.new(first_name: null,
36
37
  bank_account: null,
37
38
  phone_number: null,
38
39
  transfer_reason_code: null,
40
+ transfer_reason: null,
39
41
  name: null,
40
42
  contact_first_name: null,
41
43
  contact_last_name: null,
@@ -0,0 +1,16 @@
1
+ # TransferZero::PayoutMethodTransferReasonEnum
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+
8
+ ## Code Sample
9
+
10
+ ```ruby
11
+ require 'TransferZero'
12
+
13
+ instance = TransferZero::PayoutMethodTransferReasonEnum.new()
14
+ ```
15
+
16
+
data/docs/Recipient.md CHANGED
@@ -26,6 +26,7 @@ Name | Type | Description | Notes
26
26
  **output_amount** | **Float** | The amount that will be paid to the recipient | [optional]
27
27
  **output_currency** | **String** | The currency the payment will be delivered in | [optional]
28
28
  **id** | **String** | | [optional]
29
+ **type** | **String** | Type of recipient to create - either person or business (defaults to person) | [optional]
29
30
  **errors** | **Hash<String, Array<ValidationErrorDescription>>** | The fields that have some problems and don't pass validation | [optional]
30
31
 
31
32
  ## Code Sample
@@ -55,6 +56,7 @@ instance = TransferZero::Recipient.new(requested_amount: 750.0,
55
56
  output_amount: 10000,
56
57
  output_currency: NGN,
57
58
  id: 97e79719-06e4-4794-aeeb-d2d9415d983a,
59
+ type: person,
58
60
  errors: {"phone_number":[{"error":"invalid"}],"documents":[{"error":"blank"}]})
59
61
  ```
60
62
 
@@ -4,8 +4,8 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **code** | **String** | Status code of failed transaction | [optional]
8
- **category** | **String** | Main category of error, it could be paid, unknown, pickupable, temporary_error, recipient_error, sender_error | [optional]
7
+ **code** | **String** | Status code of transaction | [optional]
8
+ **category** | **String** | Main category of status code, it could be paid, unknown, pickupable, temporary_error, recipient_error, sender_error, sender_action_required | [optional]
9
9
  **messages** | **Array<String>** | Tiered messages | [optional]
10
10
  **description** | **String** | Public, human readable, detailed error message | [optional]
11
11
 
@@ -17,7 +17,7 @@ require 'TransferZero'
17
17
  instance = TransferZero::RecipientStateReasonDetails.new(code: 311,
18
18
  category: temporary_error,
19
19
  messages: ["Temporary error","Switch Error","Issuer/Switch inoperative"],
20
- description: The central switch is not accepting transfers at the moment. We will retry the transaction. You can also edit or cancel this transaction.)
20
+ description: The central switch is not accepting transactions at the moment. We will retry the transaction)
21
21
  ```
22
22
 
23
23
 
data/docs/Sender.md CHANGED
@@ -41,6 +41,7 @@ Name | Type | Description | Notes
41
41
  **contact_person_email** | **String** | The contact's email address (used only with a Business sender) | [optional]
42
42
  **trading_country** | **String** | The Business trading country (used only with a Business sender) | [optional]
43
43
  **trading_address** | **String** | The Business trading address (used only with a Business sender) | [optional]
44
+ **trading_name** | **String** | The Business trading name (used only with a Business sender) | [optional]
44
45
  **number_monthly_transactions** | **String** | The estimated number of monthly transactions (used only with a Business sender) | [optional]
45
46
  **amount_monthly_transactions** | **String** | The estimated amount for all transactions each month in USD (used only with a Business sender) | [optional]
46
47
  **documents** | [**Array<Document>**](Document.md) | Needed for KYC checks. Required to approve the sender unless KYC is waived for your account. Please send us an empty list of documents: `\"documents\": [ ]` in the request if KYC has been waived. If the documents already exist, please send the Document ID eg. ```JSON \"documents\": [ { \"id\": \"b6648ba3-1c7b-4f59-8580-684899c84a07\" } ] ``` |
@@ -52,6 +53,7 @@ Name | Type | Description | Notes
52
53
  **city_of_birth** | **String** | City of birth of sender | [optional]
53
54
  **country_of_birth** | **String** | Country of birth of sender in 2-character alpha ISO 3166-2 country format | [optional]
54
55
  **gender** | **String** | The gender of the sender: - `M`: Male - `F`: Female - `O`: Other | [optional]
56
+ **sales_lead_id** | **String** | Sales Lead ID for tracking (optional) | [optional]
55
57
  **created_at** | **String** | Date and time of sender was created | [optional]
56
58
 
57
59
  ## Code Sample
@@ -96,6 +98,7 @@ instance = TransferZero::Sender.new(id: bf9ff782-e182-45ac-abea-5bce83ad6670,
96
98
  contact_person_email: null,
97
99
  trading_country: null,
98
100
  trading_address: null,
101
+ trading_name: null,
99
102
  number_monthly_transactions: null,
100
103
  amount_monthly_transactions: null,
101
104
  documents: [{"id":"b6648ba3-1c7b-4f59-8580-684899c84a07"}],
@@ -107,6 +110,7 @@ instance = TransferZero::Sender.new(id: bf9ff782-e182-45ac-abea-5bce83ad6670,
107
110
  city_of_birth: London,
108
111
  country_of_birth: GB,
109
112
  gender: M,
113
+ sales_lead_id: HF6HJVF67,
110
114
  created_at: 2019-01-11T00:00:00.001+0000)
111
115
  ```
112
116
 
@@ -0,0 +1,23 @@
1
+ # TransferZero::StateReasonDetails
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **code** | **String** | Status code of transaction | [optional]
8
+ **category** | **String** | Main category of status code, it could be paid, unknown, pickupable, temporary_error, recipient_error, sender_error, sender_action_required | [optional]
9
+ **messages** | **Array<String>** | Tiered messages | [optional]
10
+ **description** | **String** | Public, human readable, detailed error message | [optional]
11
+
12
+ ## Code Sample
13
+
14
+ ```ruby
15
+ require 'TransferZero'
16
+
17
+ instance = TransferZero::StateReasonDetails.new(code: 311,
18
+ category: temporary_error,
19
+ messages: ["Temporary error","Switch Error","Issuer/Switch inoperative"],
20
+ description: The central switch is not accepting transactions at the moment. We will retry the transaction)
21
+ ```
22
+
23
+
@@ -0,0 +1,244 @@
1
+ =begin
2
+ #TransferZero API
3
+
4
+ #Reference documentation for the TransferZero API V1
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.0.0-beta3
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module TransferZero
16
+ class PayinMethodsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+
24
+ # Deleting a payin method
25
+ # Initiates a cancellation request for the specified payin method
26
+ # @param payin_method_id ID of the payin method to delete. Example: `/v1/payin_methods/bf9ff782-e182-45ac-abea-5bce83ad6670`
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [PayinMethodResponse]
29
+ def delete_payin_method(payin_method_id, opts = {})
30
+ data, _status_code, _headers = delete_payin_method_with_http_info(payin_method_id, opts)
31
+ data
32
+ end
33
+
34
+ # Deleting a payin method
35
+ # Initiates a cancellation request for the specified payin method
36
+ # @param payin_method_id ID of the payin method to delete. Example: `/v1/payin_methods/bf9ff782-e182-45ac-abea-5bce83ad6670`
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(PayinMethodResponse, Fixnum, Hash)>] PayinMethodResponse data, response status code and response headers
39
+ def delete_payin_method_with_http_info(payin_method_id, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: PayinMethodsApi.delete_payin_method ...'
42
+ end
43
+ # verify the required parameter 'payin_method_id' is set
44
+ if @api_client.config.client_side_validation && payin_method_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'payin_method_id' when calling PayinMethodsApi.delete_payin_method"
46
+ end
47
+ # resource path
48
+ local_var_path = '/payin_methods/{PayinMethod ID}'.sub('{' + 'PayinMethod ID' + '}', payin_method_id.to_s)
49
+
50
+ # query parameters
51
+ query_params = {}
52
+
53
+ # header parameters
54
+ header_params = {}
55
+ # HTTP header 'Accept' (if needed)
56
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = {}
60
+
61
+ # http body (model)
62
+ post_body = nil
63
+ auth_names = ['AuthorizationKey', 'AuthorizationNonce', 'AuthorizationSecret', 'AuthorizationSignature']
64
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
65
+ :header_params => header_params,
66
+ :query_params => query_params,
67
+ :form_params => form_params,
68
+ :body => post_body,
69
+ :auth_names => auth_names,
70
+ :return_type => 'PayinMethodResponse')
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: PayinMethodsApi#delete_payin_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+
77
+
78
+ # Fetching a payin method
79
+ # Show a payin method by id
80
+ # @param payin_method_id ID of the payin method to get. Example: &#x60;/v1/payin_methods/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
81
+ # @param [Hash] opts the optional parameters
82
+ # @return [PayinMethodResponse]
83
+ def get_payin_method(payin_method_id, opts = {})
84
+ data, _status_code, _headers = get_payin_method_with_http_info(payin_method_id, opts)
85
+ data
86
+ end
87
+
88
+ # Fetching a payin method
89
+ # Show a payin method by id
90
+ # @param payin_method_id ID of the payin method to get. Example: &#x60;/v1/payin_methods/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [Array<(PayinMethodResponse, Fixnum, Hash)>] PayinMethodResponse data, response status code and response headers
93
+ def get_payin_method_with_http_info(payin_method_id, opts = {})
94
+ if @api_client.config.debugging
95
+ @api_client.config.logger.debug 'Calling API: PayinMethodsApi.get_payin_method ...'
96
+ end
97
+ # verify the required parameter 'payin_method_id' is set
98
+ if @api_client.config.client_side_validation && payin_method_id.nil?
99
+ fail ArgumentError, "Missing the required parameter 'payin_method_id' when calling PayinMethodsApi.get_payin_method"
100
+ end
101
+ # resource path
102
+ local_var_path = '/payin_methods/{PayinMethod ID}'.sub('{' + 'PayinMethod ID' + '}', payin_method_id.to_s)
103
+
104
+ # query parameters
105
+ query_params = {}
106
+
107
+ # header parameters
108
+ header_params = {}
109
+ # HTTP header 'Accept' (if needed)
110
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
111
+
112
+ # form parameters
113
+ form_params = {}
114
+
115
+ # http body (model)
116
+ post_body = nil
117
+ auth_names = ['AuthorizationKey', 'AuthorizationNonce', 'AuthorizationSecret', 'AuthorizationSignature']
118
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
119
+ :header_params => header_params,
120
+ :query_params => query_params,
121
+ :form_params => form_params,
122
+ :body => post_body,
123
+ :auth_names => auth_names,
124
+ :return_type => 'PayinMethodResponse')
125
+ if @api_client.config.debugging
126
+ @api_client.config.logger.debug "API called: PayinMethodsApi#get_payin_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
127
+ end
128
+ return data, status_code, headers
129
+ end
130
+
131
+
132
+ # Updating a payin method
133
+ # Updates the payin method specified in the URL path.
134
+ # @param payin_method_id ID of the payin method to get. Example: &#x60;/v1/payin_methods/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
135
+ # @param payin_method
136
+ # @param [Hash] opts the optional parameters
137
+ # @return [PayinMethodResponse]
138
+ def patch_payin_method(payin_method_id, payin_method, opts = {})
139
+ data, _status_code, _headers = patch_payin_method_with_http_info(payin_method_id, payin_method, opts)
140
+ data
141
+ end
142
+
143
+ # Updating a payin method
144
+ # Updates the payin method specified in the URL path.
145
+ # @param payin_method_id ID of the payin method to get. Example: &#x60;/v1/payin_methods/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
146
+ # @param payin_method
147
+ # @param [Hash] opts the optional parameters
148
+ # @return [Array<(PayinMethodResponse, Fixnum, Hash)>] PayinMethodResponse data, response status code and response headers
149
+ def patch_payin_method_with_http_info(payin_method_id, payin_method, opts = {})
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug 'Calling API: PayinMethodsApi.patch_payin_method ...'
152
+ end
153
+ # verify the required parameter 'payin_method_id' is set
154
+ if @api_client.config.client_side_validation && payin_method_id.nil?
155
+ fail ArgumentError, "Missing the required parameter 'payin_method_id' when calling PayinMethodsApi.patch_payin_method"
156
+ end
157
+ # verify the required parameter 'payin_method' is set
158
+ if @api_client.config.client_side_validation && payin_method.nil?
159
+ fail ArgumentError, "Missing the required parameter 'payin_method' when calling PayinMethodsApi.patch_payin_method"
160
+ end
161
+ # resource path
162
+ local_var_path = '/payin_methods/{PayinMethod ID}'.sub('{' + 'PayinMethod ID' + '}', payin_method_id.to_s)
163
+
164
+ # query parameters
165
+ query_params = {}
166
+
167
+ # header parameters
168
+ header_params = {}
169
+ # HTTP header 'Accept' (if needed)
170
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
171
+ # HTTP header 'Content-Type'
172
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
173
+
174
+ # form parameters
175
+ form_params = {}
176
+
177
+ # http body (model)
178
+ post_body = @api_client.object_to_http_body(payin_method)
179
+ auth_names = ['AuthorizationKey', 'AuthorizationNonce', 'AuthorizationSecret', 'AuthorizationSignature']
180
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
181
+ :header_params => header_params,
182
+ :query_params => query_params,
183
+ :form_params => form_params,
184
+ :body => post_body,
185
+ :auth_names => auth_names,
186
+ :return_type => 'PayinMethodResponse')
187
+ if @api_client.config.debugging
188
+ @api_client.config.logger.debug "API called: PayinMethodsApi#patch_payin_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
189
+ end
190
+ return data, status_code, headers
191
+ end
192
+
193
+
194
+ # Retries PayinMethod
195
+ # Retries the collection process for the payin method. Please note only payin methods in `error` state can be retried.
196
+ # @param payin_method_id ID of the payin method whose collection process should be retried Example: &#x60;/v1/payin_methods/9d4d7b73-a94c-4979-ab57-09074fd55d33/retry&#x60;
197
+ # @param [Hash] opts the optional parameters
198
+ # @return [nil]
199
+ def retry_payin_method(payin_method_id, opts = {})
200
+ retry_payin_method_with_http_info(payin_method_id, opts)
201
+ nil
202
+ end
203
+
204
+ # Retries PayinMethod
205
+ # Retries the collection process for the payin method. Please note only payin methods in &#x60;error&#x60; state can be retried.
206
+ # @param payin_method_id ID of the payin method whose collection process should be retried Example: &#x60;/v1/payin_methods/9d4d7b73-a94c-4979-ab57-09074fd55d33/retry&#x60;
207
+ # @param [Hash] opts the optional parameters
208
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
209
+ def retry_payin_method_with_http_info(payin_method_id, opts = {})
210
+ if @api_client.config.debugging
211
+ @api_client.config.logger.debug 'Calling API: PayinMethodsApi.retry_payin_method ...'
212
+ end
213
+ # verify the required parameter 'payin_method_id' is set
214
+ if @api_client.config.client_side_validation && payin_method_id.nil?
215
+ fail ArgumentError, "Missing the required parameter 'payin_method_id' when calling PayinMethodsApi.retry_payin_method"
216
+ end
217
+ # resource path
218
+ local_var_path = '/payin_methods/{PayinMethod ID}/retry'.sub('{' + 'PayinMethod ID' + '}', payin_method_id.to_s)
219
+
220
+ # query parameters
221
+ query_params = {}
222
+
223
+ # header parameters
224
+ header_params = {}
225
+
226
+ # form parameters
227
+ form_params = {}
228
+
229
+ # http body (model)
230
+ post_body = nil
231
+ auth_names = ['AuthorizationKey', 'AuthorizationNonce', 'AuthorizationSecret', 'AuthorizationSignature']
232
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
233
+ :header_params => header_params,
234
+ :query_params => query_params,
235
+ :form_params => form_params,
236
+ :body => post_body,
237
+ :auth_names => auth_names)
238
+ if @api_client.config.debugging
239
+ @api_client.config.logger.debug "API called: PayinMethodsApi#retry_payin_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
240
+ end
241
+ return data, status_code, headers
242
+ end
243
+ end
244
+ end
@@ -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.16.0"
38
+ @user_agent = "TransferZero-SDK/Ruby/1.19.0"
39
39
  @default_headers = {
40
40
  'Content-Type' => 'application/json',
41
41
  'User-Agent' => @user_agent
@@ -50,6 +50,9 @@ class Document
50
50
  # Document expiry date issued by government
51
51
  attr_accessor :expiry_date
52
52
 
53
+ # Determines the document's source. Default value \"Manual\"
54
+ attr_accessor :source
55
+
53
56
  # The fields that have some problems and don't pass validation
54
57
  attr_accessor :errors
55
58
 
@@ -91,6 +94,7 @@ class Document
91
94
  :'id' => :'id',
92
95
  :'document_id' => :'document_id',
93
96
  :'expiry_date' => :'expiry_date',
97
+ :'source' => :'source',
94
98
  :'errors' => :'errors'
95
99
  }
96
100
  end
@@ -111,6 +115,7 @@ class Document
111
115
  :'id' => :'String',
112
116
  :'document_id' => :'String',
113
117
  :'expiry_date' => :'Date',
118
+ :'source' => :'String',
114
119
  :'errors' => :'Hash<String, Array<ValidationErrorDescription>>'
115
120
  }
116
121
  end
@@ -182,6 +187,10 @@ class Document
182
187
  self.expiry_date = attributes[:'expiry_date']
183
188
  end
184
189
 
190
+ if attributes.key?(:'source')
191
+ self.source = attributes[:'source']
192
+ end
193
+
185
194
  if attributes.key?(:'errors')
186
195
  if (value = attributes[:'errors']).is_a?(Hash)
187
196
  self.errors = value
@@ -242,6 +251,7 @@ class Document
242
251
  id == o.id &&
243
252
  document_id == o.document_id &&
244
253
  expiry_date == o.expiry_date &&
254
+ source == o.source &&
245
255
  errors == o.errors
246
256
  end
247
257
 
@@ -254,7 +264,7 @@ class Document
254
264
  # Calculates hash code according to all attributes.
255
265
  # @return [Integer] Hash code
256
266
  def hash
257
- [upload, url, upload_file_name, metadata, upload_content_type, upload_file_size, category, side, document_type, issuing_country, id, document_id, expiry_date, errors].hash
267
+ [upload, url, upload_file_name, metadata, upload_content_type, upload_file_size, category, side, document_type, issuing_country, id, document_id, expiry_date, source, errors].hash
258
268
  end
259
269
 
260
270
  require 'active_support/core_ext/hash'