transferzero-sdk 1.3.0 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -18
  3. data/docs/AccountMeta.md +1 -1
  4. data/docs/AccountValidationApi.md +4 -4
  5. data/docs/AccountValidationRequest.md +6 -4
  6. data/docs/Currency.md +1 -1
  7. data/docs/CurrencyExchange.md +1 -1
  8. data/docs/CurrencyOpposite.md +1 -1
  9. data/docs/Document.md +5 -1
  10. data/docs/DocumentsApi.md +74 -2
  11. data/docs/FieldSelectValidation.md +1 -1
  12. data/docs/FieldValidation.md +1 -1
  13. data/docs/PayinMethod.md +4 -4
  14. data/docs/PayinMethodDetails.md +5 -3
  15. data/docs/PayinMethodDetailsMobile.md +1 -1
  16. data/docs/PayinMethodDetailsNGNBank.md +4 -2
  17. data/docs/PaymentMethod.md +2 -2
  18. data/docs/PaymentMethodOpposite.md +2 -2
  19. data/docs/PayoutMethod.md +1 -1
  20. data/docs/PayoutMethodDetails.md +5 -3
  21. data/docs/PayoutMethodDetailsNGNBank.md +1 -1
  22. data/docs/PayoutMethodDetailsXOFBank.md +25 -0
  23. data/docs/PoliticallyExposedPerson.md +31 -0
  24. data/docs/Recipient.md +3 -3
  25. data/docs/RecipientsApi.md +2 -2
  26. data/docs/Sender.md +2 -0
  27. data/docs/Transaction.md +5 -5
  28. data/docs/TransactionTraits.md +2 -2
  29. data/docs/TransactionsApi.md +64 -0
  30. data/example/client.rb +14 -14
  31. data/git_push.sh +1 -1
  32. data/lib/transferzero-sdk.rb +2 -7
  33. data/lib/transferzero-sdk/api/account_validation_api.rb +4 -4
  34. data/lib/transferzero-sdk/api/documents_api.rb +63 -0
  35. data/lib/transferzero-sdk/api/recipients_api.rb +2 -2
  36. data/lib/transferzero-sdk/api/transactions_api.rb +59 -0
  37. data/lib/transferzero-sdk/api_client.rb +1 -1
  38. data/lib/transferzero-sdk/models/account_validation_request.rb +15 -15
  39. data/lib/transferzero-sdk/models/currency_exchange.rb +1 -2
  40. data/lib/transferzero-sdk/models/currency_opposite.rb +1 -2
  41. data/lib/transferzero-sdk/models/document.rb +20 -1
  42. data/lib/transferzero-sdk/models/document_webhook.rb +0 -1
  43. data/lib/transferzero-sdk/models/payin_method.rb +4 -4
  44. data/lib/transferzero-sdk/models/payin_method_details.rb +12 -7
  45. data/lib/transferzero-sdk/models/payin_method_details_ngn_bank.rb +11 -6
  46. data/lib/transferzero-sdk/models/payout_method.rb +1 -1
  47. data/lib/transferzero-sdk/models/payout_method_details.rb +25 -15
  48. data/lib/transferzero-sdk/models/payout_method_details_ngn_bank.rb +0 -5
  49. data/lib/transferzero-sdk/models/{currency_opposite_all_of.rb → payout_method_details_xof_bank.rb} +69 -18
  50. data/lib/transferzero-sdk/models/payout_method_webhook.rb +0 -1
  51. data/lib/transferzero-sdk/models/{payout_method_webhook_all_of.rb → politically_exposed_person.rb} +81 -10
  52. data/lib/transferzero-sdk/models/recipient_webhook.rb +0 -1
  53. data/lib/transferzero-sdk/models/sender.rb +14 -2
  54. data/lib/transferzero-sdk/models/sender_state.rb +1 -0
  55. data/lib/transferzero-sdk/models/sender_webhook.rb +0 -1
  56. data/lib/transferzero-sdk/models/transaction.rb +2 -2
  57. data/lib/transferzero-sdk/models/transaction_state.rb +1 -0
  58. data/lib/transferzero-sdk/models/transaction_traits.rb +3 -3
  59. data/lib/transferzero-sdk/models/transaction_webhook.rb +0 -1
  60. data/lib/transferzero-sdk/models/webhook.rb +1 -1
  61. data/lib/transferzero-sdk/version.rb +1 -1
  62. data/spec/api/account_validation_api_spec.rb +2 -2
  63. data/spec/api/currency_info_api_spec.rb +2 -0
  64. data/spec/api/documents_api_spec.rb +15 -0
  65. data/spec/api/recipients_api_spec.rb +1 -1
  66. data/spec/api/transactions_api_spec.rb +13 -0
  67. data/spec/models/account_validation_request_spec.rb +7 -1
  68. data/spec/models/currency_opposite_spec.rb +6 -0
  69. data/spec/models/document_spec.rb +12 -0
  70. data/spec/models/payin_method_details_ngn_bank_spec.rb +6 -0
  71. data/spec/models/payin_method_details_spec.rb +6 -0
  72. data/spec/models/payout_method_details_spec.rb +7 -1
  73. data/spec/models/payout_method_details_xof_bank_spec.rb +65 -0
  74. data/spec/models/politically_exposed_person_spec.rb +83 -0
  75. data/spec/models/recipient_spec.rb +6 -0
  76. data/spec/models/sender_spec.rb +16 -0
  77. data/transferzero-sdk.gemspec +2 -2
  78. metadata +17 -46
  79. data/Gemfile.lock +0 -93
  80. data/docs/CurrencyExchangeAllOf.md +0 -17
  81. data/docs/CurrencyOppositeAllOf.md +0 -19
  82. data/docs/DocumentWebhookAllOf.md +0 -17
  83. data/docs/PayoutMethodWebhookAllOf.md +0 -17
  84. data/docs/RecipientWebhookAllOf.md +0 -17
  85. data/docs/SenderWebhookAllOf.md +0 -17
  86. data/docs/TransactionWebhookAllOf.md +0 -17
  87. data/lib/transferzero-sdk/models/currency_exchange_all_of.rb +0 -204
  88. data/lib/transferzero-sdk/models/document_webhook_all_of.rb +0 -201
  89. data/lib/transferzero-sdk/models/recipient_webhook_all_of.rb +0 -201
  90. data/lib/transferzero-sdk/models/sender_webhook_all_of.rb +0 -201
  91. data/lib/transferzero-sdk/models/transaction_webhook_all_of.rb +0 -201
  92. data/spec/api_client_spec.rb +0 -189
  93. data/spec/models/currency_exchange_all_of_spec.rb +0 -41
  94. data/spec/models/currency_opposite_all_of_spec.rb +0 -41
  95. data/spec/models/document_webhook_all_of_spec.rb +0 -41
  96. data/spec/models/payout_method_webhook_all_of_spec.rb +0 -41
  97. data/spec/models/recipient_webhook_all_of_spec.rb +0 -41
  98. data/spec/models/sender_webhook_all_of_spec.rb +0 -41
  99. data/spec/models/transaction_webhook_all_of_spec.rb +0 -41
