devdraft 1.0.2 → 1.0.3

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 (234) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +155 -253
  3. data/Rakefile +2 -0
  4. data/devdraft-1.0.0.gem +0 -0
  5. data/{devdraft_ai_sdk.gemspec → devdraft.gemspec} +15 -11
  6. data/docs/APIHealthApi.md +82 -30
  7. data/docs/AggregatedBalanceResponse.md +19 -6
  8. data/docs/AllBalancesResponse.md +19 -6
  9. data/docs/AppBalancesApi.md +125 -65
  10. data/docs/BridgeFiatPaymentRail.md +15 -0
  11. data/docs/BridgePaymentRail.md +12 -3
  12. data/docs/CreateBankPaymentIntentDto.md +49 -21
  13. data/docs/CreateCustomerDto.md +25 -9
  14. data/docs/CreateDirectBankTransferDto.md +29 -11
  15. data/docs/CreateDirectWalletTransferDto.md +21 -7
  16. data/docs/CreateExternalBankTransferDto.md +40 -0
  17. data/docs/CreateExternalStablecoinTransferDto.md +28 -0
  18. data/docs/CreateInvoiceDto.md +45 -19
  19. data/docs/CreateLiquidationAddressDto.md +43 -18
  20. data/docs/CreatePaymentLinkDto.md +53 -28
  21. data/docs/CreateStablePaymentIntentDto.md +43 -18
  22. data/docs/CreateStablecoinConversionDto.md +23 -8
  23. data/docs/CreateTaxDto.md +26 -0
  24. data/docs/CreateWebhookDto.md +23 -8
  25. data/docs/CustomerStatus.md +12 -3
  26. data/docs/CustomerType.md +15 -0
  27. data/docs/CustomersApi.md +187 -114
  28. data/docs/DestinationCurrency.md +12 -3
  29. data/docs/ExchangeRateResponseDto.md +25 -9
  30. data/docs/ExchangeRatesApi.md +130 -72
  31. data/docs/FiatCurrency.md +12 -3
  32. data/docs/HealthResponseDto.md +25 -9
  33. data/docs/InvoiceProductDto.md +17 -5
  34. data/docs/InvoicesApi.md +177 -104
  35. data/docs/LiquidationAddressResponseDto.md +41 -17
  36. data/docs/LiquidationAddressesApi.md +115 -61
  37. data/docs/PaymentIntentsApi.md +93 -57
  38. data/docs/PaymentLinkProductDto.md +17 -5
  39. data/docs/PaymentLinksApi.md +175 -102
  40. data/docs/PaymentRequestDto.md +21 -7
  41. data/docs/PaymentResponseDto.md +23 -8
  42. data/docs/ProductsApi.md +307 -194
  43. data/docs/PublicHealthResponseDto.md +19 -6
  44. data/docs/RefundResponseDto.md +23 -8
  45. data/docs/StableCoinCurrency.md +12 -3
  46. data/docs/TaxControllerCreate201Response.md +30 -0
  47. data/docs/TaxControllerDeleteWithoutId400Response.md +22 -0
  48. data/docs/TaxControllerUpdateWithoutId400Response.md +22 -0
  49. data/docs/TaxesApi.md +374 -122
  50. data/docs/TestPaymentsApi.md +150 -60
  51. data/docs/TransfersApi.md +274 -72
  52. data/docs/UpdateCustomerDto.md +25 -9
  53. data/docs/UpdateTaxDto.md +26 -0
  54. data/docs/UpdateWebhookDto.md +23 -8
  55. data/docs/WalletsApi.md +44 -24
  56. data/docs/WebhookResponseDto.md +29 -11
  57. data/docs/WebhooksApi.md +225 -134
  58. data/git_push.sh +41 -28
  59. data/lib/devdraft/api/api_health_api.rb +32 -16
  60. data/lib/devdraft/api/app_balances_api.rb +45 -22
  61. data/lib/devdraft/api/customers_api.rb +124 -71
  62. data/lib/devdraft/api/exchange_rates_api.rb +49 -26
  63. data/lib/devdraft/api/invoices_api.rb +89 -53
  64. data/lib/devdraft/api/liquidation_addresses_api.rb +70 -44
  65. data/lib/devdraft/api/payment_intents_api.rb +62 -40
  66. data/lib/devdraft/api/payment_links_api.rb +85 -49
  67. data/lib/devdraft/api/products_api.rb +214 -216
  68. data/lib/devdraft/api/taxes_api.rb +257 -66
  69. data/lib/devdraft/api/test_payments_api.rb +70 -44
  70. data/lib/devdraft/api/transfers_api.rb +206 -46
  71. data/lib/devdraft/api/wallets_api.rb +18 -9
  72. data/lib/devdraft/api/webhooks_api.rb +109 -66
  73. data/lib/devdraft/api_client.rb +76 -71
  74. data/lib/devdraft/api_error.rb +5 -4
  75. data/lib/devdraft/api_model_base.rb +88 -0
  76. data/lib/devdraft/configuration.rb +121 -18
  77. data/lib/devdraft/models/aggregated_balance_response.rb +68 -101
  78. data/lib/devdraft/models/all_balances_response.rb +76 -99
  79. data/lib/devdraft/models/bridge_fiat_payment_rail.rb +45 -0
  80. data/lib/devdraft/models/bridge_payment_rail.rb +36 -24
  81. data/lib/devdraft/models/create_bank_payment_intent_dto.rb +191 -114
  82. data/lib/devdraft/models/create_customer_dto.rb +123 -113
  83. data/lib/devdraft/models/create_direct_bank_transfer_dto.rb +105 -104
  84. data/lib/devdraft/models/create_direct_wallet_transfer_dto.rb +89 -100
  85. data/lib/devdraft/models/create_external_bank_transfer_dto.rb +505 -0
  86. data/lib/devdraft/models/create_external_stablecoin_transfer_dto.rb +266 -0
  87. data/lib/devdraft/models/create_invoice_dto.rb +151 -121
  88. data/lib/devdraft/models/create_liquidation_address_dto.rb +195 -115
  89. data/lib/devdraft/models/create_payment_link_dto.rb +192 -214
  90. data/lib/devdraft/models/create_stable_payment_intent_dto.rb +324 -111
  91. data/lib/devdraft/models/create_stablecoin_conversion_dto.rb +102 -101
  92. data/lib/devdraft/models/create_tax_dto.rb +281 -0
  93. data/lib/devdraft/models/create_webhook_dto.rb +104 -101
  94. data/lib/devdraft/models/customer_status.rb +23 -10
  95. data/lib/devdraft/models/customer_type.rb +45 -0
  96. data/lib/devdraft/models/destination_currency.rb +27 -15
  97. data/lib/devdraft/models/exchange_rate_response_dto.rb +103 -102
  98. data/lib/devdraft/models/fiat_currency.rb +22 -10
  99. data/lib/devdraft/models/health_response_dto.rb +99 -106
  100. data/lib/devdraft/models/invoice_product_dto.rb +63 -98
  101. data/lib/devdraft/models/liquidation_address_response_dto.rb +147 -110
  102. data/lib/devdraft/models/payment_link_product_dto.rb +70 -98
  103. data/lib/devdraft/models/payment_request_dto.rb +77 -100
  104. data/lib/devdraft/models/payment_response_dto.rb +102 -101
  105. data/lib/devdraft/models/public_health_response_dto.rb +68 -101
  106. data/lib/devdraft/models/refund_response_dto.rb +102 -101
  107. data/lib/devdraft/models/stable_coin_currency.rb +21 -9
  108. data/lib/devdraft/models/tax_controller_create201_response.rb +201 -0
  109. data/lib/devdraft/models/tax_controller_delete_without_id400_response.rb +165 -0
  110. data/lib/devdraft/models/tax_controller_update_without_id400_response.rb +165 -0
  111. data/lib/devdraft/models/update_customer_dto.rb +117 -113
  112. data/lib/devdraft/models/update_tax_dto.rb +256 -0
  113. data/lib/devdraft/models/update_webhook_dto.rb +70 -101
  114. data/lib/devdraft/models/webhook_response_dto.rb +140 -103
  115. data/lib/devdraft/version.rb +6 -5
  116. data/lib/devdraft.rb +18 -27
  117. data/spec/api/api_health_api_spec.rb +10 -9
  118. data/spec/api/app_balances_api_spec.rb +11 -10
  119. data/spec/api/customers_api_spec.rb +25 -24
  120. data/spec/api/exchange_rates_api_spec.rb +11 -10
  121. data/spec/api/invoices_api_spec.rb +16 -15
  122. data/spec/api/liquidation_addresses_api_spec.rb +13 -12
  123. data/spec/api/payment_intents_api_spec.rb +12 -11
  124. data/spec/api/payment_links_api_spec.rb +14 -13
  125. data/spec/api/products_api_spec.rb +41 -40
  126. data/spec/api/taxes_api_spec.rb +51 -21
  127. data/spec/api/test_payments_api_spec.rb +14 -13
  128. data/spec/api/transfers_api_spec.rb +36 -13
  129. data/spec/api/wallets_api_spec.rb +9 -8
  130. data/spec/api/webhooks_api_spec.rb +20 -19
  131. data/spec/models/aggregated_balance_response_spec.rb +15 -19
  132. data/spec/models/all_balances_response_spec.rb +14 -18
  133. data/spec/models/bridge_fiat_payment_rail_spec.rb +30 -0
  134. data/spec/models/bridge_payment_rail_spec.rb +11 -15
  135. data/spec/models/create_bank_payment_intent_dto_spec.rb +29 -33
  136. data/spec/models/create_customer_dto_spec.rb +17 -25
  137. data/spec/models/create_direct_bank_transfer_dto_spec.rb +19 -23
  138. data/spec/models/create_direct_wallet_transfer_dto_spec.rb +15 -19
  139. data/spec/models/create_external_bank_transfer_dto_spec.rb +102 -0
  140. data/spec/models/create_external_stablecoin_transfer_dto_spec.rb +66 -0
  141. data/spec/models/create_invoice_dto_spec.rb +31 -35
  142. data/spec/models/create_liquidation_address_dto_spec.rb +28 -32
  143. data/spec/models/create_payment_link_dto_spec.rb +34 -76
  144. data/spec/models/create_stable_payment_intent_dto_spec.rb +26 -30
  145. data/spec/models/create_stablecoin_conversion_dto_spec.rb +16 -20
  146. data/spec/models/create_tax_dto_spec.rb +60 -0
  147. data/spec/models/create_webhook_dto_spec.rb +16 -20
  148. data/spec/models/customer_status_spec.rb +11 -15
  149. data/spec/models/customer_type_spec.rb +30 -0
  150. data/spec/models/destination_currency_spec.rb +11 -15
  151. data/spec/models/exchange_rate_response_dto_spec.rb +17 -21
  152. data/spec/models/fiat_currency_spec.rb +11 -15
  153. data/spec/models/health_response_dto_spec.rb +19 -23
  154. data/spec/models/invoice_product_dto_spec.rb +13 -17
  155. data/spec/models/liquidation_address_response_dto_spec.rb +25 -29
  156. data/spec/models/payment_link_product_dto_spec.rb +13 -17
  157. data/spec/models/payment_request_dto_spec.rb +15 -19
  158. data/spec/models/payment_response_dto_spec.rb +16 -20
  159. data/spec/models/public_health_response_dto_spec.rb +15 -19
  160. data/spec/models/refund_response_dto_spec.rb +16 -20
  161. data/spec/models/stable_coin_currency_spec.rb +11 -15
  162. data/spec/models/tax_controller_create201_response_spec.rb +72 -0
  163. data/spec/models/tax_controller_delete_without_id400_response_spec.rb +48 -0
  164. data/spec/models/tax_controller_update_without_id400_response_spec.rb +48 -0
  165. data/spec/models/update_customer_dto_spec.rb +17 -25
  166. data/spec/models/update_tax_dto_spec.rb +60 -0
  167. data/spec/models/update_webhook_dto_spec.rb +16 -20
  168. data/spec/models/webhook_response_dto_spec.rb +19 -23
  169. data/spec/spec_helper.rb +5 -4
  170. metadata +49 -116
  171. data/docs/AllOfAllBalancesResponseEurc.md +0 -9
  172. data/docs/AllOfAllBalancesResponseUsdc.md +0 -9
  173. data/docs/AllOfCreateBankPaymentIntentDtoDestinationCurrency.md +0 -6
  174. data/docs/AllOfCreateBankPaymentIntentDtoDestinationNetwork.md +0 -6
  175. data/docs/AllOfCreateBankPaymentIntentDtoSourceCurrency.md +0 -6
  176. data/docs/AllOfCreateBankPaymentIntentDtoSourcePaymentRail.md +0 -6
  177. data/docs/AllOfCreateCustomerDtoStatus.md +0 -6
  178. data/docs/AllOfCreateLiquidationAddressDtoDestinationCurrency.md +0 -6
  179. data/docs/AllOfCreateLiquidationAddressDtoDestinationPaymentRail.md +0 -6
  180. data/docs/AllOfCreateStablePaymentIntentDtoDestinationCurrency.md +0 -6
  181. data/docs/AllOfCreateStablePaymentIntentDtoDestinationNetwork.md +0 -6
  182. data/docs/AllOfCreateStablePaymentIntentDtoSourceCurrency.md +0 -6
  183. data/docs/AllOfCreateStablePaymentIntentDtoSourceNetwork.md +0 -6
  184. data/docs/AllOfUpdateCustomerDtoStatus.md +0 -6
  185. data/docs/CreateProductDto.md +0 -18
  186. data/docs/CreateTaxInput.md +0 -6
  187. data/docs/UpdatePaymentLinkDto.md +0 -6
  188. data/docs/UpdatePreferenceInput.md +0 -6
  189. data/docs/UpdateProductDto.md +0 -18
  190. data/docs/UpdateTaxInput.md +0 -6
  191. data/example.rb +0 -129
  192. data/lib/devdraft/models/all_of_all_balances_response_eurc.rb +0 -283
  193. data/lib/devdraft/models/all_of_all_balances_response_usdc.rb +0 -283
  194. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_currency.rb +0 -202
  195. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_network.rb +0 -202
  196. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_currency.rb +0 -202
  197. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_payment_rail.rb +0 -202
  198. data/lib/devdraft/models/all_of_create_customer_dto_status.rb +0 -202
  199. data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_currency.rb +0 -202
  200. data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_payment_rail.rb +0 -202
  201. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_currency.rb +0 -202
  202. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_network.rb +0 -202
  203. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_currency.rb +0 -202
  204. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_network.rb +0 -202
  205. data/lib/devdraft/models/all_of_update_customer_dto_status.rb +0 -202
  206. data/lib/devdraft/models/create_product_dto.rb +0 -370
  207. data/lib/devdraft/models/create_tax_input.rb +0 -197
  208. data/lib/devdraft/models/update_payment_link_dto.rb +0 -197
  209. data/lib/devdraft/models/update_preference_input.rb +0 -197
  210. data/lib/devdraft/models/update_product_dto.rb +0 -355
  211. data/lib/devdraft/models/update_tax_input.rb +0 -197
  212. data/spec/api_client_spec.rb +0 -225
  213. data/spec/base_object_spec.rb +0 -109
  214. data/spec/configuration_spec.rb +0 -41
  215. data/spec/models/all_of_all_balances_response_eurc_spec.rb +0 -56
  216. data/spec/models/all_of_all_balances_response_usdc_spec.rb +0 -56
  217. data/spec/models/all_of_create_bank_payment_intent_dto_destination_currency_spec.rb +0 -34
  218. data/spec/models/all_of_create_bank_payment_intent_dto_destination_network_spec.rb +0 -34
  219. data/spec/models/all_of_create_bank_payment_intent_dto_source_currency_spec.rb +0 -34
  220. data/spec/models/all_of_create_bank_payment_intent_dto_source_payment_rail_spec.rb +0 -34
  221. data/spec/models/all_of_create_customer_dto_status_spec.rb +0 -34
  222. data/spec/models/all_of_create_liquidation_address_dto_destination_currency_spec.rb +0 -34
  223. data/spec/models/all_of_create_liquidation_address_dto_destination_payment_rail_spec.rb +0 -34
  224. data/spec/models/all_of_create_stable_payment_intent_dto_destination_currency_spec.rb +0 -34
  225. data/spec/models/all_of_create_stable_payment_intent_dto_destination_network_spec.rb +0 -34
  226. data/spec/models/all_of_create_stable_payment_intent_dto_source_currency_spec.rb +0 -34
  227. data/spec/models/all_of_create_stable_payment_intent_dto_source_network_spec.rb +0 -34
  228. data/spec/models/all_of_update_customer_dto_status_spec.rb +0 -34
  229. data/spec/models/create_product_dto_spec.rb +0 -110
  230. data/spec/models/create_tax_input_spec.rb +0 -34
  231. data/spec/models/update_payment_link_dto_spec.rb +0 -34
  232. data/spec/models/update_preference_input_spec.rb +0 -34
  233. data/spec/models/update_product_dto_spec.rb +0 -110
  234. data/spec/models/update_tax_input_spec.rb +0 -34
