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,202 @@
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
+ # The stablecoin currency to convert FROM. This is the currency the customer will pay with.
16
+ class AllOfCreateStablePaymentIntentDtoSourceCurrency
17
+ # Attribute mapping from ruby-style variable name to JSON key.
18
+ def self.attribute_map
19
+ {
20
+ }
21
+ end
22
+
23
+ # Attribute type mapping.
24
+ def self.openapi_types
25
+ {
26
+ }
27
+ end
28
+
29
+ # List of attributes with nullable: true
30
+ def self.openapi_nullable
31
+ Set.new([
32
+ ])
33
+ end
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ def initialize(attributes = {})
38
+ if (!attributes.is_a?(Hash))
39
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DevDraftAI::AllOfCreateStablePaymentIntentDtoSourceCurrency` initialize method"
40
+ end
41
+
42
+ # check to see if the attribute exists and convert string to symbol for hash key
43
+ attributes = attributes.each_with_object({}) { |(k, v), h|
44
+ if (!self.class.attribute_map.key?(k.to_sym))
45
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DevDraftAI::AllOfCreateStablePaymentIntentDtoSourceCurrency`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
46
+ end
47
+ h[k.to_sym] = v
48
+ }
49
+
50
+ # call parent's initialize
51
+ super(attributes)
52
+ end
53
+
54
+ # Show invalid properties with the reasons. Usually used together with valid?
55
+ # @return Array for valid properties with the reasons
56
+ def list_invalid_properties
57
+ invalid_properties = super
58
+ invalid_properties
59
+ end
60
+
61
+ # Check to see if the all the properties in the model are valid
62
+ # @return true if the model is valid
63
+ def valid?
64
+ true
65
+ end
66
+
67
+ # Checks equality by comparing each attribute.
68
+ # @param [Object] Object to be compared
69
+ def ==(o)
70
+ return true if self.equal?(o)
71
+ self.class == o.class && super(o)
72
+ end
73
+
74
+ # @see the `==` method
75
+ # @param [Object] Object to be compared
76
+ def eql?(o)
77
+ self == o
78
+ end
79
+
80
+ # Calculates hash code according to all attributes.
81
+ # @return [Integer] Hash code
82
+ def hash
83
+ [].hash
84
+ end
85
+
86
+ # Builds the object from hash
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ # @return [Object] Returns the model itself
89
+ def self.build_from_hash(attributes)
90
+ new.build_from_hash(attributes)
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def build_from_hash(attributes)
97
+ return nil unless attributes.is_a?(Hash)
98
+ super(attributes)
99
+ self.class.openapi_types.each_pair do |key, type|
100
+ if type =~ /\AArray<(.*)>/i
101
+ # check to ensure the input is an array given that the attribute
102
+ # is documented as an array but the input is not
103
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
104
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
105
+ end
106
+ elsif !attributes[self.class.attribute_map[key]].nil?
107
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
108
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
109
+ self.send("#{key}=", nil)
110
+ end
111
+ end
112
+
113
+ self
114
+ end
115
+
116
+ # Deserializes the data based on type
117
+ # @param string type Data type
118
+ # @param string value Value to be deserialized
119
+ # @return [Object] Deserialized data
120
+ def _deserialize(type, value)
121
+ case type.to_sym
122
+ when :DateTime
123
+ DateTime.parse(value)
124
+ when :Date
125
+ Date.parse(value)
126
+ when :String
127
+ value.to_s
128
+ when :Integer
129
+ value.to_i
130
+ when :Float
131
+ value.to_f
132
+ when :Boolean
133
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
134
+ true
135
+ else
136
+ false
137
+ end
138
+ when :Object
139
+ # generic object (usually a Hash), return directly
140
+ value
141
+ when /\AArray<(?<inner_type>.+)>\z/
142
+ inner_type = Regexp.last_match[:inner_type]
143
+ value.map { |v| _deserialize(inner_type, v) }
144
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
145
+ k_type = Regexp.last_match[:k_type]
146
+ v_type = Regexp.last_match[:v_type]
147
+ {}.tap do |hash|
148
+ value.each do |k, v|
149
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
150
+ end
151
+ end
152
+ else # model
153
+ DevDraftAI.const_get(type).build_from_hash(value)
154
+ end
155
+ end
156
+
157
+ # Returns the string representation of the object
158
+ # @return [String] String presentation of the object
159
+ def to_s
160
+ to_hash.to_s
161
+ end
162
+
163
+ # to_body is an alias to to_hash (backward compatibility)
164
+ # @return [Hash] Returns the object in the form of hash
165
+ def to_body
166
+ to_hash
167
+ end
168
+
169
+ # Returns the object in the form of hash
170
+ # @return [Hash] Returns the object in the form of hash
171
+ def to_hash
172
+ hash = super
173
+ self.class.attribute_map.each_pair do |attr, param|
174
+ value = self.send(attr)
175
+ if value.nil?
176
+ is_nullable = self.class.openapi_nullable.include?(attr)
177
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
178
+ end
179
+
180
+ hash[param] = _to_hash(value)
181
+ end
182
+ hash
183
+ end
184
+
185
+ # Outputs non-array value in the form of hash
186
+ # For object, use to_hash. Otherwise, just return the value
187
+ # @param [Object] value Any valid value
188
+ # @return [Hash] Returns the value in the form of hash
189
+ def _to_hash(value)
190
+ if value.is_a?(Array)
191
+ value.compact.map { |v| _to_hash(v) }
192
+ elsif value.is_a?(Hash)
193
+ {}.tap do |hash|
194
+ value.each { |k, v| hash[k] = _to_hash(v) }
195
+ end
196
+ elsif value.respond_to? :to_hash
197
+ value.to_hash
198
+ else
199
+ value
200
+ end
201
+ end end
202
+ end
@@ -0,0 +1,202 @@
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
+ # The blockchain network where the source currency resides. Determines gas fees and transaction speed.
16
+ class AllOfCreateStablePaymentIntentDtoSourceNetwork
17
+ # Attribute mapping from ruby-style variable name to JSON key.
18
+ def self.attribute_map
19
+ {
20
+ }
21
+ end
22
+
23
+ # Attribute type mapping.
24
+ def self.openapi_types
25
+ {
26
+ }
27
+ end
28
+
29
+ # List of attributes with nullable: true
30
+ def self.openapi_nullable
31
+ Set.new([
32
+ ])
33
+ end
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ def initialize(attributes = {})
38
+ if (!attributes.is_a?(Hash))
39
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DevDraftAI::AllOfCreateStablePaymentIntentDtoSourceNetwork` initialize method"
40
+ end
41
+
42
+ # check to see if the attribute exists and convert string to symbol for hash key
43
+ attributes = attributes.each_with_object({}) { |(k, v), h|
44
+ if (!self.class.attribute_map.key?(k.to_sym))
45
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DevDraftAI::AllOfCreateStablePaymentIntentDtoSourceNetwork`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
46
+ end
47
+ h[k.to_sym] = v
48
+ }
49
+
50
+ # call parent's initialize
51
+ super(attributes)
52
+ end
53
+
54
+ # Show invalid properties with the reasons. Usually used together with valid?
55
+ # @return Array for valid properties with the reasons
56
+ def list_invalid_properties
57
+ invalid_properties = super
58
+ invalid_properties
59
+ end
60
+
61
+ # Check to see if the all the properties in the model are valid
62
+ # @return true if the model is valid
63
+ def valid?
64
+ true
65
+ end
66
+
67
+ # Checks equality by comparing each attribute.
68
+ # @param [Object] Object to be compared
69
+ def ==(o)
70
+ return true if self.equal?(o)
71
+ self.class == o.class && super(o)
72
+ end
73
+
74
+ # @see the `==` method
75
+ # @param [Object] Object to be compared
76
+ def eql?(o)
77
+ self == o
78
+ end
79
+
80
+ # Calculates hash code according to all attributes.
81
+ # @return [Integer] Hash code
82
+ def hash
83
+ [].hash
84
+ end
85
+
86
+ # Builds the object from hash
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ # @return [Object] Returns the model itself
89
+ def self.build_from_hash(attributes)
90
+ new.build_from_hash(attributes)
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def build_from_hash(attributes)
97
+ return nil unless attributes.is_a?(Hash)
98
+ super(attributes)
99
+ self.class.openapi_types.each_pair do |key, type|
100
+ if type =~ /\AArray<(.*)>/i
101
+ # check to ensure the input is an array given that the attribute
102
+ # is documented as an array but the input is not
103
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
104
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
105
+ end
106
+ elsif !attributes[self.class.attribute_map[key]].nil?
107
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
108
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
109
+ self.send("#{key}=", nil)
110
+ end
111
+ end
112
+
113
+ self
114
+ end
115
+
116
+ # Deserializes the data based on type
117
+ # @param string type Data type
118
+ # @param string value Value to be deserialized
119
+ # @return [Object] Deserialized data
120
+ def _deserialize(type, value)
121
+ case type.to_sym
122
+ when :DateTime
123
+ DateTime.parse(value)
124
+ when :Date
125
+ Date.parse(value)
126
+ when :String
127
+ value.to_s
128
+ when :Integer
129
+ value.to_i
130
+ when :Float
131
+ value.to_f
132
+ when :Boolean
133
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
134
+ true
135
+ else
136
+ false
137
+ end
138
+ when :Object
139
+ # generic object (usually a Hash), return directly
140
+ value
141
+ when /\AArray<(?<inner_type>.+)>\z/
142
+ inner_type = Regexp.last_match[:inner_type]
143
+ value.map { |v| _deserialize(inner_type, v) }
144
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
145
+ k_type = Regexp.last_match[:k_type]
146
+ v_type = Regexp.last_match[:v_type]
147
+ {}.tap do |hash|
148
+ value.each do |k, v|
149
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
150
+ end
151
+ end
152
+ else # model
153
+ DevDraftAI.const_get(type).build_from_hash(value)
154
+ end
155
+ end
156
+
157
+ # Returns the string representation of the object
158
+ # @return [String] String presentation of the object
159
+ def to_s
160
+ to_hash.to_s
161
+ end
162
+
163
+ # to_body is an alias to to_hash (backward compatibility)
164
+ # @return [Hash] Returns the object in the form of hash
165
+ def to_body
166
+ to_hash
167
+ end
168
+
169
+ # Returns the object in the form of hash
170
+ # @return [Hash] Returns the object in the form of hash
171
+ def to_hash
172
+ hash = super
173
+ self.class.attribute_map.each_pair do |attr, param|
174
+ value = self.send(attr)
175
+ if value.nil?
176
+ is_nullable = self.class.openapi_nullable.include?(attr)
177
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
178
+ end
179
+
180
+ hash[param] = _to_hash(value)
181
+ end
182
+ hash
183
+ end
184
+
185
+ # Outputs non-array value in the form of hash
186
+ # For object, use to_hash. Otherwise, just return the value
187
+ # @param [Object] value Any valid value
188
+ # @return [Hash] Returns the value in the form of hash
189
+ def _to_hash(value)
190
+ if value.is_a?(Array)
191
+ value.compact.map { |v| _to_hash(v) }
192
+ elsif value.is_a?(Hash)
193
+ {}.tap do |hash|
194
+ value.each { |k, v| hash[k] = _to_hash(v) }
195
+ end
196
+ elsif value.respond_to? :to_hash
197
+ value.to_hash
198
+ else
199
+ value
200
+ end
201
+ end end
202
+ end
@@ -0,0 +1,202 @@
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
+ # Current status of the customer account. Controls access to services and features.
16
+ class AllOfUpdateCustomerDtoStatus
17
+ # Attribute mapping from ruby-style variable name to JSON key.
18
+ def self.attribute_map
19
+ {
20
+ }
21
+ end
22
+
23
+ # Attribute type mapping.
24
+ def self.openapi_types
25
+ {
26
+ }
27
+ end
28
+
29
+ # List of attributes with nullable: true
30
+ def self.openapi_nullable
31
+ Set.new([
32
+ ])
33
+ end
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ def initialize(attributes = {})
38
+ if (!attributes.is_a?(Hash))
39
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DevDraftAI::AllOfUpdateCustomerDtoStatus` initialize method"
40
+ end
41
+
42
+ # check to see if the attribute exists and convert string to symbol for hash key
43
+ attributes = attributes.each_with_object({}) { |(k, v), h|
44
+ if (!self.class.attribute_map.key?(k.to_sym))
45
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DevDraftAI::AllOfUpdateCustomerDtoStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
46
+ end
47
+ h[k.to_sym] = v
48
+ }
49
+
50
+ # call parent's initialize
51
+ super(attributes)
52
+ end
53
+
54
+ # Show invalid properties with the reasons. Usually used together with valid?
55
+ # @return Array for valid properties with the reasons
56
+ def list_invalid_properties
57
+ invalid_properties = super
58
+ invalid_properties
59
+ end
60
+
61
+ # Check to see if the all the properties in the model are valid
62
+ # @return true if the model is valid
63
+ def valid?
64
+ true
65
+ end
66
+
67
+ # Checks equality by comparing each attribute.
68
+ # @param [Object] Object to be compared
69
+ def ==(o)
70
+ return true if self.equal?(o)
71
+ self.class == o.class && super(o)
72
+ end
73
+
74
+ # @see the `==` method
75
+ # @param [Object] Object to be compared
76
+ def eql?(o)
77
+ self == o
78
+ end
79
+
80
+ # Calculates hash code according to all attributes.
81
+ # @return [Integer] Hash code
82
+ def hash
83
+ [].hash
84
+ end
85
+
86
+ # Builds the object from hash
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ # @return [Object] Returns the model itself
89
+ def self.build_from_hash(attributes)
90
+ new.build_from_hash(attributes)
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def build_from_hash(attributes)
97
+ return nil unless attributes.is_a?(Hash)
98
+ super(attributes)
99
+ self.class.openapi_types.each_pair do |key, type|
100
+ if type =~ /\AArray<(.*)>/i
101
+ # check to ensure the input is an array given that the attribute
102
+ # is documented as an array but the input is not
103
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
104
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
105
+ end
106
+ elsif !attributes[self.class.attribute_map[key]].nil?
107
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
108
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
109
+ self.send("#{key}=", nil)
110
+ end
111
+ end
112
+
113
+ self
114
+ end
115
+
116
+ # Deserializes the data based on type
117
+ # @param string type Data type
118
+ # @param string value Value to be deserialized
119
+ # @return [Object] Deserialized data
120
+ def _deserialize(type, value)
121
+ case type.to_sym
122
+ when :DateTime
123
+ DateTime.parse(value)
124
+ when :Date
125
+ Date.parse(value)
126
+ when :String
127
+ value.to_s
128
+ when :Integer
129
+ value.to_i
130
+ when :Float
131
+ value.to_f
132
+ when :Boolean
133
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
134
+ true
135
+ else
136
+ false
137
+ end
138
+ when :Object
139
+ # generic object (usually a Hash), return directly
140
+ value
141
+ when /\AArray<(?<inner_type>.+)>\z/
142
+ inner_type = Regexp.last_match[:inner_type]
143
+ value.map { |v| _deserialize(inner_type, v) }
144
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
145
+ k_type = Regexp.last_match[:k_type]
146
+ v_type = Regexp.last_match[:v_type]
147
+ {}.tap do |hash|
148
+ value.each do |k, v|
149
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
150
+ end
151
+ end
152
+ else # model
153
+ DevDraftAI.const_get(type).build_from_hash(value)
154
+ end
155
+ end
156
+
157
+ # Returns the string representation of the object
158
+ # @return [String] String presentation of the object
159
+ def to_s
160
+ to_hash.to_s
161
+ end
162
+
163
+ # to_body is an alias to to_hash (backward compatibility)
164
+ # @return [Hash] Returns the object in the form of hash
165
+ def to_body
166
+ to_hash
167
+ end
168
+
169
+ # Returns the object in the form of hash
170
+ # @return [Hash] Returns the object in the form of hash
171
+ def to_hash
172
+ hash = super
173
+ self.class.attribute_map.each_pair do |attr, param|
174
+ value = self.send(attr)
175
+ if value.nil?
176
+ is_nullable = self.class.openapi_nullable.include?(attr)
177
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
178
+ end
179
+
180
+ hash[param] = _to_hash(value)
181
+ end
182
+ hash
183
+ end
184
+
185
+ # Outputs non-array value in the form of hash
186
+ # For object, use to_hash. Otherwise, just return the value
187
+ # @param [Object] value Any valid value
188
+ # @return [Hash] Returns the value in the form of hash
189
+ def _to_hash(value)
190
+ if value.is_a?(Array)
191
+ value.compact.map { |v| _to_hash(v) }
192
+ elsif value.is_a?(Hash)
193
+ {}.tap do |hash|
194
+ value.each { |k, v| hash[k] = _to_hash(v) }
195
+ end
196
+ elsif value.respond_to? :to_hash
197
+ value.to_hash
198
+ else
199
+ value
200
+ end
201
+ end end
202
+ end
@@ -0,0 +1,43 @@
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 BridgePaymentRail
16
+ ETHEREUM = 'ethereum'.freeze
17
+ SOLANA = 'solana'.freeze
18
+ POLYGON = 'polygon'.freeze
19
+ AVALANCHE_C_CHAIN = 'avalanche_c_chain'.freeze
20
+ BASE = 'base'.freeze
21
+ ARBITRUM = 'arbitrum'.freeze
22
+ OPTIMISM = 'optimism'.freeze
23
+ STELLAR = 'stellar'.freeze
24
+ TRON = 'tron'.freeze
25
+ BRIDGE_WALLET = 'bridge_wallet'.freeze
26
+ WIRE = 'wire'.freeze
27
+ ACH = 'ach'.freeze
28
+ ACH_PUSH = 'ach_push'.freeze
29
+ ACH_SAME_DAY = 'ach_same_day'.freeze
30
+ SEPA = 'sepa'.freeze
31
+ SWIFT = 'swift'.freeze
32
+ SPEI = 'spei'.freeze
33
+
34
+ # Builds the enum from string
35
+ # @param [String] The enum value in the form of the string
36
+ # @return [String] The enum value
37
+ def build_from_hash(value)
38
+ constantValues = BridgePaymentRail.constants.select { |c| BridgePaymentRail::const_get(c) == value }
39
+ raise "Invalid ENUM value #{value} for class #BridgePaymentRail" if constantValues.empty?
40
+ value
41
+ end
42
+ end
43
+ end