@@ -43,7 +43,6 @@ module TransferZero
43
43
  # List of class defined in allOf (OpenAPI v3)
44
44
  def self.openapi_all_of
45
45
  [
46
- :'PayoutMethodWebhookAllOf',
47
46
  :'Webhook'
48
47
  ]
49
48
  end
@@ -13,20 +13,56 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- class PayoutMethodWebhookAllOf
17
- attr_accessor :object
16
+ # 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 { \"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\" } ```
17
+ class PoliticallyExposedPerson
18
+ attr_accessor :id
19
+
20
+ # Full name of the politically exposed person
21
+ attr_accessor :name
22
+
23
+ # The office held by the politically exposed person
24
+ attr_accessor :position
25
+
26
+ # The date on which the person started holding the office
27
+ attr_accessor :started_date
28
+
29
+ # The date on which the person ended holding the office
30
+ attr_accessor :ended_date
31
+
32
+ # The ID of the Sender to whom the person is attached to
33
+ attr_accessor :sender_id
34
+
35
+ # Date and time the person was created
36
+ attr_accessor :created_at
37
+
38
+ # Date and time the person was updated
39
+ attr_accessor :updated_at
18
40
 
19
41
  # Attribute mapping from ruby-style variable name to JSON key.
20
42
  def self.attribute_map
