devdraft 1.0.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 (205) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +1246 -0
  4. data/Rakefile +8 -0
  5. data/devdraft_ai_sdk.gemspec +38 -0
  6. data/docs/APIHealthApi.md +87 -0
  7. data/docs/AggregatedBalanceResponse.md +9 -0
  8. data/docs/AllBalancesResponse.md +9 -0
  9. data/docs/AllOfAllBalancesResponseEurc.md +9 -0
  10. data/docs/AllOfAllBalancesResponseUsdc.md +9 -0
  11. data/docs/AllOfCreateBankPaymentIntentDtoDestinationCurrency.md +6 -0
  12. data/docs/AllOfCreateBankPaymentIntentDtoDestinationNetwork.md +6 -0
  13. data/docs/AllOfCreateBankPaymentIntentDtoSourceCurrency.md +6 -0
  14. data/docs/AllOfCreateBankPaymentIntentDtoSourcePaymentRail.md +6 -0
  15. data/docs/AllOfCreateCustomerDtoStatus.md +6 -0
  16. data/docs/AllOfCreateLiquidationAddressDtoDestinationCurrency.md +6 -0
  17. data/docs/AllOfCreateLiquidationAddressDtoDestinationPaymentRail.md +6 -0
  18. data/docs/AllOfCreateStablePaymentIntentDtoDestinationCurrency.md +6 -0
  19. data/docs/AllOfCreateStablePaymentIntentDtoDestinationNetwork.md +6 -0
  20. data/docs/AllOfCreateStablePaymentIntentDtoSourceCurrency.md +6 -0
  21. data/docs/AllOfCreateStablePaymentIntentDtoSourceNetwork.md +6 -0
  22. data/docs/AllOfUpdateCustomerDtoStatus.md +6 -0
  23. data/docs/AppBalancesApi.md +169 -0
  24. data/docs/BridgePaymentRail.md +6 -0
  25. data/docs/CreateBankPaymentIntentDto.md +24 -0
  26. data/docs/CreateCustomerDto.md +12 -0
  27. data/docs/CreateDirectBankTransferDto.md +14 -0
  28. data/docs/CreateDirectWalletTransferDto.md +10 -0
  29. data/docs/CreateInvoiceDto.md +22 -0
  30. data/docs/CreateLiquidationAddressDto.md +21 -0
  31. data/docs/CreatePaymentLinkDto.md +31 -0
  32. data/docs/CreateProductDto.md +18 -0
  33. data/docs/CreateStablePaymentIntentDto.md +21 -0
  34. data/docs/CreateStablecoinConversionDto.md +11 -0
  35. data/docs/CreateTaxInput.md +6 -0
  36. data/docs/CreateWebhookDto.md +11 -0
  37. data/docs/CustomerStatus.md +6 -0
  38. data/docs/CustomersApi.md +250 -0
  39. data/docs/DestinationCurrency.md +6 -0
  40. data/docs/ExchangeRateResponseDto.md +12 -0
  41. data/docs/ExchangeRatesApi.md +176 -0
  42. data/docs/FiatCurrency.md +6 -0
  43. data/docs/HealthResponseDto.md +12 -0
  44. data/docs/InvoiceProductDto.md +8 -0
  45. data/docs/InvoicesApi.md +236 -0
  46. data/docs/LiquidationAddressResponseDto.md +20 -0
  47. data/docs/LiquidationAddressesApi.md +152 -0
  48. data/docs/PaymentIntentsApi.md +127 -0
  49. data/docs/PaymentLinkProductDto.md +8 -0
  50. data/docs/PaymentLinksApi.md +238 -0
  51. data/docs/PaymentRequestDto.md +10 -0
  52. data/docs/PaymentResponseDto.md +11 -0
  53. data/docs/ProductsApi.md +404 -0
  54. data/docs/PublicHealthResponseDto.md +9 -0
  55. data/docs/RefundResponseDto.md +11 -0
  56. data/docs/StableCoinCurrency.md +6 -0
  57. data/docs/TaxesApi.md +292 -0
  58. data/docs/TestPaymentsApi.md +150 -0
  59. data/docs/TransfersApi.md +175 -0
  60. data/docs/UpdateCustomerDto.md +12 -0
  61. data/docs/UpdatePaymentLinkDto.md +6 -0
  62. data/docs/UpdatePreferenceInput.md +6 -0
  63. data/docs/UpdateProductDto.md +18 -0
  64. data/docs/UpdateTaxInput.md +6 -0
  65. data/docs/UpdateWebhookDto.md +11 -0
  66. data/docs/WalletsApi.md +58 -0
  67. data/docs/WebhookResponseDto.md +14 -0
  68. data/docs/WebhooksApi.md +307 -0
  69. data/git_push.sh +44 -0
  70. data/lib/devdraft/api/api_health_api.rb +116 -0
  71. data/lib/devdraft/api/app_balances_api.rb +170 -0
  72. data/lib/devdraft/api/customers_api.rb +258 -0
  73. data/lib/devdraft/api/exchange_rates_api.rb +184 -0
  74. data/lib/devdraft/api/invoices_api.rb +238 -0
  75. data/lib/devdraft/api/liquidation_addresses_api.rb +202 -0
  76. data/lib/devdraft/api/payment_intents_api.rb +150 -0
  77. data/lib/devdraft/api/payment_links_api.rb +240 -0
  78. data/lib/devdraft/api/products_api.rb +518 -0
  79. data/lib/devdraft/api/taxes_api.rb +290 -0
  80. data/lib/devdraft/api/test_payments_api.rb +202 -0
  81. data/lib/devdraft/api/transfers_api.rb +182 -0
  82. data/lib/devdraft/api/wallets_api.rb +66 -0
  83. data/lib/devdraft/api/webhooks_api.rb +310 -0
  84. data/lib/devdraft/api_client.rb +388 -0
  85. data/lib/devdraft/api_error.rb +57 -0
  86. data/lib/devdraft/configuration.rb +219 -0
  87. data/lib/devdraft/models/aggregated_balance_response.rb +278 -0
  88. data/lib/devdraft/models/all_balances_response.rb +242 -0
  89. data/lib/devdraft/models/all_of_all_balances_response_eurc.rb +283 -0
  90. data/lib/devdraft/models/all_of_all_balances_response_usdc.rb +283 -0
  91. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_currency.rb +202 -0
  92. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_destination_network.rb +202 -0
  93. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_currency.rb +202 -0
  94. data/lib/devdraft/models/all_of_create_bank_payment_intent_dto_source_payment_rail.rb +202 -0
  95. data/lib/devdraft/models/all_of_create_customer_dto_status.rb +202 -0
  96. data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_currency.rb +202 -0
  97. data/lib/devdraft/models/all_of_create_liquidation_address_dto_destination_payment_rail.rb +202 -0
  98. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_currency.rb +202 -0
  99. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_destination_network.rb +202 -0
  100. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_currency.rb +202 -0
  101. data/lib/devdraft/models/all_of_create_stable_payment_intent_dto_source_network.rb +202 -0
  102. data/lib/devdraft/models/all_of_update_customer_dto_status.rb +202 -0
  103. data/lib/devdraft/models/bridge_payment_rail.rb +43 -0
  104. data/lib/devdraft/models/create_bank_payment_intent_dto.rb +397 -0
  105. data/lib/devdraft/models/create_customer_dto.rb +308 -0
  106. data/lib/devdraft/models/create_direct_bank_transfer_dto.rb +302 -0
  107. data/lib/devdraft/models/create_direct_wallet_transfer_dto.rb +257 -0
  108. data/lib/devdraft/models/create_invoice_dto.rb +474 -0
  109. data/lib/devdraft/models/create_liquidation_address_dto.rb +408 -0
  110. data/lib/devdraft/models/create_payment_link_dto.rb +603 -0
  111. data/lib/devdraft/models/create_product_dto.rb +370 -0
  112. data/lib/devdraft/models/create_stable_payment_intent_dto.rb +362 -0
  113. data/lib/devdraft/models/create_stablecoin_conversion_dto.rb +272 -0
  114. data/lib/devdraft/models/create_tax_input.rb +197 -0
  115. data/lib/devdraft/models/create_webhook_dto.rb +271 -0
  116. data/lib/devdraft/models/customer_status.rb +29 -0
  117. data/lib/devdraft/models/destination_currency.rb +34 -0
  118. data/lib/devdraft/models/exchange_rate_response_dto.rb +282 -0
  119. data/lib/devdraft/models/fiat_currency.rb +29 -0
  120. data/lib/devdraft/models/health_response_dto.rb +333 -0
  121. data/lib/devdraft/models/invoice_product_dto.rb +227 -0
  122. data/lib/devdraft/models/liquidation_address_response_dto.rb +377 -0
  123. data/lib/devdraft/models/payment_link_product_dto.rb +229 -0
  124. data/lib/devdraft/models/payment_request_dto.rb +252 -0
  125. data/lib/devdraft/models/payment_response_dto.rb +272 -0
  126. data/lib/devdraft/models/public_health_response_dto.rb +276 -0
  127. data/lib/devdraft/models/refund_response_dto.rb +272 -0
  128. data/lib/devdraft/models/stable_coin_currency.rb +28 -0
  129. data/lib/devdraft/models/update_customer_dto.rb +293 -0
  130. data/lib/devdraft/models/update_payment_link_dto.rb +197 -0
  131. data/lib/devdraft/models/update_preference_input.rb +197 -0
  132. data/lib/devdraft/models/update_product_dto.rb +355 -0
  133. data/lib/devdraft/models/update_tax_input.rb +197 -0
  134. data/lib/devdraft/models/update_webhook_dto.rb +251 -0
  135. data/lib/devdraft/models/webhook_response_dto.rb +317 -0
  136. data/lib/devdraft/version.rb +14 -0
  137. data/lib/devdraft.rb +101 -0
  138. data/spec/api/api_health_api_spec.rb +54 -0
  139. data/spec/api/app_balances_api_spec.rb +67 -0
  140. data/spec/api/customers_api_spec.rb +87 -0
  141. data/spec/api/exchange_rates_api_spec.rb +69 -0
  142. data/spec/api/invoices_api_spec.rb +80 -0
  143. data/spec/api/liquidation_addresses_api_spec.rb +72 -0
  144. data/spec/api/payment_intents_api_spec.rb +60 -0
  145. data/spec/api/payment_links_api_spec.rb +81 -0
  146. data/spec/api/products_api_spec.rb +130 -0
  147. data/spec/api/taxes_api_spec.rb +91 -0
  148. data/spec/api/test_payments_api_spec.rb +71 -0
  149. data/spec/api/transfers_api_spec.rb +67 -0
  150. data/spec/api/wallets_api_spec.rb +44 -0
  151. data/spec/api/webhooks_api_spec.rb +96 -0
  152. data/spec/api_client_spec.rb +225 -0
  153. data/spec/base_object_spec.rb +109 -0
  154. data/spec/configuration_spec.rb +41 -0
  155. data/spec/models/aggregated_balance_response_spec.rb +56 -0
  156. data/spec/models/all_balances_response_spec.rb +52 -0
  157. data/spec/models/all_of_all_balances_response_eurc_spec.rb +56 -0
  158. data/spec/models/all_of_all_balances_response_usdc_spec.rb +56 -0
  159. data/spec/models/all_of_create_bank_payment_intent_dto_destination_currency_spec.rb +34 -0
  160. data/spec/models/all_of_create_bank_payment_intent_dto_destination_network_spec.rb +34 -0
  161. data/spec/models/all_of_create_bank_payment_intent_dto_source_currency_spec.rb +34 -0
  162. data/spec/models/all_of_create_bank_payment_intent_dto_source_payment_rail_spec.rb +34 -0
  163. data/spec/models/all_of_create_customer_dto_status_spec.rb +34 -0
  164. data/spec/models/all_of_create_liquidation_address_dto_destination_currency_spec.rb +34 -0
  165. data/spec/models/all_of_create_liquidation_address_dto_destination_payment_rail_spec.rb +34 -0
  166. data/spec/models/all_of_create_stable_payment_intent_dto_destination_currency_spec.rb +34 -0
  167. data/spec/models/all_of_create_stable_payment_intent_dto_destination_network_spec.rb +34 -0
  168. data/spec/models/all_of_create_stable_payment_intent_dto_source_currency_spec.rb +34 -0
  169. data/spec/models/all_of_create_stable_payment_intent_dto_source_network_spec.rb +34 -0
  170. data/spec/models/all_of_update_customer_dto_status_spec.rb +34 -0
  171. data/spec/models/bridge_payment_rail_spec.rb +34 -0
  172. data/spec/models/create_bank_payment_intent_dto_spec.rb +142 -0
  173. data/spec/models/create_customer_dto_spec.rb +74 -0
  174. data/spec/models/create_direct_bank_transfer_dto_spec.rb +82 -0
  175. data/spec/models/create_direct_wallet_transfer_dto_spec.rb +58 -0
  176. data/spec/models/create_invoice_dto_spec.rb +146 -0
  177. data/spec/models/create_liquidation_address_dto_spec.rb +132 -0
  178. data/spec/models/create_payment_link_dto_spec.rb +200 -0
  179. data/spec/models/create_product_dto_spec.rb +110 -0
  180. data/spec/models/create_stable_payment_intent_dto_spec.rb +124 -0
  181. data/spec/models/create_stablecoin_conversion_dto_spec.rb +64 -0
  182. data/spec/models/create_tax_input_spec.rb +34 -0
  183. data/spec/models/create_webhook_dto_spec.rb +64 -0
  184. data/spec/models/customer_status_spec.rb +34 -0
  185. data/spec/models/destination_currency_spec.rb +34 -0
  186. data/spec/models/exchange_rate_response_dto_spec.rb +70 -0
  187. data/spec/models/fiat_currency_spec.rb +34 -0
  188. data/spec/models/health_response_dto_spec.rb +78 -0
  189. data/spec/models/invoice_product_dto_spec.rb +46 -0
  190. data/spec/models/liquidation_address_response_dto_spec.rb +118 -0
  191. data/spec/models/payment_link_product_dto_spec.rb +46 -0
  192. data/spec/models/payment_request_dto_spec.rb +58 -0
  193. data/spec/models/payment_response_dto_spec.rb +64 -0
  194. data/spec/models/public_health_response_dto_spec.rb +56 -0
  195. data/spec/models/refund_response_dto_spec.rb +64 -0
  196. data/spec/models/stable_coin_currency_spec.rb +34 -0
  197. data/spec/models/update_customer_dto_spec.rb +74 -0
  198. data/spec/models/update_payment_link_dto_spec.rb +34 -0
  199. data/spec/models/update_preference_input_spec.rb +34 -0
  200. data/spec/models/update_product_dto_spec.rb +110 -0
  201. data/spec/models/update_tax_input_spec.rb +34 -0
  202. data/spec/models/update_webhook_dto_spec.rb +64 -0
  203. data/spec/models/webhook_response_dto_spec.rb +82 -0
  204. data/spec/spec_helper.rb +110 -0
  205. metadata +375 -0
