wine_shipping 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +128 -0
  4. data/Rakefile +8 -0
  5. data/docs/Authentication.md +10 -0
  6. data/docs/BillingContactInfo.md +18 -0
  7. data/docs/DeliveryContactInfo.md +17 -0
  8. data/docs/Inventory.md +20 -0
  9. data/docs/InventoryApi.md +102 -0
  10. data/docs/InventoryMovementApi.md +100 -0
  11. data/docs/InventoryStatusRequest.md +13 -0
  12. data/docs/InventoryStatusResult.md +12 -0
  13. data/docs/ItemInfo.md +10 -0
  14. data/docs/OrderOnHold.md +19 -0
  15. data/docs/OrderOnHoldItem.md +11 -0
  16. data/docs/PackageItem.md +10 -0
  17. data/docs/PurchaseOrderDetails.md +10 -0
  18. data/docs/PurchaseOrderInfo.md +24 -0
  19. data/docs/PurchaseOrderItemInfo.md +10 -0
  20. data/docs/RecipientContactInfo.md +18 -0
  21. data/docs/RequestorInfo.md +11 -0
  22. data/docs/ReturnResult.md +12 -0
  23. data/docs/ReturnSalesOrderHeader.md +31 -0
  24. data/docs/ReturnSalesOrderLine.md +13 -0
  25. data/docs/ReturnsRequest.md +16 -0
  26. data/docs/SKUApi.md +54 -0
  27. data/docs/SKUDetails.md +10 -0
  28. data/docs/SKUInfo.md +20 -0
  29. data/docs/SalesOrderApi.md +240 -0
  30. data/docs/SalesOrderCancelRequest.md +9 -0
  31. data/docs/SalesOrderDetails.md +14 -0
  32. data/docs/SalesOrderInfo.md +20 -0
  33. data/docs/ShipmentInfo.md +13 -0
  34. data/docs/TrackingApi.md +55 -0
  35. data/docs/TrackingRequest.md +9 -0
  36. data/docs/TrackingResult.md +28 -0
  37. data/docs/TransferOrderDetails.md +10 -0
  38. data/docs/TransferOrderInfo.md +17 -0
  39. data/docs/TransferOrderItemInfo.md +10 -0
  40. data/docs/WarehouseInventoryStatus.md +19 -0
  41. data/git_push.sh +55 -0
  42. data/lib/.DS_Store +0 -0
  43. data/lib/wine_shipping.rb +75 -0
  44. data/lib/wine_shipping/api/inventory_api.rb +127 -0
  45. data/lib/wine_shipping/api/inventory_movement_api.rb +125 -0
  46. data/lib/wine_shipping/api/sales_order_api.rb +280 -0
  47. data/lib/wine_shipping/api/sku_api.rb +74 -0
  48. data/lib/wine_shipping/api/tracking_api.rb +75 -0
  49. data/lib/wine_shipping/api_client.rb +388 -0
  50. data/lib/wine_shipping/api_error.rb +38 -0
  51. data/lib/wine_shipping/configuration.rb +202 -0
  52. data/lib/wine_shipping/models/authentication.rb +201 -0
  53. data/lib/wine_shipping/models/billing_contact_info.rb +273 -0
  54. data/lib/wine_shipping/models/delivery_contact_info.rb +298 -0
  55. data/lib/wine_shipping/models/inventory.rb +291 -0
  56. data/lib/wine_shipping/models/inventory_status_request.rb +230 -0
  57. data/lib/wine_shipping/models/inventory_status_result.rb +221 -0
  58. data/lib/wine_shipping/models/item_info.rb +201 -0
  59. data/lib/wine_shipping/models/order_on_hold.rb +284 -0
  60. data/lib/wine_shipping/models/order_on_hold_item.rb +210 -0
  61. data/lib/wine_shipping/models/package_item.rb +201 -0
  62. data/lib/wine_shipping/models/purchase_order_details.rb +203 -0
  63. data/lib/wine_shipping/models/purchase_order_info.rb +361 -0
  64. data/lib/wine_shipping/models/purchase_order_item_info.rb +201 -0
  65. data/lib/wine_shipping/models/recipient_contact_info.rb +273 -0
  66. data/lib/wine_shipping/models/requestor_info.rb +210 -0
  67. data/lib/wine_shipping/models/return_result.rb +221 -0
  68. data/lib/wine_shipping/models/return_sales_order_header.rb +392 -0
  69. data/lib/wine_shipping/models/return_sales_order_line.rb +228 -0
  70. data/lib/wine_shipping/models/returns_request.rb +257 -0
  71. data/lib/wine_shipping/models/sales_order_cancel_request.rb +192 -0
  72. data/lib/wine_shipping/models/sales_order_details.rb +239 -0
  73. data/lib/wine_shipping/models/sales_order_info.rb +325 -0
  74. data/lib/wine_shipping/models/shipment_info.rb +274 -0
  75. data/lib/wine_shipping/models/sku_details.rb +201 -0
  76. data/lib/wine_shipping/models/sku_info.rb +325 -0
  77. data/lib/wine_shipping/models/tracking_request.rb +192 -0
  78. data/lib/wine_shipping/models/tracking_result.rb +365 -0
  79. data/lib/wine_shipping/models/transfer_order_details.rb +203 -0
  80. data/lib/wine_shipping/models/transfer_order_info.rb +264 -0
  81. data/lib/wine_shipping/models/transfer_order_item_info.rb +201 -0
  82. data/lib/wine_shipping/models/warehouse_inventory_status.rb +282 -0
  83. data/lib/wine_shipping/version.rb +15 -0
  84. data/spec/api/inventory_api_spec.rb +57 -0
  85. data/spec/api/inventory_movement_api_spec.rb +57 -0
  86. data/spec/api/sales_order_api_spec.rb +90 -0
  87. data/spec/api/sku_api_spec.rb +46 -0
  88. data/spec/api/tracking_api_spec.rb +46 -0
  89. data/spec/api_client_spec.rb +226 -0
  90. data/spec/configuration_spec.rb +42 -0
  91. data/spec/models/authentication_spec.rb +53 -0
  92. data/spec/models/billing_contact_info_spec.rb +101 -0
  93. data/spec/models/delivery_contact_info_spec.rb +99 -0
  94. data/spec/models/inventory_spec.rb +113 -0
  95. data/spec/models/inventory_status_request_spec.rb +71 -0
  96. data/spec/models/inventory_status_result_spec.rb +65 -0
  97. data/spec/models/item_info_spec.rb +53 -0
  98. data/spec/models/order_on_hold_item_spec.rb +59 -0
  99. data/spec/models/order_on_hold_spec.rb +107 -0
  100. data/spec/models/package_item_spec.rb +53 -0
  101. data/spec/models/purchase_order_details_spec.rb +53 -0
  102. data/spec/models/purchase_order_info_spec.rb +141 -0
  103. data/spec/models/purchase_order_item_info_spec.rb +53 -0
  104. data/spec/models/recipient_contact_info_spec.rb +101 -0
  105. data/spec/models/requestor_info_spec.rb +59 -0
  106. data/spec/models/return_result_spec.rb +65 -0
  107. data/spec/models/return_sales_order_header_spec.rb +179 -0
  108. data/spec/models/return_sales_order_line_spec.rb +71 -0
  109. data/spec/models/returns_request_spec.rb +89 -0
  110. data/spec/models/sales_order_cancel_request_spec.rb +47 -0
  111. data/spec/models/sales_order_details_spec.rb +77 -0
  112. data/spec/models/sales_order_info_spec.rb +117 -0
  113. data/spec/models/shipment_info_spec.rb +79 -0
  114. data/spec/models/sku_details_spec.rb +53 -0
  115. data/spec/models/sku_info_spec.rb +117 -0
  116. data/spec/models/tracking_request_spec.rb +47 -0
  117. data/spec/models/tracking_result_spec.rb +161 -0
  118. data/spec/models/transfer_order_details_spec.rb +53 -0
  119. data/spec/models/transfer_order_info_spec.rb +95 -0
  120. data/spec/models/transfer_order_item_info_spec.rb +53 -0
  121. data/spec/models/warehouse_inventory_status_spec.rb +107 -0
  122. data/spec/spec_helper.rb +111 -0
  123. data/wine_shipping.gemspec +45 -0
  124. metadata +390 -0