21
43
  {
22
- :'object' => :'object'
44
+ :'id' => :'id',
45
+ :'name' => :'name',
46
+ :'position' => :'position',
47
+ :'started_date' => :'started_date',
48
+ :'ended_date' => :'ended_date',
49
+ :'sender_id' => :'sender_id',
50
+ :'created_at' => :'created_at',
51
+ :'updated_at' => :'updated_at'
23
52
  }
24
53
  end
25
54
 
26
55
  # Attribute type mapping.
27
56
  def self.openapi_types
28
57
  {
29
- :'object' => :'PayoutMethod'
58
+ :'id' => :'Integer',
59
+ :'name' => :'String',
60
+ :'position' => :'String',
61
+ :'started_date' => :'DateTime',
62
+ :'ended_date' => :'DateTime',
63
+ :'sender_id' => :'String',
64
+ :'created_at' => :'DateTime',
65
+ :'updated_at' => :'DateTime'
30
66
  }
31
67
  end
32
68
 
@@ -34,19 +70,47 @@ module TransferZero
34
70
  # @param [Hash] attributes Model attributes in the form of hash
35
71
  def initialize(attributes = {})
36
72
  if (!attributes.is_a?(Hash))
37
- fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PayoutMethodWebhookAllOf` initialize method"
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TransferZero::PoliticallyExposedPerson` initialize method"
38
74
  end
39
75
 
40
76
  # check to see if the attribute exists and convert string to symbol for hash key