@@ -0,0 +1,397 @@
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
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.65
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module DevDraftAI
15
+ class CreateBankPaymentIntentDto
16
+ # The banking payment method to use for the transfer. Determines processing time and fees.
17
+ attr_accessor :source_payment_rail
18
+
19
+ # The fiat currency to convert FROM. Must match the currency of the source payment rail.
20
+ attr_accessor :source_currency
21
+
22
+ # The stablecoin currency to convert TO. The customer will receive this currency.
23
+ attr_accessor :destination_currency
24
+
25
+ # The blockchain network where the stablecoin will be delivered. Must support the destination currency.
26
+ attr_accessor :destination_network
27
+
28
+ # Destination wallet address. Supports Ethereum (0x...) and Solana address formats.
29
+ attr_accessor :destination_address
30
+
31
+ # Payment amount (optional for flexible amount)
32
+ attr_accessor :amount
33
+
34
+ # Customer first name
35
+ attr_accessor :customer_first_name
36
+
37
+ # Customer last name
38
+ attr_accessor :customer_last_name
39
+
40
+ # Customer email address
41
+ attr_accessor :customer_email
42
+
43
+ # Customer address
44
+ attr_accessor :customer_address
45
+
46
+ # Customer country
47
+ attr_accessor :customer_country
48
+
49
+ # Customer country ISO code
50
+ attr_accessor :customer_country_iso
51
+
52
+ # Customer province/state
53
+ attr_accessor :customer_province
54
+
55
+ # Customer province/state ISO code
56
+ attr_accessor :customer_province_iso
57
+
58
+ # Customer phone number
59
+ attr_accessor :phone_number
60
+
61
+ # Wire transfer message (for WIRE transfers)
62
+ attr_accessor :wire_message
63
+
64
+ # SEPA reference (for SEPA transfers)
65
+ attr_accessor :sepa_reference
66
+
67
+ # ACH reference (for ACH transfers)
68
+ attr_accessor :ach_reference
69
+
70
+ # Attribute mapping from ruby-style variable name to JSON key.
71
+ def self.attribute_map
72
+ {
73
+ :'source_payment_rail' => :'sourcePaymentRail',
74
+ :'source_currency' => :'sourceCurrency',
75
+ :'destination_currency' => :'destinationCurrency',
76
+ :'destination_network' => :'destinationNetwork',
77
+ :'destination_address' => :'destinationAddress',
78
+ :'amount' => :'amount',
79
+ :'customer_first_name' => :'customer_first_name',
80
+ :'customer_last_name' => :'customer_last_name',
81
+ :'customer_email' => :'customer_email',
82
+ :'customer_address' => :'customer_address',
83
+ :'customer_country' => :'customer_country',
84
+ :'customer_country_iso' => :'customer_countryISO',
85
+ :'customer_province' => :'customer_province',
86
+ :'customer_province_iso' => :'customer_provinceISO',
87
+ :'phone_number' => :'phoneNumber',
88
+ :'wire_message' => :'wire_message',
89
+ :'sepa_reference' => :'sepa_reference',
90
+ :'ach_reference' => :'ach_reference'
91
+ }
92
+ end
93
+
94
+ # Attribute type mapping.
95
+ def self.openapi_types
96
+ {
97
+ :'source_payment_rail' => :'Object',
98
+ :'source_currency' => :'Object',
99
+ :'destination_currency' => :'Object',
100
+ :'destination_network' => :'Object',
101
+ :'destination_address' => :'Object',
102
+ :'amount' => :'Object',
103
+ :'customer_first_name' => :'Object',
104
+ :'customer_last_name' => :'Object',
105
+ :'customer_email' => :'Object',
106
+ :'customer_address' => :'Object',
107
+ :'customer_country' => :'Object',
108
+ :'customer_country_iso' => :'Object',
109
+ :'customer_province' => :'Object',
110
+ :'customer_province_iso' => :'Object',
111
+ :'phone_number' => :'Object',
112
+ :'wire_message' => :'Object',
113
+ :'sepa_reference' => :'Object',
114
+ :'ach_reference' => :'Object'
115
+ }
116
+ end
117
+
118
+ # List of attributes with nullable: true
119
+ def self.openapi_nullable
120
+ Set.new([
121
+ ])
122
+ end
123
+
124
+ # Initializes the object
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ def initialize(attributes = {})
127
+ if (!attributes.is_a?(Hash))
128
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DevDraftAI::CreateBankPaymentIntentDto` initialize method"
129
+ end
130
+
131
+ # check to see if the attribute exists and convert string to symbol for hash key
132
+ attributes = attributes.each_with_object({}) { |(k, v), h|
133
+ if (!self.class.attribute_map.key?(k.to_sym))
134
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DevDraftAI::CreateBankPaymentIntentDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
135
+ end
136
+ h[k.to_sym] = v
137
+ }
138
+
139
+ if attributes.key?(:'source_payment_rail')
140
+ self.source_payment_rail = attributes[:'source_payment_rail']
141
+ end
142
+
143
+ if attributes.key?(:'source_currency')
144
+ self.source_currency = attributes[:'source_currency']
145
+ end
146
+
147
+ if attributes.key?(:'destination_currency')
148
+ self.destination_currency = attributes[:'destination_currency']
149
+ end
150
+
151
+ if attributes.key?(:'destination_network')
152
+ self.destination_network = attributes[:'destination_network']
153
+ end
154
+
155
+ if attributes.key?(:'destination_address')
156
+ self.destination_address = attributes[:'destination_address']
157
+ end
158
+
159
+ if attributes.key?(:'amount')
160
+ self.amount = attributes[:'amount']
161
+ end
162
+
163
+ if attributes.key?(:'customer_first_name')
164
+ self.customer_first_name = attributes[:'customer_first_name']
165
+ end
166
+
167
+ if attributes.key?(:'customer_last_name')
168
+ self.customer_last_name = attributes[:'customer_last_name']
169
+ end
170
+
171
+ if attributes.key?(:'customer_email')
172
+ self.customer_email = attributes[:'customer_email']
173
+ end
174
+
175
+ if attributes.key?(:'customer_address')
176
+ self.customer_address = attributes[:'customer_address']
177
+ end
178
+
179
+ if attributes.key?(:'customer_country')
180
+ self.customer_country = attributes[:'customer_country']
181
+ end
182
+
183
+ if attributes.key?(:'customer_country_iso')
184
+ self.customer_country_iso = attributes[:'customer_country_iso']
185
+ end
186
+
187
+ if attributes.key?(:'customer_province')
188
+ self.customer_province = attributes[:'customer_province']
189
+ end
190
+
191
+ if attributes.key?(:'customer_province_iso')
192
+ self.customer_province_iso = attributes[:'customer_province_iso']
193
+ end
194
+
195
+ if attributes.key?(:'phone_number')
196
+ self.phone_number = attributes[:'phone_number']
197
+ end
198
+
199
+ if attributes.key?(:'wire_message')
200
+ self.wire_message = attributes[:'wire_message']
201
+ end
202
+
203
+ if attributes.key?(:'sepa_reference')
204
+ self.sepa_reference = attributes[:'sepa_reference']
205
+ end
206
+
207
+ if attributes.key?(:'ach_reference')
208
+ self.ach_reference = attributes[:'ach_reference']
209
+ end
210
+ end
211
+
212
+ # Show invalid properties with the reasons. Usually used together with valid?
213
+ # @return Array for valid properties with the reasons
214
+ def list_invalid_properties
215
+ invalid_properties = Array.new
216
+ if @source_payment_rail.nil?
217
+ invalid_properties.push('invalid value for "source_payment_rail", source_payment_rail cannot be nil.')
218
+ end
219
+
220
+ if @source_currency.nil?
221
+ invalid_properties.push('invalid value for "source_currency", source_currency cannot be nil.')
222
+ end
223
+
224
+ if @destination_currency.nil?
225
+ invalid_properties.push('invalid value for "destination_currency", destination_currency cannot be nil.')
226
+ end
227
+
228
+ if @destination_network.nil?
229
+ invalid_properties.push('invalid value for "destination_network", destination_network cannot be nil.')
230
+ end
231
+
232
+ invalid_properties
233
+ end
234
+
235
+ # Check to see if the all the properties in the model are valid
236
+ # @return true if the model is valid
237
+ def valid?
238
+ return false if @source_payment_rail.nil?
239
+ return false if @source_currency.nil?
240
+ return false if @destination_currency.nil?
241
+ return false if @destination_network.nil?
242
+ true
243
+ end
244
+
245
+ # Checks equality by comparing each attribute.
246
+ # @param [Object] Object to be compared
247
+ def ==(o)
248
+ return true if self.equal?(o)
249
+ self.class == o.class &&
250
+ source_payment_rail == o.source_payment_rail &&
251
+ source_currency == o.source_currency &&
252
+ destination_currency == o.destination_currency &&
253
+ destination_network == o.destination_network &&
254
+ destination_address == o.destination_address &&
255
+ amount == o.amount &&
256
+ customer_first_name == o.customer_first_name &&
257
+ customer_last_name == o.customer_last_name &&
258
+ customer_email == o.customer_email &&
259
+ customer_address == o.customer_address &&
260
+ customer_country == o.customer_country &&
261
+ customer_country_iso == o.customer_country_iso &&
262
+ customer_province == o.customer_province &&
263
+ customer_province_iso == o.customer_province_iso &&
264
+ phone_number == o.phone_number &&
265
+ wire_message == o.wire_message &&
266
+ sepa_reference == o.sepa_reference &&
267
+ ach_reference == o.ach_reference
268
+ end
269
+
270
+ # @see the `==` method
271
+ # @param [Object] Object to be compared
272
+ def eql?(o)
273
+ self == o
274
+ end
275
+
276
+ # Calculates hash code according to all attributes.
277
+ # @return [Integer] Hash code
278
+ def hash
279
+ [source_payment_rail, source_currency, destination_currency, destination_network, destination_address, amount, customer_first_name, customer_last_name, customer_email, customer_address, customer_country, customer_country_iso, customer_province, customer_province_iso, phone_number, wire_message, sepa_reference, ach_reference].hash
280
+ end
281
+
282
+ # Builds the object from hash
283
+ # @param [Hash] attributes Model attributes in the form of hash
284
+ # @return [Object] Returns the model itself
285
+ def self.build_from_hash(attributes)
286
+ new.build_from_hash(attributes)
287
+ end
288
+
289
+ # Builds the object from hash
290
+ # @param [Hash] attributes Model attributes in the form of hash
291
+ # @return [Object] Returns the model itself
292
+ def build_from_hash(attributes)
293
+ return nil unless attributes.is_a?(Hash)
294
+ self.class.openapi_types.each_pair do |key, type|
295
+ if type =~ /\AArray<(.*)>/i
296
+ # check to ensure the input is an array given that the attribute
297
+ # is documented as an array but the input is not
298
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
299
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
300
+ end
301
+ elsif !attributes[self.class.attribute_map[key]].nil?
302
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
303
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
304
+ self.send("#{key}=", nil)
305
+ end
306
+ end
307
+
308
+ self
309
+ end
310
+
311
+ # Deserializes the data based on type
312
+ # @param string type Data type
313
+ # @param string value Value to be deserialized
314
+ # @return [Object] Deserialized data
315
+ def _deserialize(type, value)
316
+ case type.to_sym
317
+ when :DateTime
318
+ DateTime.parse(value)
319
+ when :Date
320
+ Date.parse(value)
321
+ when :String
322
+ value.to_s
323
+ when :Integer
324
+ value.to_i
325
+ when :Float
326
+ value.to_f
327
+ when :Boolean
328
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
329
+ true
330
+ else
331
+ false
332
+ end
333
+ when :Object
334
+ # generic object (usually a Hash), return directly
335
+ value
336
+ when /\AArray<(?<inner_type>.+)>\z/
337
+ inner_type = Regexp.last_match[:inner_type]
338
+ value.map { |v| _deserialize(inner_type, v) }
339
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
340
+ k_type = Regexp.last_match[:k_type]
341
+ v_type = Regexp.last_match[:v_type]
342
+ {}.tap do |hash|
343
+ value.each do |k, v|
344
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
345
+ end
346
+ end
347
+ else # model
348
+ DevDraftAI.const_get(type).build_from_hash(value)
349
+ end
350
+ end
351
+
352
+ # Returns the string representation of the object
353
+ # @return [String] String presentation of the object
354
+ def to_s
355
+ to_hash.to_s
356
+ end
357
+
358
+ # to_body is an alias to to_hash (backward compatibility)
359
+ # @return [Hash] Returns the object in the form of hash
360
+ def to_body
361
+ to_hash
362
+ end
363
+
364
+ # Returns the object in the form of hash
365
+ # @return [Hash] Returns the object in the form of hash
366
+ def to_hash
367
+ hash = {}
368
+ self.class.attribute_map.each_pair do |attr, param|
369
+ value = self.send(attr)
370
+ if value.nil?
371
+ is_nullable = self.class.openapi_nullable.include?(attr)
372
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
373
+ end
374
+
375
+ hash[param] = _to_hash(value)
376
+ end
377
+ hash
378
+ end
379
+
380
+ # Outputs non-array value in the form of hash
381
+ # For object, use to_hash. Otherwise, just return the value
382
+ # @param [Object] value Any valid value
383
+ # @return [Hash] Returns the value in the form of hash
384
+ def _to_hash(value)
385
+ if value.is_a?(Array)
386
+ value.compact.map { |v| _to_hash(v) }
387
+ elsif value.is_a?(Hash)
388
+ {}.tap do |hash|
389
+ value.each { |k, v| hash[k] = _to_hash(v) }
390
+ end
391
+ elsif value.respond_to? :to_hash
392
+ value.to_hash
393
+ else
394
+ value
395
+ end
396
+ end end
397
+ end
@@ -0,0 +1,308 @@
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
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.65
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module DevDraftAI
15
+ class CreateCustomerDto
16
+ # Customer's first name. Used for personalization and legal documentation.
17
+ attr_accessor :first_name
18
+
19
+ # Customer's last name. Used for personalization and legal documentation.
20
+ attr_accessor :last_name
21
+
22
+ # Customer's email address. Used for notifications, receipts, and account management. Must be a valid email format.
23
+ attr_accessor :email
24
+
25
+ # Customer's phone number. Used for SMS notifications and verification. Include country code for international numbers.
26
+ attr_accessor :phone_number
27
+
28
+ # Type of customer account. Determines available features and compliance requirements.
29
+ attr_accessor :customer_type
30
+
31
+ # Current status of the customer account. Controls access to services and features.
32
+ attr_accessor :status
33
+
34
+ class EnumAttributeValidator
35
+ attr_reader :datatype
36
+ attr_reader :allowable_values
37
+
38
+ def initialize(datatype, allowable_values)
39
+ @allowable_values = allowable_values.map do |value|
40
+ case datatype.to_s
41
+ when /Integer/i
42
+ value.to_i
43
+ when /Float/i
44
+ value.to_f
45
+ else
46
+ value
47
+ end
48
+ end
49
+ end
50
+
51
+ def valid?(value)
52
+ !value || allowable_values.include?(value)
53
+ end
54
+ end
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ {
59
+ :'first_name' => :'first_name',
60
+ :'last_name' => :'last_name',
61
+ :'email' => :'email',
62
+ :'phone_number' => :'phone_number',
63
+ :'customer_type' => :'customer_type',
64
+ :'status' => :'status'
65
+ }
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'first_name' => :'Object',
72
+ :'last_name' => :'Object',
73
+ :'email' => :'Object',
74
+ :'phone_number' => :'Object',
75
+ :'customer_type' => :'Object',
76
+ :'status' => :'Object'
77
+ }
78
+ end
79
+
80
+ # List of attributes with nullable: true
81
+ def self.openapi_nullable
82
+ Set.new([
83
+ ])
84
+ end
85
+
86
+ # Initializes the object
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ def initialize(attributes = {})
89
+ if (!attributes.is_a?(Hash))
90
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DevDraftAI::CreateCustomerDto` initialize method"
91
+ end
92
+
93
+ # check to see if the attribute exists and convert string to symbol for hash key
94
+ attributes = attributes.each_with_object({}) { |(k, v), h|
95
+ if (!self.class.attribute_map.key?(k.to_sym))
96
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DevDraftAI::CreateCustomerDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
97
+ end
98
+ h[k.to_sym] = v
99
+ }
100
+
101
+ if attributes.key?(:'first_name')
102
+ self.first_name = attributes[:'first_name']
103
+ end
104
+
105
+ if attributes.key?(:'last_name')
106
+ self.last_name = attributes[:'last_name']
107
+ end
108
+
109
+ if attributes.key?(:'email')
110
+ self.email = attributes[:'email']
111
+ end
112
+
113
+ if attributes.key?(:'phone_number')
114
+ self.phone_number = attributes[:'phone_number']
115
+ end
116
+
117
+ if attributes.key?(:'customer_type')
118
+ self.customer_type = attributes[:'customer_type']
119
+ else
120
+ self.customer_type = 'Individual'
121
+ end
122
+
123
+ if attributes.key?(:'status')
124
+ self.status = attributes[:'status']
125
+ end
126
+ end
127
+
128
+ # Show invalid properties with the reasons. Usually used together with valid?
129
+ # @return Array for valid properties with the reasons
130
+ def list_invalid_properties
131
+ invalid_properties = Array.new
132
+ if @first_name.nil?
133
+ invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
134
+ end
135
+
136
+ if @last_name.nil?
137
+ invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
138
+ end
139
+
140
+ if @phone_number.nil?
141
+ invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
142
+ end
143
+
144
+ invalid_properties
145
+ end
146
+
147
+ # Check to see if the all the properties in the model are valid
148
+ # @return true if the model is valid
149
+ def valid?
150
+ return false if @first_name.nil?
151
+ return false if @last_name.nil?
152
+ return false if @phone_number.nil?
153
+ customer_type_validator = EnumAttributeValidator.new('Object', ['Individual', 'Business', 'Enterprise', 'Non-Profit'])
154
+ return false unless customer_type_validator.valid?(@customer_type)
155
+ true
156
+ end
157
+
158
+ # Custom attribute writer method checking allowed values (enum).
159
+ # @param [Object] customer_type Object to be assigned
160
+ def customer_type=(customer_type)
161
+ validator = EnumAttributeValidator.new('Object', ['Individual', 'Business', 'Enterprise', 'Non-Profit'])
162
+ unless validator.valid?(customer_type)
163
+ fail ArgumentError, "invalid value for \"customer_type\", must be one of #{validator.allowable_values}."
164
+ end
165
+ @customer_type = customer_type
166
+ end
167
+
168
+ # Checks equality by comparing each attribute.
169
+ # @param [Object] Object to be compared
170
+ def ==(o)
171
+ return true if self.equal?(o)
172
+ self.class == o.class &&
173
+ first_name == o.first_name &&
174
+ last_name == o.last_name &&
175
+ email == o.email &&
176
+ phone_number == o.phone_number &&
177
+ customer_type == o.customer_type &&
178
+ status == o.status
179
+ end
180
+
181
+ # @see the `==` method
182
+ # @param [Object] Object to be compared
183
+ def eql?(o)
184
+ self == o
185
+ end
186
+
187
+ # Calculates hash code according to all attributes.
188
+ # @return [Integer] Hash code
189
+ def hash
190
+ [first_name, last_name, email, phone_number, customer_type, status].hash
191
+ end
192
+
193
+ # Builds the object from hash
194
+ # @param [Hash] attributes Model attributes in the form of hash
195
+ # @return [Object] Returns the model itself
196
+ def self.build_from_hash(attributes)
197
+ new.build_from_hash(attributes)
198
+ end
199
+
200
+ # Builds the object from hash
201
+ # @param [Hash] attributes Model attributes in the form of hash
202
+ # @return [Object] Returns the model itself
203
+ def build_from_hash(attributes)
204
+ return nil unless attributes.is_a?(Hash)
205
+ self.class.openapi_types.each_pair do |key, type|
206
+ if type =~ /\AArray<(.*)>/i
207
+ # check to ensure the input is an array given that the attribute
208
+ # is documented as an array but the input is not
209
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
210
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
211
+ end
212
+ elsif !attributes[self.class.attribute_map[key]].nil?
213
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
214
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
215
+ self.send("#{key}=", nil)
216
+ end
217
+ end
218
+
219
+ self
220
+ end
221
+
222
+ # Deserializes the data based on type
223
+ # @param string type Data type
224
+ # @param string value Value to be deserialized
225
+ # @return [Object] Deserialized data
226
+ def _deserialize(type, value)
227
+ case type.to_sym
228
+ when :DateTime
229
+ DateTime.parse(value)
230
+ when :Date
231
+ Date.parse(value)
232
+ when :String
233
+ value.to_s
234
+ when :Integer
235
+ value.to_i
236
+ when :Float
237
+ value.to_f
238
+ when :Boolean
239
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
240
+ true
241
+ else
242
+ false
243
+ end
244
+ when :Object
245
+ # generic object (usually a Hash), return directly
246
+ value
247
+ when /\AArray<(?<inner_type>.+)>\z/
248
+ inner_type = Regexp.last_match[:inner_type]
249
+ value.map { |v| _deserialize(inner_type, v) }
250
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
251
+ k_type = Regexp.last_match[:k_type]
252
+ v_type = Regexp.last_match[:v_type]
253
+ {}.tap do |hash|
254
+ value.each do |k, v|
255
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
256
+ end
257
+ end
258
+ else # model
259
+ DevDraftAI.const_get(type).build_from_hash(value)
260
+ end
261
+ end
262
+
263
+ # Returns the string representation of the object
264
+ # @return [String] String presentation of the object
265
+ def to_s
266
+ to_hash.to_s
267
+ end
268
+
269
+ # to_body is an alias to to_hash (backward compatibility)
270
+ # @return [Hash] Returns the object in the form of hash
271
+ def to_body
272
+ to_hash
273
+ end
274
+
275
+ # Returns the object in the form of hash
276
+ # @return [Hash] Returns the object in the form of hash
277
+ def to_hash
278
+ hash = {}
279
+ self.class.attribute_map.each_pair do |attr, param|
280
+ value = self.send(attr)
281
+ if value.nil?
282
+ is_nullable = self.class.openapi_nullable.include?(attr)
283
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
284
+ end
285
+
286
+ hash[param] = _to_hash(value)
287
+ end
288
+ hash
289
+ end
290
+
291
+ # Outputs non-array value in the form of hash
292
+ # For object, use to_hash. Otherwise, just return the value
293
+ # @param [Object] value Any valid value
294
+ # @return [Hash] Returns the value in the form of hash
295
+ def _to_hash(value)
296
+ if value.is_a?(Array)
297
+ value.compact.map { |v| _to_hash(v) }
298
+ elsif value.is_a?(Hash)
299
+ {}.tap do |hash|
300
+ value.each { |k, v| hash[k] = _to_hash(v) }
301
+ end
302
+ elsif value.respond_to? :to_hash
303
+ value.to_hash
304
+ else
305
+ value
306
+ end
307
+ end end
308
+ end