@@ -0,0 +1,505 @@
1
+ =begin
2
+ #Devdraft AI Payment & Business Management API
3
+
4
+ # A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.17.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Devdraft
17
+ class CreateExternalBankTransferDto < ApiModelBase
18
+ # The ID of the source bridge wallet
19
+ attr_accessor :source_wallet_id
20
+
21
+ # The source currency
22
+ attr_accessor :source_currency
23
+
24
+ # The destination currency
25
+ attr_accessor :destination_currency
26
+
27
+ # The destination payment rail (fiat payment method)
28
+ attr_accessor :destination_payment_rail
29
+
30
+ # The external account ID for the bank transfer
31
+ attr_accessor :external_account_id
32
+
33
+ # The amount to transfer
34
+ attr_accessor :amount
35
+
36
+ # Wire transfer message (1-256 characters, only for wire transfers)
37
+ attr_accessor :wire_message
38
+
39
+ # SEPA reference message (6-140 characters, only for SEPA transfers)
40
+ attr_accessor :sepa_reference
41
+
42
+ # SWIFT reference message (1-190 characters, only for SWIFT transfers)
43
+ attr_accessor :swift_reference
44
+
45
+ # SPEI reference message (1-40 characters, only for SPEI transfers)
46
+ attr_accessor :spei_reference
47
+
48
+ # SWIFT charges bearer (only for SWIFT transfers)
49
+ attr_accessor :swift_charges
50
+
51
+ # ACH reference message (1-10 characters, only for ACH transfers)
52
+ attr_accessor :ach_reference
53
+
54
+ class EnumAttributeValidator
55
+ attr_reader :datatype
56
+ attr_reader :allowable_values
57
+
58
+ def initialize(datatype, allowable_values)
59
+ @allowable_values = allowable_values.map do |value|
60
+ case datatype.to_s
61
+ when /Integer/i
62
+ value.to_i
63
+ when /Float/i
64
+ value.to_f
65
+ else
66
+ value
67
+ end
68
+ end
69
+ end
70
+
71
+ def valid?(value)
72
+ !value || allowable_values.include?(value)
73
+ end
74
+ end
75
+
76
+ # Attribute mapping from ruby-style variable name to JSON key.
77
+ def self.attribute_map
78
+ {
79
+ :'source_wallet_id' => :'sourceWalletId',
80
+ :'source_currency' => :'sourceCurrency',
81
+ :'destination_currency' => :'destinationCurrency',
82
+ :'destination_payment_rail' => :'destinationPaymentRail',
83
+ :'external_account_id' => :'external_account_id',
84
+ :'amount' => :'amount',
85
+ :'wire_message' => :'wire_message',
86
+ :'sepa_reference' => :'sepa_reference',
87
+ :'swift_reference' => :'swift_reference',
88
+ :'spei_reference' => :'spei_reference',
89
+ :'swift_charges' => :'swift_charges',
90
+ :'ach_reference' => :'ach_reference'
91
+ }
92
+ end
93
+
94
+ # Returns attribute mapping this model knows about
95
+ def self.acceptable_attribute_map
96
+ attribute_map
97
+ end
98
+
99
+ # Returns all the JSON keys this model knows about
100
+ def self.acceptable_attributes
101
+ acceptable_attribute_map.values
102
+ end
103
+
104
+ # Attribute type mapping.
105
+ def self.openapi_types
106
+ {
107
+ :'source_wallet_id' => :'String',
108
+ :'source_currency' => :'String',
109
+ :'destination_currency' => :'String',
110
+ :'destination_payment_rail' => :'BridgeFiatPaymentRail',
111
+ :'external_account_id' => :'String',
112
+ :'amount' => :'Float',
113
+ :'wire_message' => :'String',
114
+ :'sepa_reference' => :'String',
115
+ :'swift_reference' => :'String',
116
+ :'spei_reference' => :'String',
117
+ :'swift_charges' => :'String',
118
+ :'ach_reference' => :'String'
119
+ }
120
+ end
121
+
122
+ # List of attributes with nullable: true
123
+ def self.openapi_nullable
124
+ Set.new([
125
+ ])
126
+ end
127
+
128
+ # Initializes the object
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ def initialize(attributes = {})
131
+ if (!attributes.is_a?(Hash))
132
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Devdraft::CreateExternalBankTransferDto` initialize method"
133
+ end
134
+
135
+ # check to see if the attribute exists and convert string to symbol for hash key
136
+ acceptable_attribute_map = self.class.acceptable_attribute_map
137
+ attributes = attributes.each_with_object({}) { |(k, v), h|
138
+ if (!acceptable_attribute_map.key?(k.to_sym))
139
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Devdraft::CreateExternalBankTransferDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
140
+ end
141
+ h[k.to_sym] = v
142
+ }
143
+
144
+ if attributes.key?(:'source_wallet_id')
145
+ self.source_wallet_id = attributes[:'source_wallet_id']
146
+ else
147
+ self.source_wallet_id = nil
148
+ end
149
+
150
+ if attributes.key?(:'source_currency')
151
+ self.source_currency = attributes[:'source_currency']
152
+ else
153
+ self.source_currency = nil
154
+ end
155
+
156
+ if attributes.key?(:'destination_currency')
157
+ self.destination_currency = attributes[:'destination_currency']
158
+ else
159
+ self.destination_currency = nil
160
+ end
161
+
162
+ if attributes.key?(:'destination_payment_rail')
163
+ self.destination_payment_rail = attributes[:'destination_payment_rail']
164
+ else
165
+ self.destination_payment_rail = nil
166
+ end
167
+
168
+ if attributes.key?(:'external_account_id')
169
+ self.external_account_id = attributes[:'external_account_id']
170
+ else
171
+ self.external_account_id = nil
172
+ end
173
+
174
+ if attributes.key?(:'amount')
175
+ self.amount = attributes[:'amount']
176
+ end
177
+
178
+ if attributes.key?(:'wire_message')
179
+ self.wire_message = attributes[:'wire_message']
180
+ end
181
+
182
+ if attributes.key?(:'sepa_reference')
183
+ self.sepa_reference = attributes[:'sepa_reference']
184
+ end
185
+
186
+ if attributes.key?(:'swift_reference')
187
+ self.swift_reference = attributes[:'swift_reference']
188
+ end
189
+
190
+ if attributes.key?(:'spei_reference')
191
+ self.spei_reference = attributes[:'spei_reference']
192
+ end
193
+
194
+ if attributes.key?(:'swift_charges')
195
+ self.swift_charges = attributes[:'swift_charges']
196
+ end
197
+
198
+ if attributes.key?(:'ach_reference')
199
+ self.ach_reference = attributes[:'ach_reference']
200
+ end
201
+ end
202
+
203
+ # Show invalid properties with the reasons. Usually used together with valid?
204
+ # @return Array for valid properties with the reasons
205
+ def list_invalid_properties
206
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
207
+ invalid_properties = Array.new
208
+ if @source_wallet_id.nil?
209
+ invalid_properties.push('invalid value for "source_wallet_id", source_wallet_id cannot be nil.')
210
+ end
211
+
212
+ if @source_currency.nil?
213
+ invalid_properties.push('invalid value for "source_currency", source_currency cannot be nil.')
214
+ end
215
+
216
+ if @destination_currency.nil?
217
+ invalid_properties.push('invalid value for "destination_currency", destination_currency cannot be nil.')
218
+ end
219
+
220
+ if @destination_payment_rail.nil?
221
+ invalid_properties.push('invalid value for "destination_payment_rail", destination_payment_rail cannot be nil.')
222
+ end
223
+
224
+ if @external_account_id.nil?
225
+ invalid_properties.push('invalid value for "external_account_id", external_account_id cannot be nil.')
226
+ end
227
+
228
+ if !@wire_message.nil? && @wire_message.to_s.length > 256
229
+ invalid_properties.push('invalid value for "wire_message", the character length must be smaller than or equal to 256.')
230
+ end
231
+
232
+ if !@wire_message.nil? && @wire_message.to_s.length < 1
233
+ invalid_properties.push('invalid value for "wire_message", the character length must be greater than or equal to 1.')
234
+ end
235
+
236
+ if !@sepa_reference.nil? && @sepa_reference.to_s.length > 140
237
+ invalid_properties.push('invalid value for "sepa_reference", the character length must be smaller than or equal to 140.')
238
+ end
239
+
240
+ if !@sepa_reference.nil? && @sepa_reference.to_s.length < 6
241
+ invalid_properties.push('invalid value for "sepa_reference", the character length must be greater than or equal to 6.')
242
+ end
243
+
244
+ if !@swift_reference.nil? && @swift_reference.to_s.length > 190
245
+ invalid_properties.push('invalid value for "swift_reference", the character length must be smaller than or equal to 190.')
246
+ end
247
+
248
+ if !@swift_reference.nil? && @swift_reference.to_s.length < 1
249
+ invalid_properties.push('invalid value for "swift_reference", the character length must be greater than or equal to 1.')
250
+ end
251
+
252
+ if !@spei_reference.nil? && @spei_reference.to_s.length > 40
253
+ invalid_properties.push('invalid value for "spei_reference", the character length must be smaller than or equal to 40.')
254
+ end
255
+
256
+ if !@spei_reference.nil? && @spei_reference.to_s.length < 1
257
+ invalid_properties.push('invalid value for "spei_reference", the character length must be greater than or equal to 1.')
258
+ end
259
+
260
+ if !@ach_reference.nil? && @ach_reference.to_s.length > 10
261
+ invalid_properties.push('invalid value for "ach_reference", the character length must be smaller than or equal to 10.')
262
+ end
263
+
264
+ if !@ach_reference.nil? && @ach_reference.to_s.length < 1
265
+ invalid_properties.push('invalid value for "ach_reference", the character length must be greater than or equal to 1.')
266
+ end
267
+
268
+ invalid_properties
269
+ end
270
+
271
+ # Check to see if the all the properties in the model are valid
272
+ # @return true if the model is valid
273
+ def valid?
274
+ warn '[DEPRECATED] the `valid?` method is obsolete'
275
+ return false if @source_wallet_id.nil?
276
+ return false if @source_currency.nil?
277
+ return false if @destination_currency.nil?
278
+ return false if @destination_payment_rail.nil?
279
+ return false if @external_account_id.nil?
280
+ return false if !@wire_message.nil? && @wire_message.to_s.length > 256
281
+ return false if !@wire_message.nil? && @wire_message.to_s.length < 1
282
+ return false if !@sepa_reference.nil? && @sepa_reference.to_s.length > 140
283
+ return false if !@sepa_reference.nil? && @sepa_reference.to_s.length < 6
284
+ return false if !@swift_reference.nil? && @swift_reference.to_s.length > 190
285
+ return false if !@swift_reference.nil? && @swift_reference.to_s.length < 1
286
+ return false if !@spei_reference.nil? && @spei_reference.to_s.length > 40
287
+ return false if !@spei_reference.nil? && @spei_reference.to_s.length < 1
288
+ return false if !@ach_reference.nil? && @ach_reference.to_s.length > 10
289
+ return false if !@ach_reference.nil? && @ach_reference.to_s.length < 1
290
+ true
291
+ end
292
+
293
+ # Custom attribute writer method with validation
294
+ # @param [Object] source_wallet_id Value to be assigned
295
+ def source_wallet_id=(source_wallet_id)
296
+ if source_wallet_id.nil?
297
+ fail ArgumentError, 'source_wallet_id cannot be nil'
298
+ end
299
+
300
+ @source_wallet_id = source_wallet_id
301
+ end
302
+
303
+ # Custom attribute writer method with validation
304
+ # @param [Object] source_currency Value to be assigned
305
+ def source_currency=(source_currency)
306
+ if source_currency.nil?
307
+ fail ArgumentError, 'source_currency cannot be nil'
308
+ end
309
+
310
+ @source_currency = source_currency
311
+ end
312
+
313
+ # Custom attribute writer method with validation
314
+ # @param [Object] destination_currency Value to be assigned
315
+ def destination_currency=(destination_currency)
316
+ if destination_currency.nil?
317
+ fail ArgumentError, 'destination_currency cannot be nil'
318
+ end
319
+
320
+ @destination_currency = destination_currency
321
+ end
322
+
323
+ # Custom attribute writer method with validation
324
+ # @param [Object] destination_payment_rail Value to be assigned
325
+ def destination_payment_rail=(destination_payment_rail)
326
+ if destination_payment_rail.nil?
327
+ fail ArgumentError, 'destination_payment_rail cannot be nil'
328
+ end
329
+
330
+ @destination_payment_rail = destination_payment_rail
331
+ end
332
+
333
+ # Custom attribute writer method with validation
334
+ # @param [Object] external_account_id Value to be assigned
335
+ def external_account_id=(external_account_id)
336
+ if external_account_id.nil?
337
+ fail ArgumentError, 'external_account_id cannot be nil'
338
+ end
339
+
340
+ @external_account_id = external_account_id
341
+ end
342
+
343
+ # Custom attribute writer method with validation
344
+ # @param [Object] wire_message Value to be assigned
345
+ def wire_message=(wire_message)
346
+ if wire_message.nil?
347
+ fail ArgumentError, 'wire_message cannot be nil'
348
+ end
349
+
350
+ if wire_message.to_s.length > 256
351
+ fail ArgumentError, 'invalid value for "wire_message", the character length must be smaller than or equal to 256.'
352
+ end
353
+
354
+ if wire_message.to_s.length < 1
355
+ fail ArgumentError, 'invalid value for "wire_message", the character length must be greater than or equal to 1.'
356
+ end
357
+
358
+ @wire_message = wire_message
359
+ end
360
+
361
+ # Custom attribute writer method with validation
362
+ # @param [Object] sepa_reference Value to be assigned
363
+ def sepa_reference=(sepa_reference)
364
+ if sepa_reference.nil?
365
+ fail ArgumentError, 'sepa_reference cannot be nil'
366
+ end
367
+
368
+ if sepa_reference.to_s.length > 140
369
+ fail ArgumentError, 'invalid value for "sepa_reference", the character length must be smaller than or equal to 140.'
370
+ end
371
+
372
+ if sepa_reference.to_s.length < 6
373
+ fail ArgumentError, 'invalid value for "sepa_reference", the character length must be greater than or equal to 6.'
374
+ end
375
+
376
+ @sepa_reference = sepa_reference
377
+ end
378
+
379
+ # Custom attribute writer method with validation
380
+ # @param [Object] swift_reference Value to be assigned
381
+ def swift_reference=(swift_reference)
382
+ if swift_reference.nil?
383
+ fail ArgumentError, 'swift_reference cannot be nil'
384
+ end
385
+
386
+ if swift_reference.to_s.length > 190
387
+ fail ArgumentError, 'invalid value for "swift_reference", the character length must be smaller than or equal to 190.'
388
+ end
389
+
390
+ if swift_reference.to_s.length < 1
391
+ fail ArgumentError, 'invalid value for "swift_reference", the character length must be greater than or equal to 1.'
392
+ end
393
+
394
+ @swift_reference = swift_reference
395
+ end
396
+
397
+ # Custom attribute writer method with validation
398
+ # @param [Object] spei_reference Value to be assigned
399
+ def spei_reference=(spei_reference)
400
+ if spei_reference.nil?
401
+ fail ArgumentError, 'spei_reference cannot be nil'
402
+ end
403
+
404
+ if spei_reference.to_s.length > 40
405
+ fail ArgumentError, 'invalid value for "spei_reference", the character length must be smaller than or equal to 40.'
406
+ end
407
+
408
+ if spei_reference.to_s.length < 1
409
+ fail ArgumentError, 'invalid value for "spei_reference", the character length must be greater than or equal to 1.'
410
+ end
411
+
412
+ @spei_reference = spei_reference
413
+ end
414
+
415
+ # Custom attribute writer method with validation
416
+ # @param [Object] ach_reference Value to be assigned
417
+ def ach_reference=(ach_reference)
418
+ if ach_reference.nil?
419
+ fail ArgumentError, 'ach_reference cannot be nil'
420
+ end
421
+
422
+ if ach_reference.to_s.length > 10
423
+ fail ArgumentError, 'invalid value for "ach_reference", the character length must be smaller than or equal to 10.'
424
+ end
425
+
426
+ if ach_reference.to_s.length < 1
427
+ fail ArgumentError, 'invalid value for "ach_reference", the character length must be greater than or equal to 1.'
428
+ end
429
+
430
+ @ach_reference = ach_reference
431
+ end
432
+
433
+ # Checks equality by comparing each attribute.
434
+ # @param [Object] Object to be compared
435
+ def ==(o)
436
+ return true if self.equal?(o)
437
+ self.class == o.class &&
438
+ source_wallet_id == o.source_wallet_id &&
439
+ source_currency == o.source_currency &&
440
+ destination_currency == o.destination_currency &&
441
+ destination_payment_rail == o.destination_payment_rail &&
442
+ external_account_id == o.external_account_id &&
443
+ amount == o.amount &&
444
+ wire_message == o.wire_message &&
445
+ sepa_reference == o.sepa_reference &&
446
+ swift_reference == o.swift_reference &&
447
+ spei_reference == o.spei_reference &&
448
+ swift_charges == o.swift_charges &&
449
+ ach_reference == o.ach_reference
450
+ end
451
+
452
+ # @see the `==` method
453
+ # @param [Object] Object to be compared
454
+ def eql?(o)
455
+ self == o
456
+ end
457
+
458
+ # Calculates hash code according to all attributes.
459
+ # @return [Integer] Hash code
460
+ def hash
461
+ [source_wallet_id, source_currency, destination_currency, destination_payment_rail, external_account_id, amount, wire_message, sepa_reference, swift_reference, spei_reference, swift_charges, ach_reference].hash
462
+ end
463
+
464
+ # Builds the object from hash
465
+ # @param [Hash] attributes Model attributes in the form of hash
466
+ # @return [Object] Returns the model itself
467
+ def self.build_from_hash(attributes)
468
+ return nil unless attributes.is_a?(Hash)
469
+ attributes = attributes.transform_keys(&:to_sym)
470
+ transformed_hash = {}
471
+ openapi_types.each_pair do |key, type|
472
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
473
+ transformed_hash["#{key}"] = nil
474
+ elsif type =~ /\AArray<(.*)>/i
475
+ # check to ensure the input is an array given that the attribute
476
+ # is documented as an array but the input is not
477
+ if attributes[attribute_map[key]].is_a?(Array)
478
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
479
+ end
480
+ elsif !attributes[attribute_map[key]].nil?
481
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
482
+ end
483
+ end
484
+ new(transformed_hash)
485
+ end
486
+
487
+ # Returns the object in the form of hash
488
+ # @return [Hash] Returns the object in the form of hash
489
+ def to_hash
490
+ hash = {}
491
+ self.class.attribute_map.each_pair do |attr, param|
492
+ value = self.send(attr)
493
+ if value.nil?
494
+ is_nullable = self.class.openapi_nullable.include?(attr)
495
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
496
+ end
497
+
498
+ hash[param] = _to_hash(value)
499
+ end
500
+ hash
501
+ end
502
+
503
+ end
504
+
505
+ end