41
77
  attributes = attributes.each_with_object({}) { |(k, v), h|
42
78
  if (!self.class.attribute_map.key?(k.to_sym))
43
- fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PayoutMethodWebhookAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
79
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TransferZero::PoliticallyExposedPerson`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
44
80
  end
45
81
  h[k.to_sym] = v
46
82
  }
47
83
 
48
- if attributes.key?(:'object')
49
- self.object = attributes[:'object']
84
+ if attributes.key?(:'id')
85
+ self.id = attributes[:'id']
86
+ end
87
+
88
+ if attributes.key?(:'name')
89
+ self.name = attributes[:'name']
90
+ end
91
+
92
+ if attributes.key?(:'position')
93
+ self.position = attributes[:'position']
94
+ end
95
+
96
+ if attributes.key?(:'started_date')
97
+ self.started_date = attributes[:'started_date']
98
+ end
99
+
100
+ if attributes.key?(:'ended_date')
101
+ self.ended_date = attributes[:'ended_date']
102
+ end
103
+
104
+ if attributes.key?(:'sender_id')
105
+ self.sender_id = attributes[:'sender_id']
106
+ end
107
+
108
+ if attributes.key?(:'created_at')
109
+ self.created_at = attributes[:'created_at']
110
+ end
111
+
112
+ if attributes.key?(:'updated_at')
113
+ self.updated_at = attributes[:'updated_at']
50
114
  end
51
115
  end
52
116
 
@@ -68,7 +132,14 @@ module TransferZero
68
132
  def ==(o)
69
133
  return true if self.equal?(o)
70
134
  self.class == o.class &&
71
- object == o.object
135
+ id == o.id &&
136
+ name == o.name &&
137
+ position == o.position &&
138
+ started_date == o.started_date &&
139
+ ended_date == o.ended_date &&
140
+ sender_id == o.sender_id &&
141
+ created_at == o.created_at &&
142
+ updated_at == o.updated_at
72
143
  end
73
144
 
74
145
  # @see the `==` method
@@ -80,7 +151,7 @@ module TransferZero
80
151
  # Calculates hash code according to all attributes.
81
152
  # @return [Integer] Hash code
82
153
  def hash
83
- [object].hash
154
+ [id, name, position, started_date, ended_date, sender_id, created_at, updated_at].hash
84
155
  end
85
156
 
86
157
  require 'active_support/core_ext/hash'
@@ -43,7 +43,6 @@ module TransferZero
43
43
  # List of class defined in allOf (OpenAPI v3)
44
44
  def self.openapi_all_of
45
45
  [
46
- :'RecipientWebhookAllOf',
47
46
  :'Webhook'
48
47
  ]
49
48
  end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- # This contains the details of the sender. The first time a specific sender is used the full details should be provided. Once a sender is created and is used, the next time you MUST only send the ID of the sender. This is so we can match the same sender across multiple transactions for KYC and audit purposes. Personal Sender Example: ```json { \"country\": \"UG\", \"phone_country\": \"UG\", \"phone_number\": \"752403639\", \"email\": \"example@home.org\", \"first_name\": \"Johnny\", \"last_name\": \"English\", \"city\": \"Kampala\", \"street\": \"Unknown 17-3\", \"address_description\": \"Description of address\", \"postal_code\": \"798983\", \"birth_date\": \"1900-12-31\", \"documents\": [ ], \"ip\": \"127.0.0.1\", \"identification_number\": \"AB123456\", \"identification_type\": \"ID\", \"external_id\": \"806ec63a-a5a7-43cc-9d75-1ee74fbcc026\", \"metadata\": { } } ``` Business Sender Example: ```json { \"type\": \"business\", \"country\": \"UG\", \"phone_country\": \"UG\", \"phone_number\": \"752403639\", \"email\": \"example@home.org\", \"name\": \"MyCompany\", \"city\": \"Kampala\", \"street\": \"Unknown 17-3\", \"postal_code\": \"798983\", \"address_description\": \"Description of address\", \"documents\": [ ], \"ip\": \"127.0.0.1\", \"identification_number\": \"AB123456\", \"identification_type\": \"ID\", \"external_id\": \"806ec63a-a5a7-43cc-9d75-1ee74fbcc026\", \"metadata\": { } } ``` [Sender in the API documentation](https://github.com/transferzero/api-documentation/blob/master/transaction-flow.md#sender)
16
+ # This contains the details of the sender. The first time a specific sender is used the full details should be provided. Once a sender is created and is used, the next time you MUST only send the ID of the sender. This is so we can match the same sender across multiple transactions for KYC and audit purposes. Personal Sender Example: ```json { \"country\": \"UG\", \"phone_country\": \"UG\", \"phone_number\": \"752403639\", \"email\": \"example@home.org\", \"first_name\": \"Johnny\", \"last_name\": \"English\", \"city\": \"Kampala\", \"street\": \"Unknown 17-3\", \"address_description\": \"Description of address\", \"postal_code\": \"798983\", \"birth_date\": \"1900-12-31\", \"documents\": [ ], \"ip\": \"127.0.0.1\", \"identification_number\": \"AB123456\", \"identification_type\": \"ID\", \"external_id\": \"806ec63a-a5a7-43cc-9d75-1ee74fbcc026\", \"metadata\": { } } ``` Business Sender Example: ```json { \"type\": \"business\", \"country\": \"UG\", \"phone_country\": \"UG\", \"phone_number\": \"752403639\", \"email\": \"example@home.org\", \"name\": \"MyCompany\", \"city\": \"Kampala\", \"street\": \"Unknown 17-3\", \"postal_code\": \"798983\", \"address_description\": \"Description of address\", \"documents\": [ ], \"ip\": \"127.0.0.1\", \"identification_number\": \"AB123456\", \"identification_type\": \"ID\", \"external_id\": \"806ec63a-a5a7-43cc-9d75-1ee74fbcc026\", \"metadata\": { } } ``` [Sender in the API documentation](https://docs.transferzero.com/docs/transaction-flow/#sender)
17
17
  class Sender
18
18
  # Type of sender to create - either person or business (defaults to person)
19
19
  attr_accessor :type
@@ -84,6 +84,9 @@ module TransferZero
84
84
  # 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\" } ] ```
85
85
  attr_accessor :documents
86
86
 
87
+ # A 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 { \"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\" } ```
88
+ attr_accessor :politically_exposed_people
89
+
87
90
  # Metadata of sender. You can store any detail specific to your integration here (for example the local ID of the sender on your end). When requesting sender details you will receive the sent metadata back. Also when sending sender related webhooks you will receive the details stored here as well.
88
91
  attr_accessor :metadata
89
92
 
@@ -145,6 +148,7 @@ module TransferZero
145
148
  :'identification_number' => :'identification_number',
146
149
  :'identification_type' => :'identification_type',
147
150
  :'documents' => :'documents',
151
+ :'politically_exposed_people' => :'politically_exposed_people',
148
152
  :'metadata' => :'metadata',
149
153
  :'state' => :'state',
150
154
  :'id' => :'id',
@@ -179,6 +183,7 @@ module TransferZero
179
183
  :'identification_number' => :'String',
180
184
  :'identification_type' => :'String',
181
185
  :'documents' => :'Array<Document>',
186
+ :'politically_exposed_people' => :'Array<PoliticallyExposedPerson>',
182
187
  :'metadata' => :'Object',
183
188
  :'state' => :'SenderState',
184
189
  :'id' => :'String',
@@ -296,6 +301,12 @@ module TransferZero
296
301
  end
297
302
  end
298
303
 
304
+ if attributes.key?(:'politically_exposed_people')
305
+ if (value = attributes[:'politically_exposed_people']).is_a?(Array)
306
+ self.politically_exposed_people = value
307
+ end
308
+ end
309
+
299
310
  if attributes.key?(:'metadata')
300
311
  self.metadata = attributes[:'metadata']
301
312
  end
@@ -424,6 +435,7 @@ module TransferZero
424
435
  identification_number == o.identification_number &&
425
436
  identification_type == o.identification_type &&
426
437
  documents == o.documents &&
438
+ politically_exposed_people == o.politically_exposed_people &&
427
439
  metadata == o.metadata &&
428
440
  state == o.state &&
429
441
  id == o.id &&
@@ -440,7 +452,7 @@ module TransferZero
440
452
  # Calculates hash code according to all attributes.
441
453
  # @return [Integer] Hash code
442
454
  def hash
443
- [type, country, phone_country, phone_number, email, first_name, middle_name, last_name, occupation, nationality, onboarding_status, address, description, name, city, street, address_description, postal_code, birth_date, ip, identification_number, identification_type, documents, metadata, state, id, external_id, errors].hash
455
+ [type, country, phone_country, phone_number, email, first_name, middle_name, last_name, occupation, nationality, onboarding_status, address, description, name, city, street, address_description, postal_code, birth_date, ip, identification_number, identification_type, documents, politically_exposed_people, metadata, state, id, external_id, errors].hash
444
456
  end
445
457
 
446
458
  require 'active_support/core_ext/hash'
@@ -20,6 +20,7 @@ module TransferZero
20
20
  BANNED = "banned".freeze
21
21
  REJECTED = "rejected".freeze
22
22
  DISABLED = "disabled".freeze
23
+ INCOMPLETE = "incomplete".freeze
23
24
 
24
25
  # Builds the enum from string
25
26
  # @param [String] The enum value in the form of the string
@@ -43,7 +43,6 @@ module TransferZero
43
43
  # List of class defined in allOf (OpenAPI v3)
44
44
  def self.openapi_all_of
45
45
  [
46
- :'SenderWebhookAllOf',
47
46
  :'Webhook'
48
47
  ]
49
48
  end
@@ -18,7 +18,7 @@ module TransferZero
18
18
  # The input currency describes what currency the transaction will be paid in (3-character alpha ISO 4217 currency format). For example if you wish to create an EUR to NGN transaction then input currency should be set to EUR.
19
19
  attr_accessor :input_currency
20
20
 
21
- # Allows setting alternative collections, where funding the transaction is done through alternative means and not via account balance. For more information please see [Collections from senders](https://github.com/transferzero/api-documentation/blob/master/additional-features.md#collections-from-senders) in the API documentation
21
+ # Allows setting alternative collections, where funding the transaction is done through alternative means and not via account balance. For more information please see [Collections from senders](https://docs.transferzero.com/docs/additional-features/#collections-from-senders) in the API documentation
22
22
  attr_accessor :payin_methods
23
23
 
24
24
  # Additional metadata to store on the transaction. If you widh to store your local transaction ID, you should add it here inside a `sendRef` field, and we will return this value back to you in the daily transaction reports.
@@ -51,7 +51,7 @@ module TransferZero
51
51
  # The latest time when the transaction has to be funded, otherwise it will be cancelled
52
52
  attr_accessor :expires_at
53
53
 
54
- # 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.
54
+ # Optional ID that is supplied by partner linking it to the partner's own Transaction ID. Note: if present we will validate whether the sent ID is a duplicate in our system or not.
55
55
  attr_accessor :external_id
56
56
 
57
57
  attr_accessor :id
@@ -23,6 +23,7 @@ module TransferZero
23
23
  PAID = "paid".freeze
24
24
  CANCELED = "canceled".freeze
25
25
  REFUNDED = "refunded".freeze
26
+ PROCESSING = "processing".freeze
26
27
  EXCEPTION = "exception".freeze
27
28
 
28
29
  # Builds the enum from string
@@ -13,12 +13,12 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- # Additional features that are enabled on the transaction. For more details please see [Additional features](https://github.com/transferzero/api-documentation/blob/master/additional-features.md) in our API documentation
16
+ # Additional features that are enabled on the transaction. For more details please see [Additional features](https://docs.transferzero.com/docs/additional-features/) in our API documentation
17
17
  class TransactionTraits
18
- # Enables or disables the auto refund functionality. Please see [Auto cancellation and refund of transactions](https://github.com/transferzero/api-documentation/blob/master/additional-features.md#auto-cancellation-and-refund-of-transactions) for more details
18
+ # Enables or disables the auto refund functionality. Please see [Auto cancellation and refund of transactions](https://docs.transferzero.com/docs/additional-features/#auto-cancellation-and-refund-of-transactions) for more details
19
19
  attr_accessor :auto_refund
20
20
 
21
- # Enabled or disables the name validation functionality. Please see [Name validation in transactions](https://github.com/transferzero/api-documentation/blob/master/additional-features.md#name-validation-in-transactions) for more details
21
+ # Enabled or disables the name validation functionality. Please see [Name validation in transactions](https://docs.transferzero.com/docs/additional-features/#name-validation-in-transactions) for more details
22
22
  attr_accessor :account_validation
23
23
 
24
24
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -43,7 +43,6 @@ module TransferZero
43
43
  # List of class defined in allOf (OpenAPI v3)
44
44
  def self.openapi_all_of
45
45
  [
46
- :'TransactionWebhookAllOf',
47
46
  :'Webhook'
48
47
  ]
49
48
  end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.0.0-beta3
13
13
  require 'date'
14
14
 
15
15
  module TransferZero
16
- # Whenever objects in the TransferZero API change state, we can optionally send the changed details to a pre-registered webhook address. Webhooks can be created either using the [developer portal](https://developers.transferzero.com), or using the [TransferZero API](#operations-tag-Webhooks). Whenever possible we prefer using webhooks to listen on events (for example when a transaction has been paid out) instead of polling the status, and we expect implementations fully utilising webhooks. Webhooks will always generate a `POST` request to the specified endpoint, and will also include the same authentication headers as described in the [authentication documentation](https://github.com/transferzero/api-documentation/blob/master/authentication.md), so their validity can be verified on the receiver end.
16
+ # Whenever objects in the TransferZero API change state, we can optionally send the changed details to a pre-registered webhook address. Webhooks can be created either using the [developer portal](https://developers.transferzero.com), or using the [TransferZero API](#operations-tag-Webhooks). Whenever possible we prefer using webhooks to listen on events (for example when a transaction has been paid out) instead of polling the status, and we expect implementations fully utilising webhooks. Webhooks will always generate a `POST` request to the specified endpoint, and will also include the same authentication headers as described in the [authentication documentation](https://docs.transferzero.com/docs/authentication), so their validity can be verified on the receiver end.
17
17
  class Webhook
18
18
  # The ID of the webhook that was used to send out this callback
19
19
  attr_accessor :webhook
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.0.0-beta3
11
11
  =end
12
12
 
13
13
  module TransferZero
14
- VERSION = '1.3.0'
14
+ VERSION = '1.8.0'
15
15
  end
@@ -33,8 +33,8 @@ describe 'AccountValidationApi' do
33
33
  end
34
34
 
35
35
  # unit tests for post_account_validations
36
- # Validates the existence of a bank account
37
- # Validates the existence of a bank account and returns the associated customer name
36
+ # Validates the existence of a bank account or a mobile phone number
37
+ # Validates the existence of a bank account or mobile phone number and returns the associated customer name
38
38
  # @param account_validation_request
39
39
  # @param [Hash] opts the optional parameters
40
40
  # @return [AccountValidationResponse]
@@ -47,6 +47,7 @@ describe 'CurrencyInfoApi' do
47
47
  # Getting a list of possible input currencies
48
48
  # Fetches a list of currencies available to use as the input currency in other API requests. Usually the 3-character alpha ISO 4217 currency code (eg. USD) is used as the identifier. Use this endpoint to determine the current exchange rate from a specific input currency to any output currency that&#39;s available.
49
49
  # @param [Hash] opts the optional parameters
50
+ # @option opts [String] :sender_id Allows the scoping of the results by &#x60;sender_id&#x60; (optional). Example: &#x60;/v1/info/currencies/in?sender_id&#x3D;26ec8517-2f0d-48c0-b74f-0bccb9ab3a87&#x60;
50
51
  # @return [CurrencyExchangeListResponse]
51
52
  describe 'info_currencies_in test' do
52
53
  it 'should work' do
@@ -58,6 +59,7 @@ describe 'CurrencyInfoApi' do
58
59
  # Getting a list of possible output currencies
59
60
  # Fetches a list of currencies available to use as the output currency and their exchange rates against the available input currencies. Usually the 3-character alpha ISO 4217 currency code (eg. USD) is used as the identifier.
60
61
  # @param [Hash] opts the optional parameters
62
+ # @option opts [String] :sender_id Allows the scoping of the results by &#x60;sender_id&#x60; (optional). Example: &#x60;/v1/info/currencies/out?sender_id&#x3D;26ec8517-2f0d-48c0-b74f-0bccb9ab3a87&#x60;
61
63
  # @return [CurrencyExchangeListResponse]
62
64
  describe 'info_currencies_out test' do
63
65
  it 'should work' do
@@ -32,11 +32,25 @@ describe 'DocumentsApi' do
32
32
  end
33
33
  end
34
34
 
35
+ # unit tests for delete_document
36
+ # Deleting a document
37
+ # Deletes a single document by the Document ID
38
+ # @param document_id ID of the document to delete. Example: &#x60;/v1/document/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
39
+ # @param [Hash] opts the optional parameters
40
+ # @option opts [String] :sender_id Allows filtering results by &#x60;sender_id&#x60;. Example: &#x60;/v1/transactions?sender_id&#x3D;b41d3cb7-6c54-4245-85fc-8e30690eb0f7&#x60;
41
+ # @return [DocumentResponse]
42
+ describe 'delete_document test' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
+ end
46
+ end
47
+
35
48
  # unit tests for get_document
36
49
  # Fetching a document
37
50
  # Returns a single document by the Documents ID
38
51
  # @param document_id ID of the document to get. Example: &#x60;/v1/documents/bf9ff782-e182-45ac-abea-5bce83ad6670&#x60;
39
52
  # @param [Hash] opts the optional parameters
53
+ # @option opts [String] :sender_id Allows filtering results by &#x60;sender_id&#x60;. Example: &#x60;/v1/transactions?sender_id&#x3D;b41d3cb7-6c54-4245-85fc-8e30690eb0f7&#x60;
40
54
  # @return [DocumentResponse]
41
55
  describe 'get_document test' do
42
56
  it 'should work' do
@@ -50,6 +64,7 @@ describe 'DocumentsApi' do
50
64
  # @param [Hash] opts the optional parameters
51
65
  # @option opts [Integer] :page The page number to request (defaults to 1)
52
66
  # @option opts [Integer] :per The number of results to load per page (defaults to 10)
67
+ # @option opts [String] :sender_id Allows filtering results by &#x60;sender_id&#x60;. Example: &#x60;/v1/transactions?sender_id&#x3D;b41d3cb7-6c54-4245-85fc-8e30690eb0f7&#x60;
53
68
  # @return [DocumentListResponse]
54
69
  describe 'get_documents test' do
55
70
  it 'should work' do
@@ -54,7 +54,7 @@ describe 'RecipientsApi' do
54
54
  # @option opts [String] :created_at_to End date to filter recipients by created_at range Allows filtering results by the specified &#x60;created_at&#x60; timeframe. Example: &#x60;/v1/recipients?created_at_from&#x3D;2018-06-06&amp;created_at_to&#x3D;2018-06-08&#x60;
55
55
  # @option opts [String] :amount_from Minimum amount to filter recipients by amount range. Allows filtering results by the specified &#x60;amount&#x60; range. When using this filter, the &#x60;currency&#x60; should also be specified. Example: &#x60;/v1/recipients?currency&#x3D;NGN&amp;amount_from&#x3D;83.76672339&amp;amount_to&#x3D;83.76672339&#x60;
56
56
  # @option opts [String] :amount_to Max amount to filter recipients by amount range. Allows filtering results by the specified &#x60;amount&#x60; range. When using this filter, the &#x60;currency&#x60; should also be specified. Example: &#x60;/v1/recipients?currency&#x3D;NGN&amp;amount_from&#x3D;83.76672339&amp;amount_to&#x3D;83.76672339&#x60;
57
- # @option opts [Array<String>] :state Allows filtering results by &#x60;state&#x60; of recipient. See [API Documentation - Recipient state](https://github.com/transferzero/api-documentation/blob/master/transaction-flow.md#state-1) for possible states. Example: &#x60;/v1/recipients?state[]&#x3D;error&amp;state[]&#x3D;initial&#x60;
57
+ # @option opts [Array<String>] :state Allows filtering results by &#x60;state&#x60; of recipient. See [API Documentation - Recipient state](https://docs.transferzero.com/docs/transaction-flow/#state) for possible states. Example: &#x60;/v1/recipients?state[]&#x3D;error&amp;state[]&#x3D;initial&#x60;
58
58
  # @option opts [Array<String>] :currency Allows filtering results by &#x60;input_currency&#x60;. Additionally required when filtering by an amount range Example: &#x60;/v1/recipients?currency[]&#x3D;KES&amp;currency[]&#x3D;NGN&#x60;
59
59
  # @return [RecipientListResponse]
60
60
  describe 'get_recipients test' do
@@ -44,6 +44,18 @@ describe 'TransactionsApi' do
44
44
  end
45
45
  end
46
46
 
47
+ # unit tests for create_and_fund_transaction
48
+ # Creates a new transaction and funds it from account balance
49
+ # This endpoint creates a transaction and funds it from an account balance. You must ensure that you have established an account with us in the pay-in currency of the transactions you wish to create, and that this account is sufficently funded, before calling this endpoint. Note that the &lt;pre&gt;external_id&lt;/pre&gt; field is required for requests to this endpoint.
50
+ # @param transaction_request
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [TransactionResponse]
53
+ describe 'create_and_fund_transaction test' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
47
59
  # unit tests for get_transaction
48
60
  # Fetch a single transaction
49
61
  # Finds and returns a Transaction created by the requesting API key, using the provided Transaction ID.
@@ -63,6 +75,7 @@ describe 'TransactionsApi' do
63
75
  # @option opts [Integer] :page The page number to request (defaults to 1)
64
76
  # @option opts [Integer] :per The number of results to load per page (defaults to 10)
65
77
  # @option opts [String] :external_id Allows filtering results by &#x60;external_id&#x60;. Example: &#x60;/v1/senders?external_id&#x3D;26ec8517-2f0d-48c0-b74f-0bccb9ab3a87&#x60;
78
+ # @option opts [String] :sender_id Allows filtering results by &#x60;sender_id&#x60;. Example: &#x60;/v1/transactions?sender_id&#x3D;b41d3cb7-6c54-4245-85fc-8e30690eb0f7&#x60;
66
79
  # @return [TransactionListResponse]
67
80
  describe 'get_transactions test' do
68
81
  it 'should work' do
@@ -44,6 +44,12 @@ describe 'AccountValidationRequest' do
44
44
  end
45
45
  end
46
46
 
47
+ describe 'test attribute "phone_number"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
47
53
  describe 'test attribute "country"' do
48
54
  it 'should work' do
49
55
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -67,7 +73,7 @@ describe 'AccountValidationRequest' do
67
73
  describe 'test attribute "method"' do
68
74
  it 'should work' do
69
75
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
70
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["bank"])
76
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["bank", "mobile"])
71
77
  # validator.allowable_values.each do |value|
72
78
  # expect { @instance.method = value }.not_to raise_error
73
79
  # end
@@ -98,4 +98,10 @@ describe 'CurrencyOpposite' do
98
98
  end
99
99
  end
100
100
 
101
+ describe 'test attribute "mtm_rate"' do
102
+ it 'should work' do
103
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
+ end
105
+ end
106
+
101
107
  end
@@ -32,6 +32,12 @@ describe 'Document' do
32
32
  expect(@instance).to be_instance_of(TransferZero::Document)
33
33
  end
34
34
  end
35
+ describe 'test attribute "sender_id"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
35
41
  describe 'test attribute "upload"' do
36
42
  it 'should work' do
37
43
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -78,6 +84,12 @@ describe 'Document' do
78
84
  end
79
85
  end
80
86
 
87
+ describe 'test attribute "document_type"' do
88
+ it 'should work' do
89
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
90
+ end
91
+ end
92
+
81
93
  describe 'test attribute "issuing_country"' do
82
94
  it 'should work' do
83
95
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers