devdraft 1.0.1 → 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 +160 -191
  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 -94
  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
data/docs/ProductsApi.md CHANGED
@@ -1,79 +1,101 @@
1
- # DevDraftAI::ProductsApi
1
+ # Devdraft::ProductsApi
2
2
 
3
3
  All URIs are relative to *https://api.devdraft.ai*
4
4
 
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**product_controller_create**](ProductsApi.md#product_controller_create) | **POST** /api/v0/products | Create a new product
8
- [**product_controller_find_all**](ProductsApi.md#product_controller_find_all) | **GET** /api/v0/products | Get all products
9
- [**product_controller_find_one**](ProductsApi.md#product_controller_find_one) | **GET** /api/v0/products/{id} | Get a product by ID
10
- [**product_controller_remove**](ProductsApi.md#product_controller_remove) | **DELETE** /api/v0/products/{id} | Delete a product
11
- [**product_controller_update**](ProductsApi.md#product_controller_update) | **PUT** /api/v0/products/{id} | Update a product
12
- [**product_controller_upload_image**](ProductsApi.md#product_controller_upload_image) | **POST** /api/v0/products/{id}/images | Upload images for a product
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**product_controller_create**](ProductsApi.md#product_controller_create) | **POST** /api/v0/products | Create a new product |
8
+ | [**product_controller_find_all**](ProductsApi.md#product_controller_find_all) | **GET** /api/v0/products | Get all products |
9
+ | [**product_controller_find_one**](ProductsApi.md#product_controller_find_one) | **GET** /api/v0/products/{id} | Get a product by ID |
10
+ | [**product_controller_remove**](ProductsApi.md#product_controller_remove) | **DELETE** /api/v0/products/{id} | Delete a product |
11
+ | [**product_controller_update**](ProductsApi.md#product_controller_update) | **PUT** /api/v0/products/{id} | Update a product |
12
+ | [**product_controller_upload_image**](ProductsApi.md#product_controller_upload_image) | **POST** /api/v0/products/{id}/images | Upload images for a product |
13
13
 
14
- # **product_controller_create**
15
- > product_controller_create(namedescriptionpricecurrencytypeweightunitquantitystock_countstatusproduct_typeimages)
14
+
15
+ ## product_controller_create
16
+
17
+ > product_controller_create(name, description, price, opts)
16
18
 
17
19
  Create a new product
18
20
 
19
21
  Creates a new product with optional image uploads. This endpoint allows you to create products with detailed information and multiple images. ## Use Cases - Add new products to your catalog - Create products with multiple images - Set up product pricing and descriptions ## Supported Image Formats - JPEG/JPG - PNG - WebP - Maximum 10 images per product - Maximum file size: 5MB per image ## Example Request (multipart/form-data) ``` name: \"Premium Widget\" description: \"High-quality widget for all your needs\" price: \"99.99\" images: [file1.jpg, file2.jpg] // Optional, up to 10 images ``` ## Required Fields - `name`: Product name - `price`: Product price (decimal number) ## Optional Fields - `description`: Detailed product description - `images`: Product images (up to 10 files)
20
22
 
21
- ### Example
23
+ ### Examples
24
+
22
25
  ```ruby
23
- # load the gem
24
- require 'devdraft_ai_sdk'
26
+ require 'time'
27
+ require 'devdraft'
25
28
  # setup authorization
26
- DevDraftAI.configure do |config|
29
+ Devdraft.configure do |config|
30
+ # Configure API key authorization: x-client-secret
31
+ config.api_key['x-client-secret'] = 'YOUR API KEY'
32
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
33
+ # config.api_key_prefix['x-client-secret'] = 'Bearer'
34
+
27
35
  # Configure API key authorization: x-client-key
28
36
  config.api_key['x-client-key'] = 'YOUR API KEY'
29
37
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
30
- #config.api_key_prefix['x-client-key'] = 'Bearer'
38
+ # config.api_key_prefix['x-client-key'] = 'Bearer'
39
+ end
31
40
 
32
- # Configure API key authorization: x-client-secret
33
- config.api_key['x-client-secret'] = 'YOUR API KEY'
34
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
35
- #config.api_key_prefix['x-client-secret'] = 'Bearer'
41
+ api_instance = Devdraft::ProductsApi.new
42
+ name = 'name_example' # String | Product name as it will appear to customers. Should be clear and descriptive.
43
+ description = 'description_example' # String | Detailed description of the product. Supports markdown formatting for rich text display.
44
+ price = 8.14 # Float | Product price in the specified currency. Must be greater than 0.
45
+ opts = {
46
+ currency: 'USD', # String | Currency code for the price. Defaults to USD if not specified.
47
+ type: 'type_example', # String | Product type
48
+ weight: 8.14, # Float | Weight of the product
49
+ unit: 'unit_example', # String | Unit of measurement
50
+ quantity: 8.14, # Float | Quantity available
51
+ stock_count: 8.14, # Float | Stock count
52
+ status: 'status_example', # String | Product status
53
+ product_type: 'product_type_example', # String | Product type
54
+ images: ['inner_example'] # Array<String> | Array of image URLs
55
+ }
56
+
57
+ begin
58
+ # Create a new product
59
+ api_instance.product_controller_create(name, description, price, opts)
60
+ rescue Devdraft::ApiError => e
61
+ puts "Error when calling ProductsApi->product_controller_create: #{e}"
36
62
  end
63
+ ```
64
+
65
+ #### Using the product_controller_create_with_http_info variant
37
66
 
38
- api_instance = DevDraftAI::ProductsApi.new
39
- name = 'name_example' # String |
40
- description = 'description_example' # String |
41
- price = DevDraftAI::BigDecimal.new # BigDecimal |
42
- currency = 'currency_example' # String |
43
- type = 'type_example' # String |
44
- weight = DevDraftAI::BigDecimal.new # BigDecimal |
45
- unit = 'unit_example' # String |
46
- quantity = DevDraftAI::BigDecimal.new # BigDecimal |
47
- stock_count = DevDraftAI::BigDecimal.new # BigDecimal |
48
- status = 'status_example' # String |
49
- product_type = 'product_type_example' # String |
50
- images = ['images_example'] # Array<String> |
67
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
51
68
 
69
+ > <Array(nil, Integer, Hash)> product_controller_create_with_http_info(name, description, price, opts)
52
70
 
71
+ ```ruby
53
72
  begin
54
- #Create a new product
55
- api_instance.product_controller_create(namedescriptionpricecurrencytypeweightunitquantitystock_countstatusproduct_typeimages)
56
- rescue DevDraftAI::ApiError => e
57
- puts "Exception when calling ProductsApi->product_controller_create: #{e}"
73
+ # Create a new product
74
+ data, status_code, headers = api_instance.product_controller_create_with_http_info(name, description, price, opts)
75
+ p status_code # => 2xx
76
+ p headers # => { ... }
77
+ p data # => nil
78
+ rescue Devdraft::ApiError => e
79
+ puts "Error when calling ProductsApi->product_controller_create_with_http_info: #{e}"
58
80
  end
59
81
  ```
60
82
 
61
83
  ### Parameters
62
84
 
63
- Name | Type | Description | Notes
64
- ------------- | ------------- | ------------- | -------------
65
- **name** | **String**| |
66
- **description** | **String**| |
67
- **price** | **BigDecimal**| |
68
- **currency** | **String**| |
69
- **type** | **String**| |
70
- **weight** | **BigDecimal**| |
71
- **unit** | **String**| |
72
- **quantity** | **BigDecimal**| |
73
- **stock_count** | **BigDecimal**| |
74
- **status** | **String**| |
75
- **product_type** | **String**| |
76
- **images** | [**Array&lt;String&gt;**](String.md)| |
85
+ | Name | Type | Description | Notes |
86
+ | ---- | ---- | ----------- | ----- |
87
+ | **name** | **String** | Product name as it will appear to customers. Should be clear and descriptive. | |
88
+ | **description** | **String** | Detailed description of the product. Supports markdown formatting for rich text display. | |
89
+ | **price** | **Float** | Product price in the specified currency. Must be greater than 0. | |
90
+ | **currency** | **String** | Currency code for the price. Defaults to USD if not specified. | [optional][default to &#39;USD&#39;] |
91
+ | **type** | **String** | Product type | [optional] |
92
+ | **weight** | **Float** | Weight of the product | [optional] |
93
+ | **unit** | **String** | Unit of measurement | [optional] |
94
+ | **quantity** | **Float** | Quantity available | [optional] |
95
+ | **stock_count** | **Float** | Stock count | [optional] |
96
+ | **status** | **String** | Product status | [optional] |
97
+ | **product_type** | **String** | Product type | [optional] |
98
+ | **images** | [**Array&lt;String&gt;**](String.md) | Array of image URLs | [optional] |
77
99
 
78
100
  ### Return type
79
101
 
@@ -81,59 +103,78 @@ nil (empty response body)
81
103
 
82
104
  ### Authorization
83
105
 
84
- [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
106
+ [x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
85
107
 
86
108
  ### HTTP request headers
87
109
 
88
- - **Content-Type**: multipart/form-data
89
- - **Accept**: Not defined
110
+ - **Content-Type**: multipart/form-data
111
+ - **Accept**: Not defined
90
112
 
91
113
 
114
+ ## product_controller_find_all
92
115
 
93
- # **product_controller_find_all**
94
116
  > product_controller_find_all(opts)
95
117
 
96
118
  Get all products
97
119
 
98
120
  Retrieves a list of products with pagination. This endpoint allows you to fetch products with optional pagination. ## Use Cases - List all products - Browse product catalog - Implement product search ## Query Parameters - `skip`: Number of records to skip (default: 0) - `take`: Number of records to take (default: 10) ## Example Response ```json { \"data\": [ { \"id\": \"prod_123456\", \"name\": \"Premium Widget\", \"description\": \"High-quality widget for all your needs\", \"price\": \"99.99\", \"images\": [ \"https://storage.example.com/images/file1.jpg\", \"https://storage.example.com/images/file2.jpg\" ], \"createdAt\": \"2024-03-20T10:00:00Z\" } ], \"total\": 100, \"skip\": 0, \"take\": 10 } ```
99
121
 
100
- ### Example
122
+ ### Examples
123
+
101
124
  ```ruby
102
- # load the gem
103
- require 'devdraft_ai_sdk'
125
+ require 'time'
126
+ require 'devdraft'
104
127
  # setup authorization
105
- DevDraftAI.configure do |config|
106
- # Configure API key authorization: x-client-key
107
- config.api_key['x-client-key'] = 'YOUR API KEY'
108
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
109
- #config.api_key_prefix['x-client-key'] = 'Bearer'
110
-
128
+ Devdraft.configure do |config|
111
129
  # Configure API key authorization: x-client-secret
112
130
  config.api_key['x-client-secret'] = 'YOUR API KEY'
113
131
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
114
- #config.api_key_prefix['x-client-secret'] = 'Bearer'
132
+ # config.api_key_prefix['x-client-secret'] = 'Bearer'
133
+
134
+ # Configure API key authorization: x-client-key
135
+ config.api_key['x-client-key'] = 'YOUR API KEY'
136
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
137
+ # config.api_key_prefix['x-client-key'] = 'Bearer'
115
138
  end
116
139
 
117
- api_instance = DevDraftAI::ProductsApi.new
118
- opts = {
119
- skip: DevDraftAI::BigDecimal.new, # BigDecimal | Number of records to skip
120
- take: DevDraftAI::BigDecimal.new # BigDecimal | Number of records to take
140
+ api_instance = Devdraft::ProductsApi.new
141
+ opts = {
142
+ skip: 8.14, # Float | Number of records to skip
143
+ take: 8.14 # Float | Number of records to take
121
144
  }
122
145
 
123
146
  begin
124
- #Get all products
147
+ # Get all products
125
148
  api_instance.product_controller_find_all(opts)
126
- rescue DevDraftAI::ApiError => e
127
- puts "Exception when calling ProductsApi->product_controller_find_all: #{e}"
149
+ rescue Devdraft::ApiError => e
150
+ puts "Error when calling ProductsApi->product_controller_find_all: #{e}"
151
+ end
152
+ ```
153
+
154
+ #### Using the product_controller_find_all_with_http_info variant
155
+
156
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
157
+
158
+ > <Array(nil, Integer, Hash)> product_controller_find_all_with_http_info(opts)
159
+
160
+ ```ruby
161
+ begin
162
+ # Get all products
163
+ data, status_code, headers = api_instance.product_controller_find_all_with_http_info(opts)
164
+ p status_code # => 2xx
165
+ p headers # => { ... }
166
+ p data # => nil
167
+ rescue Devdraft::ApiError => e
168
+ puts "Error when calling ProductsApi->product_controller_find_all_with_http_info: #{e}"
128
169
  end
129
170
  ```
130
171
 
131
172
  ### Parameters
132
173
 
133
- Name | Type | Description | Notes
134
- ------------- | ------------- | ------------- | -------------
135
- **skip** | **BigDecimal**| Number of records to skip | [optional]
136
- **take** | **BigDecimal**| Number of records to take | [optional]
174
+ | Name | Type | Description | Notes |
175
+ | ---- | ---- | ----------- | ----- |
176
+ | **skip** | **Float** | Number of records to skip | [optional] |
177
+ | **take** | **Float** | Number of records to take | [optional] |
137
178
 
138
179
  ### Return type
139
180
 
@@ -141,56 +182,74 @@ nil (empty response body)
141
182
 
142
183
  ### Authorization
143
184
 
144
- [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
185
+ [x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
145
186
 
146
187
  ### HTTP request headers
147
188
 
148
- - **Content-Type**: Not defined
149
- - **Accept**: Not defined
189
+ - **Content-Type**: Not defined
190
+ - **Accept**: Not defined
150
191
 
151
192
 
193
+ ## product_controller_find_one
152
194
 
153
- # **product_controller_find_one**
154
195
  > product_controller_find_one(id)
155
196
 
156
197
  Get a product by ID
157
198
 
158
199
  Retrieves detailed information about a specific product. This endpoint allows you to fetch complete product details including all images. ## Use Cases - View product details - Display product information - Check product availability ## Example Response ```json { \"id\": \"prod_123456\", \"name\": \"Premium Widget\", \"description\": \"High-quality widget for all your needs\", \"price\": \"99.99\", \"images\": [ \"https://storage.example.com/images/file1.jpg\", \"https://storage.example.com/images/file2.jpg\" ], \"createdAt\": \"2024-03-20T10:00:00Z\", \"updatedAt\": \"2024-03-20T10:00:00Z\" } ```
159
200
 
160
- ### Example
201
+ ### Examples
202
+
161
203
  ```ruby
162
- # load the gem
163
- require 'devdraft_ai_sdk'
204
+ require 'time'
205
+ require 'devdraft'
164
206
  # setup authorization
165
- DevDraftAI.configure do |config|
166
- # Configure API key authorization: x-client-key
167
- config.api_key['x-client-key'] = 'YOUR API KEY'
168
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
169
- #config.api_key_prefix['x-client-key'] = 'Bearer'
170
-
207
+ Devdraft.configure do |config|
171
208
  # Configure API key authorization: x-client-secret
172
209
  config.api_key['x-client-secret'] = 'YOUR API KEY'
173
210
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
174
- #config.api_key_prefix['x-client-secret'] = 'Bearer'
211
+ # config.api_key_prefix['x-client-secret'] = 'Bearer'
212
+
213
+ # Configure API key authorization: x-client-key
214
+ config.api_key['x-client-key'] = 'YOUR API KEY'
215
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
216
+ # config.api_key_prefix['x-client-key'] = 'Bearer'
175
217
  end
176
218
 
177
- api_instance = DevDraftAI::ProductsApi.new
219
+ api_instance = Devdraft::ProductsApi.new
178
220
  id = 'id_example' # String | Product ID
179
221
 
180
-
181
222
  begin
182
- #Get a product by ID
223
+ # Get a product by ID
183
224
  api_instance.product_controller_find_one(id)
184
- rescue DevDraftAI::ApiError => e
185
- puts "Exception when calling ProductsApi->product_controller_find_one: #{e}"
225
+ rescue Devdraft::ApiError => e
226
+ puts "Error when calling ProductsApi->product_controller_find_one: #{e}"
227
+ end
228
+ ```
229
+
230
+ #### Using the product_controller_find_one_with_http_info variant
231
+
232
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
233
+
234
+ > <Array(nil, Integer, Hash)> product_controller_find_one_with_http_info(id)
235
+
236
+ ```ruby
237
+ begin
238
+ # Get a product by ID
239
+ data, status_code, headers = api_instance.product_controller_find_one_with_http_info(id)
240
+ p status_code # => 2xx
241
+ p headers # => { ... }
242
+ p data # => nil
243
+ rescue Devdraft::ApiError => e
244
+ puts "Error when calling ProductsApi->product_controller_find_one_with_http_info: #{e}"
186
245
  end
187
246
  ```
188
247
 
189
248
  ### Parameters
190
249
 
191
- Name | Type | Description | Notes
192
- ------------- | ------------- | ------------- | -------------
193
- **id** | **String**| Product ID |
250
+ | Name | Type | Description | Notes |
251
+ | ---- | ---- | ----------- | ----- |
252
+ | **id** | **String** | Product ID | |
194
253
 
195
254
  ### Return type
196
255
 
@@ -198,56 +257,74 @@ nil (empty response body)
198
257
 
199
258
  ### Authorization
200
259
 
201
- [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
260
+ [x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
202
261
 
203
262
  ### HTTP request headers
204
263
 
205
- - **Content-Type**: Not defined
206
- - **Accept**: Not defined
264
+ - **Content-Type**: Not defined
265
+ - **Accept**: Not defined
207
266
 
208
267
 
268
+ ## product_controller_remove
209
269
 
210
- # **product_controller_remove**
211
270
  > product_controller_remove(id)
212
271
 
213
272
  Delete a product
214
273
 
215
274
  Deletes a product and its associated images. This endpoint allows you to remove a product and all its associated data. ## Use Cases - Remove discontinued products - Clean up product catalog - Delete test products ## Notes - This action cannot be undone - All product images will be deleted - Associated data will be removed
216
275
 
217
- ### Example
276
+ ### Examples
277
+
218
278
  ```ruby
219
- # load the gem
220
- require 'devdraft_ai_sdk'
279
+ require 'time'
280
+ require 'devdraft'
221
281
  # setup authorization
222
- DevDraftAI.configure do |config|
223
- # Configure API key authorization: x-client-key
224
- config.api_key['x-client-key'] = 'YOUR API KEY'
225
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
226
- #config.api_key_prefix['x-client-key'] = 'Bearer'
227
-
282
+ Devdraft.configure do |config|
228
283
  # Configure API key authorization: x-client-secret
229
284
  config.api_key['x-client-secret'] = 'YOUR API KEY'
230
285
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
231
- #config.api_key_prefix['x-client-secret'] = 'Bearer'
286
+ # config.api_key_prefix['x-client-secret'] = 'Bearer'
287
+
288
+ # Configure API key authorization: x-client-key
289
+ config.api_key['x-client-key'] = 'YOUR API KEY'
290
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
291
+ # config.api_key_prefix['x-client-key'] = 'Bearer'
232
292
  end
233
293
 
234
- api_instance = DevDraftAI::ProductsApi.new
294
+ api_instance = Devdraft::ProductsApi.new
235
295
  id = 'id_example' # String | Product ID
236
296
 
237
-
238
297
  begin
239
- #Delete a product
298
+ # Delete a product
240
299
  api_instance.product_controller_remove(id)
241
- rescue DevDraftAI::ApiError => e
242
- puts "Exception when calling ProductsApi->product_controller_remove: #{e}"
300
+ rescue Devdraft::ApiError => e
301
+ puts "Error when calling ProductsApi->product_controller_remove: #{e}"
302
+ end
303
+ ```
304
+
305
+ #### Using the product_controller_remove_with_http_info variant
306
+
307
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
308
+
309
+ > <Array(nil, Integer, Hash)> product_controller_remove_with_http_info(id)
310
+
311
+ ```ruby
312
+ begin
313
+ # Delete a product
314
+ data, status_code, headers = api_instance.product_controller_remove_with_http_info(id)
315
+ p status_code # => 2xx
316
+ p headers # => { ... }
317
+ p data # => nil
318
+ rescue Devdraft::ApiError => e
319
+ puts "Error when calling ProductsApi->product_controller_remove_with_http_info: #{e}"
243
320
  end
244
321
  ```
245
322
 
246
323
  ### Parameters
247
324
 
248
- Name | Type | Description | Notes
249
- ------------- | ------------- | ------------- | -------------
250
- **id** | **String**| Product ID |
325
+ | Name | Type | Description | Notes |
326
+ | ---- | ---- | ----------- | ----- |
327
+ | **id** | **String** | Product ID | |
251
328
 
252
329
  ### Return type
253
330
 
@@ -255,80 +332,100 @@ nil (empty response body)
255
332
 
256
333
  ### Authorization
257
334
 
258
- [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
335
+ [x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
259
336
 
260
337
  ### HTTP request headers
261
338
 
262
- - **Content-Type**: Not defined
263
- - **Accept**: Not defined
339
+ - **Content-Type**: Not defined
340
+ - **Accept**: Not defined
264
341
 
265
342
 
343
+ ## product_controller_update
266
344
 
267
- # **product_controller_update**
268
- > product_controller_update(namedescriptionpricecurrencytypeweightunitquantitystock_countstatusproduct_typeimagesid)
345
+ > product_controller_update(id, opts)
269
346
 
270
347
  Update a product
271
348
 
272
349
  Updates an existing product's information and optionally adds new images. This endpoint allows you to modify product details and manage product images. ## Use Cases - Update product information - Change product pricing - Modify product images - Update product description ## Example Request (multipart/form-data) ``` name: \"Updated Premium Widget\" description: \"Updated description\" price: \"129.99\" images: [file1.jpg, file2.jpg] // Optional, up to 10 images ``` ## Notes - Only include fields that need to be updated - New images will replace existing images - Maximum 10 images per product - Images are automatically optimized
273
350
 
274
- ### Example
351
+ ### Examples
352
+
275
353
  ```ruby
276
- # load the gem
277
- require 'devdraft_ai_sdk'
354
+ require 'time'
355
+ require 'devdraft'
278
356
  # setup authorization
279
- DevDraftAI.configure do |config|
280
- # Configure API key authorization: x-client-key
281
- config.api_key['x-client-key'] = 'YOUR API KEY'
282
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
283
- #config.api_key_prefix['x-client-key'] = 'Bearer'
284
-
357
+ Devdraft.configure do |config|
285
358
  # Configure API key authorization: x-client-secret
286
359
  config.api_key['x-client-secret'] = 'YOUR API KEY'
287
360
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
288
- #config.api_key_prefix['x-client-secret'] = 'Bearer'
361
+ # config.api_key_prefix['x-client-secret'] = 'Bearer'
362
+
363
+ # Configure API key authorization: x-client-key
364
+ config.api_key['x-client-key'] = 'YOUR API KEY'
365
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
366
+ # config.api_key_prefix['x-client-key'] = 'Bearer'
289
367
  end
290
368
 
291
- api_instance = DevDraftAI::ProductsApi.new
292
- name = 'name_example' # String |
293
- description = 'description_example' # String |
294
- price = DevDraftAI::BigDecimal.new # BigDecimal |
295
- currency = 'currency_example' # String |
296
- type = 'type_example' # String |
297
- weight = DevDraftAI::BigDecimal.new # BigDecimal |
298
- unit = 'unit_example' # String |
299
- quantity = DevDraftAI::BigDecimal.new # BigDecimal |
300
- stock_count = DevDraftAI::BigDecimal.new # BigDecimal |
301
- status = 'status_example' # String |
302
- product_type = 'product_type_example' # String |
303
- images = ['images_example'] # Array<String> |
369
+ api_instance = Devdraft::ProductsApi.new
304
370
  id = 'id_example' # String | Product ID
371
+ opts = {
372
+ name: 'name_example', # String | Product name as it will appear to customers. Should be clear and descriptive.
373
+ description: 'description_example', # String | Detailed description of the product. Supports markdown formatting for rich text display.
374
+ price: 8.14, # Float | Product price in the specified currency. Must be greater than 0.
375
+ currency: 'USD', # String | Currency code for the price. Defaults to USD if not specified.
376
+ type: 'type_example', # String | Product type
377
+ weight: 8.14, # Float | Weight of the product
378
+ unit: 'unit_example', # String | Unit of measurement
379
+ quantity: 8.14, # Float | Quantity available
380
+ stock_count: 8.14, # Float | Stock count
381
+ status: 'status_example', # String | Product status
382
+ product_type: 'product_type_example', # String | Product type
383
+ images: ['inner_example'] # Array<String> | Array of image URLs
384
+ }
305
385
 
386
+ begin
387
+ # Update a product
388
+ api_instance.product_controller_update(id, opts)
389
+ rescue Devdraft::ApiError => e
390
+ puts "Error when calling ProductsApi->product_controller_update: #{e}"
391
+ end
392
+ ```
393
+
394
+ #### Using the product_controller_update_with_http_info variant
395
+
396
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
306
397
 
398
+ > <Array(nil, Integer, Hash)> product_controller_update_with_http_info(id, opts)
399
+
400
+ ```ruby
307
401
  begin
308
- #Update a product
309
- api_instance.product_controller_update(namedescriptionpricecurrencytypeweightunitquantitystock_countstatusproduct_typeimagesid)
310
- rescue DevDraftAI::ApiError => e
311
- puts "Exception when calling ProductsApi->product_controller_update: #{e}"
402
+ # Update a product
403
+ data, status_code, headers = api_instance.product_controller_update_with_http_info(id, opts)
404
+ p status_code # => 2xx
405
+ p headers # => { ... }
406
+ p data # => nil
407
+ rescue Devdraft::ApiError => e
408
+ puts "Error when calling ProductsApi->product_controller_update_with_http_info: #{e}"
312
409
  end
313
410
  ```
314
411
 
315
412
  ### Parameters
316
413
 
317
- Name | Type | Description | Notes
318
- ------------- | ------------- | ------------- | -------------
319
- **name** | **String**| |
320
- **description** | **String**| |
321
- **price** | **BigDecimal**| |
322
- **currency** | **String**| |
323
- **type** | **String**| |
324
- **weight** | **BigDecimal**| |
325
- **unit** | **String**| |
326
- **quantity** | **BigDecimal**| |
327
- **stock_count** | **BigDecimal**| |
328
- **status** | **String**| |
329
- **product_type** | **String**| |
330
- **images** | [**Array&lt;String&gt;**](String.md)| |
331
- **id** | **String**| Product ID |
414
+ | Name | Type | Description | Notes |
415
+ | ---- | ---- | ----------- | ----- |
416
+ | **id** | **String** | Product ID | |
417
+ | **name** | **String** | Product name as it will appear to customers. Should be clear and descriptive. | [optional] |
418
+ | **description** | **String** | Detailed description of the product. Supports markdown formatting for rich text display. | [optional] |
419
+ | **price** | **Float** | Product price in the specified currency. Must be greater than 0. | [optional] |
420
+ | **currency** | **String** | Currency code for the price. Defaults to USD if not specified. | [optional][default to &#39;USD&#39;] |
421
+ | **type** | **String** | Product type | [optional] |
422
+ | **weight** | **Float** | Weight of the product | [optional] |
423
+ | **unit** | **String** | Unit of measurement | [optional] |
424
+ | **quantity** | **Float** | Quantity available | [optional] |
425
+ | **stock_count** | **Float** | Stock count | [optional] |
426
+ | **status** | **String** | Product status | [optional] |
427
+ | **product_type** | **String** | Product type | [optional] |
428
+ | **images** | [**Array&lt;String&gt;**](String.md) | Array of image URLs | [optional] |
332
429
 
333
430
  ### Return type
334
431
 
@@ -336,56 +433,74 @@ nil (empty response body)
336
433
 
337
434
  ### Authorization
338
435
 
339
- [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
436
+ [x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
340
437
 
341
438
  ### HTTP request headers
342
439
 
343
- - **Content-Type**: multipart/form-data
344
- - **Accept**: Not defined
440
+ - **Content-Type**: multipart/form-data
441
+ - **Accept**: Not defined
345
442
 
346
443
 
444
+ ## product_controller_upload_image
347
445
 
348
- # **product_controller_upload_image**
349
446
  > product_controller_upload_image(id)
350
447
 
351
448
  Upload images for a product
352
449
 
353
450
  Adds new images to an existing product. This endpoint allows you to upload additional images for a product that already exists. ## Use Cases - Add more product images - Update product gallery - Enhance product presentation ## Supported Image Formats - JPEG/JPG - PNG - WebP - Maximum 10 images per upload - Maximum file size: 5MB per image ## Example Request (multipart/form-data) ``` images: [file1.jpg, file2.jpg] // Up to 10 images ``` ## Notes - Images are appended to existing product images - Total images per product cannot exceed 10 - Images are automatically optimized and resized
354
451
 
355
- ### Example
452
+ ### Examples
453
+
356
454
  ```ruby
357
- # load the gem
358
- require 'devdraft_ai_sdk'
455
+ require 'time'
456
+ require 'devdraft'
359
457
  # setup authorization
360
- DevDraftAI.configure do |config|
361
- # Configure API key authorization: x-client-key
362
- config.api_key['x-client-key'] = 'YOUR API KEY'
363
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
364
- #config.api_key_prefix['x-client-key'] = 'Bearer'
365
-
458
+ Devdraft.configure do |config|
366
459
  # Configure API key authorization: x-client-secret
367
460
  config.api_key['x-client-secret'] = 'YOUR API KEY'
368
461
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
369
- #config.api_key_prefix['x-client-secret'] = 'Bearer'
462
+ # config.api_key_prefix['x-client-secret'] = 'Bearer'
463
+
464
+ # Configure API key authorization: x-client-key
465
+ config.api_key['x-client-key'] = 'YOUR API KEY'
466
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
467
+ # config.api_key_prefix['x-client-key'] = 'Bearer'
370
468
  end
371
469
 
372
- api_instance = DevDraftAI::ProductsApi.new
470
+ api_instance = Devdraft::ProductsApi.new
373
471
  id = 'id_example' # String | Product ID
374
472
 
375
-
376
473
  begin
377
- #Upload images for a product
474
+ # Upload images for a product
378
475
  api_instance.product_controller_upload_image(id)
379
- rescue DevDraftAI::ApiError => e
380
- puts "Exception when calling ProductsApi->product_controller_upload_image: #{e}"
476
+ rescue Devdraft::ApiError => e
477
+ puts "Error when calling ProductsApi->product_controller_upload_image: #{e}"
478
+ end
479
+ ```
480
+
481
+ #### Using the product_controller_upload_image_with_http_info variant
482
+
483
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
484
+
485
+ > <Array(nil, Integer, Hash)> product_controller_upload_image_with_http_info(id)
486
+
487
+ ```ruby
488
+ begin
489
+ # Upload images for a product
490
+ data, status_code, headers = api_instance.product_controller_upload_image_with_http_info(id)
491
+ p status_code # => 2xx
492
+ p headers # => { ... }
493
+ p data # => nil
494
+ rescue Devdraft::ApiError => e
495
+ puts "Error when calling ProductsApi->product_controller_upload_image_with_http_info: #{e}"
381
496
  end
382
497
  ```
383
498
 
384
499
  ### Parameters
385
500
 
386
- Name | Type | Description | Notes
387
- ------------- | ------------- | ------------- | -------------
388
- **id** | **String**| Product ID |
501
+ | Name | Type | Description | Notes |
502
+ | ---- | ---- | ----------- | ----- |
503
+ | **id** | **String** | Product ID | |
389
504
 
390
505
  ### Return type
391
506
 
@@ -393,12 +508,10 @@ nil (empty response body)
393
508
 
394
509
  ### Authorization
395
510
 
396
- [x-client-key](../README.md#x-client-key), [x-client-secret](../README.md#x-client-secret)
511
+ [x-client-secret](../README.md#x-client-secret), [x-client-key](../README.md#x-client-key)
397
512
 
398
513
  ### HTTP request headers
399
514
 
400
- - **Content-Type**: Not defined
401
- - **Accept**: Not defined
402
-
403
-
515
+ - **Content-Type**: Not defined
516
+ - **Accept**: Not defined
404
517