@@ -0,0 +1,125 @@
1
+ =begin
2
+ #API from Wineshipping
3
+
4
+ #Wineshipping API is a programmatically consumable service or an Application Programming Interface (API) platform designed to enable Wineshipping LLC's client applications to natively transmit and manage their order, view inventory, track shipments etc.<br /><br />In order to access API operations request a UserKey and Password from Wineshipping. For any questions please contact Wineshipping Helpdesk at <a href='mailto:IT-Help@wineshipping.com?Subject=API from Wineshipping'>IT-Help@wineshipping.com</a>.
5
+
6
+ OpenAPI spec version: V3
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.7
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module WineShipping
16
+ class InventoryMovementApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Successful execution of this method will generate a new purchase order in Wineshipping's system and will return a transaction reference identifier. Store this identifier back into your system for reference later in the event there is an issue with the purchase order.
23
+ # @param order_details_info
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [nil]
26
+ def create_purchase_order(order_details_info, opts = {})
27
+ create_purchase_order_with_http_info(order_details_info, opts)
28
+ nil
29
+ end
30
+
31
+ # Successful execution of this method will generate a new purchase order in Wineshipping&#39;s system and will return a transaction reference identifier. Store this identifier back into your system for reference later in the event there is an issue with the purchase order.
32
+ # @param order_details_info
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
35
+ def create_purchase_order_with_http_info(order_details_info, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: InventoryMovementApi.create_purchase_order ...'
38
+ end
39
+ # verify the required parameter 'order_details_info' is set
40
+ if @api_client.config.client_side_validation && order_details_info.nil?
41
+ fail ArgumentError, "Missing the required parameter 'order_details_info' when calling InventoryMovementApi.create_purchase_order"
42
+ end
43
+ # resource path
44
+ local_var_path = '/api/InventoryMovement/CreatePurchaseOrder'
45
+
46
+ # query parameters
47
+ query_params = {}
48
+
49
+ # header parameters
50
+ header_params = {}
51
+ # HTTP header 'Accept' (if needed)
52
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
53
+ # HTTP header 'Content-Type'
54
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
55
+
56
+ # form parameters
57
+ form_params = {}
58
+
59
+ # http body (model)
60
+ post_body = @api_client.object_to_http_body(order_details_info)
61
+ auth_names = []
62
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
63
+ :header_params => header_params,
64
+ :query_params => query_params,
65
+ :form_params => form_params,
66
+ :body => post_body,
67
+ :auth_names => auth_names)
68
+ if @api_client.config.debugging
69
+ @api_client.config.logger.debug "API called: InventoryMovementApi#create_purchase_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
70
+ end
71
+ return data, status_code, headers
72
+ end
73
+ # Successful execution of this method will generate a new transfer order in Wineshipping's system and will return a transaction reference identifier. Store this identifier back into your system for reference later in the event there is an issue with the transfer order.
74
+ # @param order_details_info
75
+ # @param [Hash] opts the optional parameters
76
+ # @return [nil]
77
+ def create_transfer_order(order_details_info, opts = {})
78
+ create_transfer_order_with_http_info(order_details_info, opts)
79
+ nil
80
+ end
81
+
82
+ # Successful execution of this method will generate a new transfer order in Wineshipping&#39;s system and will return a transaction reference identifier. Store this identifier back into your system for reference later in the event there is an issue with the transfer order.
83
+ # @param order_details_info
84
+ # @param [Hash] opts the optional parameters
85
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
86
+ def create_transfer_order_with_http_info(order_details_info, opts = {})
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug 'Calling API: InventoryMovementApi.create_transfer_order ...'
89
+ end
90
+ # verify the required parameter 'order_details_info' is set
91
+ if @api_client.config.client_side_validation && order_details_info.nil?
92
+ fail ArgumentError, "Missing the required parameter 'order_details_info' when calling InventoryMovementApi.create_transfer_order"
93
+ end
94
+ # resource path
95
+ local_var_path = '/api/InventoryMovement/CreateTransferOrder'
96
+
97
+ # query parameters
98
+ query_params = {}
99
+
100
+ # header parameters
101
+ header_params = {}
102
+ # HTTP header 'Accept' (if needed)
103
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
104
+ # HTTP header 'Content-Type'
105
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
106
+
107
+ # form parameters
108
+ form_params = {}
109
+
110
+ # http body (model)
111
+ post_body = @api_client.object_to_http_body(order_details_info)
112
+ auth_names = []
113
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
114
+ :header_params => header_params,
115
+ :query_params => query_params,
116
+ :form_params => form_params,
117
+ :body => post_body,
118
+ :auth_names => auth_names)
119
+ if @api_client.config.debugging
120
+ @api_client.config.logger.debug "API called: InventoryMovementApi#create_transfer_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
121
+ end
122
+ return data, status_code, headers
123
+ end
124
+ end
125
+ end
@@ -0,0 +1,280 @@
1
+ =begin
2
+ #API from Wineshipping
3
+
4
+ #Wineshipping API is a programmatically consumable service or an Application Programming Interface (API) platform designed to enable Wineshipping LLC's client applications to natively transmit and manage their order, view inventory, track shipments etc.<br /><br />In order to access API operations request a UserKey and Password from Wineshipping. For any questions please contact Wineshipping Helpdesk at <a href='mailto:IT-Help@wineshipping.com?Subject=API from Wineshipping'>IT-Help@wineshipping.com</a>.
5
+
6
+ OpenAPI spec version: V3
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.7
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module WineShipping
16
+ class SalesOrderApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Use this operation to cancel an existing open sales order. Successful execution of this method will cancel the sales order in Wineshipping system. If the order cannot be cancelled for some reason standard HTTP Status Code and a reason will be returned.
23
+ # @param cancel_sales_order_request
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [nil]
26
+ def cancel_sales_order(cancel_sales_order_request, opts = {})
27
+ cancel_sales_order_with_http_info(cancel_sales_order_request, opts)
28
+ nil
29
+ end
30
+
31
+ # Use this operation to cancel an existing open sales order. Successful execution of this method will cancel the sales order in Wineshipping system. If the order cannot be cancelled for some reason standard HTTP Status Code and a reason will be returned.
32
+ # @param cancel_sales_order_request
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
35
+ def cancel_sales_order_with_http_info(cancel_sales_order_request, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: SalesOrderApi.cancel_sales_order ...'
38
+ end
39
+ # verify the required parameter 'cancel_sales_order_request' is set
40
+ if @api_client.config.client_side_validation && cancel_sales_order_request.nil?
41
+ fail ArgumentError, "Missing the required parameter 'cancel_sales_order_request' when calling SalesOrderApi.cancel_sales_order"
42
+ end
43
+ # resource path
44
+ local_var_path = '/api/SalesOrder/CancelSalesOrder'
45
+
46
+ # query parameters
47
+ query_params = {}
48
+
49
+ # header parameters
50
+ header_params = {}
51
+ # HTTP header 'Accept' (if needed)
52
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
53
+ # HTTP header 'Content-Type'
54
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
55
+
56
+ # form parameters
57
+ form_params = {}
58
+
59
+ # http body (model)
60
+ post_body = @api_client.object_to_http_body(cancel_sales_order_request)
61
+ auth_names = []
62
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
63
+ :header_params => header_params,
64
+ :query_params => query_params,
65
+ :form_params => form_params,
66
+ :body => post_body,
67
+ :auth_names => auth_names)
68
+ if @api_client.config.debugging
69
+ @api_client.config.logger.debug "API called: SalesOrderApi#cancel_sales_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
70
+ end
71
+ return data, status_code, headers
72
+ end
73
+ # Successful execution of this method will generate a new shipment order in Wineshipping's system and will return a transaction reference identifier. Store this identifier back into your system for reference later in the event there is an issue with your order.
74
+ # @param order_details_info
75
+ # @param [Hash] opts the optional parameters
76
+ # @return [nil]
77
+ def create_sales_order(order_details_info, opts = {})
78
+ create_sales_order_with_http_info(order_details_info, opts)
79
+ nil
80
+ end
81
+
82
+ # Successful execution of this method will generate a new shipment order in Wineshipping&#39;s system and will return a transaction reference identifier. Store this identifier back into your system for reference later in the event there is an issue with your order.
83
+ # @param order_details_info
84
+ # @param [Hash] opts the optional parameters
85
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
86
+ def create_sales_order_with_http_info(order_details_info, opts = {})
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug 'Calling API: SalesOrderApi.create_sales_order ...'
89
+ end
90
+ # verify the required parameter 'order_details_info' is set
91
+ if @api_client.config.client_side_validation && order_details_info.nil?
92
+ fail ArgumentError, "Missing the required parameter 'order_details_info' when calling SalesOrderApi.create_sales_order"
93
+ end
94
+ # resource path
95
+ local_var_path = '/api/SalesOrder/CreateSalesOrder'
96
+
97
+ # query parameters
98
+ query_params = {}
99
+
100
+ # header parameters
101
+ header_params = {}
102
+ # HTTP header 'Accept' (if needed)
103
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
104
+ # HTTP header 'Content-Type'
105
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
106
+
107
+ # form parameters
108
+ form_params = {}
109
+
110
+ # http body (model)
111
+ post_body = @api_client.object_to_http_body(order_details_info)
112
+ auth_names = []
113
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
114
+ :header_params => header_params,
115
+ :query_params => query_params,
116
+ :form_params => form_params,
117
+ :body => post_body,
118
+ :auth_names => auth_names)
119
+ if @api_client.config.debugging
120
+ @api_client.config.logger.debug "API called: SalesOrderApi#create_sales_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
121
+ end
122
+ return data, status_code, headers
123
+ end
124
+ # Use this operation to retrieve a list of on-hold orders for a customer. Successful execution of this method will generate a list of on hold orders from Wineshipping's system and if no orders are on hold, HTTP status code Not Found response will be returned.
125
+ # @param authentication_details
126
+ # @param [Hash] opts the optional parameters
127
+ # @return [Array<OrderOnHold>]
128
+ def get_orders_on_hold(authentication_details, opts = {})
129
+ data, _status_code, _headers = get_orders_on_hold_with_http_info(authentication_details, opts)
130
+ data
131
+ end
132
+
133
+ # Use this operation to retrieve a list of on-hold orders for a customer. Successful execution of this method will generate a list of on hold orders from Wineshipping&#39;s system and if no orders are on hold, HTTP status code Not Found response will be returned.
134
+ # @param authentication_details
135
+ # @param [Hash] opts the optional parameters
136
+ # @return [Array<(Array<OrderOnHold>, Fixnum, Hash)>] Array<OrderOnHold> data, response status code and response headers
137
+ def get_orders_on_hold_with_http_info(authentication_details, opts = {})
138
+ if @api_client.config.debugging
139
+ @api_client.config.logger.debug 'Calling API: SalesOrderApi.get_orders_on_hold ...'
140
+ end
141
+ # verify the required parameter 'authentication_details' is set
142
+ if @api_client.config.client_side_validation && authentication_details.nil?
143
+ fail ArgumentError, "Missing the required parameter 'authentication_details' when calling SalesOrderApi.get_orders_on_hold"
144
+ end
145
+ # resource path
146
+ local_var_path = '/api/SalesOrder/GetOrdersOnHold'
147
+
148
+ # query parameters
149
+ query_params = {}
150
+
151
+ # header parameters
152
+ header_params = {}
153
+ # HTTP header 'Accept' (if needed)
154
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
155
+ # HTTP header 'Content-Type'
156
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
157
+
158
+ # form parameters
159
+ form_params = {}
160
+
161
+ # http body (model)
162
+ post_body = @api_client.object_to_http_body(authentication_details)
163
+ auth_names = []
164
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
165
+ :header_params => header_params,
166
+ :query_params => query_params,
167
+ :form_params => form_params,
168
+ :body => post_body,
169
+ :auth_names => auth_names,
170
+ :return_type => 'Array<OrderOnHold>')
171
+ if @api_client.config.debugging
172
+ @api_client.config.logger.debug "API called: SalesOrderApi#get_orders_on_hold\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
173
+ end
174
+ return data, status_code, headers
175
+ end
176
+ # Use this operation to retrieve a list of return sales orders for a customer. Successful execution of this method will generate a list of returns from Wineshipping system.
177
+ # @param returns_request_details
178
+ # @param [Hash] opts the optional parameters
179
+ # @return [ReturnResult]
180
+ def get_returns(returns_request_details, opts = {})
181
+ data, _status_code, _headers = get_returns_with_http_info(returns_request_details, opts)
182
+ data
183
+ end
184
+
185
+ # Use this operation to retrieve a list of return sales orders for a customer. Successful execution of this method will generate a list of returns from Wineshipping system.
186
+ # @param returns_request_details
187
+ # @param [Hash] opts the optional parameters
188
+ # @return [Array<(ReturnResult, Fixnum, Hash)>] ReturnResult data, response status code and response headers
189
+ def get_returns_with_http_info(returns_request_details, opts = {})
190
+ if @api_client.config.debugging
191
+ @api_client.config.logger.debug 'Calling API: SalesOrderApi.get_returns ...'
192
+ end
193
+ # verify the required parameter 'returns_request_details' is set
194
+ if @api_client.config.client_side_validation && returns_request_details.nil?
195
+ fail ArgumentError, "Missing the required parameter 'returns_request_details' when calling SalesOrderApi.get_returns"
196
+ end
197
+ # resource path
198
+ local_var_path = '/api/SalesOrder/GetReturns'
199
+
200
+ # query parameters
201
+ query_params = {}
202
+
203
+ # header parameters
204
+ header_params = {}
205
+ # HTTP header 'Accept' (if needed)
206
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
207
+ # HTTP header 'Content-Type'
208
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
209
+
210
+ # form parameters
211
+ form_params = {}
212
+
213
+ # http body (model)
214
+ post_body = @api_client.object_to_http_body(returns_request_details)
215
+ auth_names = []
216
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
217
+ :header_params => header_params,
218
+ :query_params => query_params,
219
+ :form_params => form_params,
220
+ :body => post_body,
221
+ :auth_names => auth_names,
222
+ :return_type => 'ReturnResult')
223
+ if @api_client.config.debugging
224
+ @api_client.config.logger.debug "API called: SalesOrderApi#get_returns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
225
+ end
226
+ return data, status_code, headers
227
+ end
228
+ # Use this operation to replace/update an existing open sales order. Successful execution of this method will replace an open sales order in Wineshipping system and will return a transaction reference identifier. Store this identifier back into your system for reference later in the event there is an issue with your replacement order. If the order cannot be replaced for some, reason standard HTTP Status Code and a reason message will be returned.
229
+ # @param order_details_info
230
+ # @param [Hash] opts the optional parameters
231
+ # @return [nil]
232
+ def replace_sales_order(order_details_info, opts = {})
233
+ replace_sales_order_with_http_info(order_details_info, opts)
234
+ nil
235
+ end
236
+
237
+ # Use this operation to replace/update an existing open sales order. Successful execution of this method will replace an open sales order in Wineshipping system and will return a transaction reference identifier. Store this identifier back into your system for reference later in the event there is an issue with your replacement order. If the order cannot be replaced for some, reason standard HTTP Status Code and a reason message will be returned.
238
+ # @param order_details_info
239
+ # @param [Hash] opts the optional parameters
240
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
241
+ def replace_sales_order_with_http_info(order_details_info, opts = {})
242
+ if @api_client.config.debugging
243
+ @api_client.config.logger.debug 'Calling API: SalesOrderApi.replace_sales_order ...'
244
+ end
245
+ # verify the required parameter 'order_details_info' is set
246
+ if @api_client.config.client_side_validation && order_details_info.nil?
247
+ fail ArgumentError, "Missing the required parameter 'order_details_info' when calling SalesOrderApi.replace_sales_order"
248
+ end
249
+ # resource path
250
+ local_var_path = '/api/SalesOrder/ReplaceSalesOrder'
251
+
252
+ # query parameters
253
+ query_params = {}
254
+
255
+ # header parameters
256
+ header_params = {}
257
+ # HTTP header 'Accept' (if needed)
258
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
259
+ # HTTP header 'Content-Type'
260
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
261
+
262
+ # form parameters
263
+ form_params = {}
264
+
265
+ # http body (model)
266
+ post_body = @api_client.object_to_http_body(order_details_info)
267
+ auth_names = []
268
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
269
+ :header_params => header_params,
270
+ :query_params => query_params,
271
+ :form_params => form_params,
272
+ :body => post_body,
273
+ :auth_names => auth_names)
274
+ if @api_client.config.debugging
275
+ @api_client.config.logger.debug "API called: SalesOrderApi#replace_sales_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
276
+ end
277
+ return data, status_code, headers
278
+ end
279
+ end
280
+ end
@@ -0,0 +1,74 @@
1
+ =begin
2
+ #API from Wineshipping
3
+
4
+ #Wineshipping API is a programmatically consumable service or an Application Programming Interface (API) platform designed to enable Wineshipping LLC's client applications to natively transmit and manage their order, view inventory, track shipments etc.<br /><br />In order to access API operations request a UserKey and Password from Wineshipping. For any questions please contact Wineshipping Helpdesk at <a href='mailto:IT-Help@wineshipping.com?Subject=API from Wineshipping'>IT-Help@wineshipping.com</a>.
5
+
6
+ OpenAPI spec version: V3
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.7
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module WineShipping
16
+ class SKUApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Successful execution of this method will generate a new SKU in Wineshipping's system and will return a transaction reference identifier. Store this identifier back into your system for reference later in the event there is an issue with the SKU.
23
+ # @param sku_request_details
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [nil]
26
+ def create_sku(sku_request_details, opts = {})
27
+ create_sku_with_http_info(sku_request_details, opts)
28
+ nil
29
+ end
30
+
31
+ # Successful execution of this method will generate a new SKU in Wineshipping&#39;s system and will return a transaction reference identifier. Store this identifier back into your system for reference later in the event there is an issue with the SKU.
32
+ # @param sku_request_details
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
35
+ def create_sku_with_http_info(sku_request_details, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: SKUApi.create_sku ...'
38
+ end
39
+ # verify the required parameter 'sku_request_details' is set
40
+ if @api_client.config.client_side_validation && sku_request_details.nil?
41
+ fail ArgumentError, "Missing the required parameter 'sku_request_details' when calling SKUApi.create_sku"
42
+ end
43
+ # resource path
44
+ local_var_path = '/api/SKU/CreateSKU'
45
+
46
+ # query parameters
47
+ query_params = {}
48
+
49
+ # header parameters
50
+ header_params = {}
51
+ # HTTP header 'Accept' (if needed)
52
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
53
+ # HTTP header 'Content-Type'
54
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
55
+
56
+ # form parameters
57
+ form_params = {}
58
+
59
+ # http body (model)
60
+ post_body = @api_client.object_to_http_body(sku_request_details)
61
+ auth_names = []
62
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
63
+ :header_params => header_params,
64
+ :query_params => query_params,
65
+ :form_params => form_params,
66
+ :body => post_body,
67
+ :auth_names => auth_names)
68
+ if @api_client.config.debugging
69
+ @api_client.config.logger.debug "API called: SKUApi#create_sku\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
70
+ end
71
+ return data, status_code, headers
72
+ end
73
+ end
74
+ end