dear-inventory-ruby 0.2.2 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/README.md +11 -4
- data/docs/AuthorizationType.md +16 -0
- data/docs/InventoryApi.md +163 -5
- data/docs/Sale.md +99 -0
- data/docs/SaleItem.md +77 -0
- data/docs/SaleList.md +21 -0
- data/docs/WebhookType.md +16 -0
- data/lib/dear-inventory-ruby/api/inventory_api.rb +177 -6
- data/lib/dear-inventory-ruby/models/authorization_type.rb +37 -0
- data/lib/dear-inventory-ruby/models/sale.rb +615 -0
- data/lib/dear-inventory-ruby/models/sale_item.rb +507 -0
- data/lib/dear-inventory-ruby/models/sale_list.rb +229 -0
- data/lib/dear-inventory-ruby/models/webhook_type.rb +54 -0
- data/lib/dear-inventory-ruby/version.rb +1 -1
- data/lib/dear-inventory-ruby.rb +5 -0
- data/spec/.DS_Store +0 -0
- data/spec/api/inventory_api_spec.rb +43 -2
- data/spec/models/authorization_type_spec.rb +35 -0
- data/spec/models/sale_item_spec.rb +221 -0
- data/spec/models/sale_list_spec.rb +53 -0
- data/spec/models/sale_spec.rb +287 -0
- data/spec/models/webhook_type_spec.rb +35 -0
- metadata +27 -6
@@ -0,0 +1,229 @@
|
|
1
|
+
=begin
|
2
|
+
#DEAR Inventory API
|
3
|
+
|
4
|
+
#This specifing endpoints for DEAR Inventory API
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
Contact: nnhansg@gmail.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module DearInventoryRuby
|
16
|
+
class SaleList
|
17
|
+
# Total
|
18
|
+
attr_accessor :total
|
19
|
+
|
20
|
+
# Page
|
21
|
+
attr_accessor :page
|
22
|
+
|
23
|
+
# Array of SaleItem
|
24
|
+
attr_accessor :sale_list
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'total' => :'Total',
|
30
|
+
:'page' => :'Page',
|
31
|
+
:'sale_list' => :'SaleList'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
def self.openapi_types
|
37
|
+
{
|
38
|
+
:'total' => :'Float',
|
39
|
+
:'page' => :'Float',
|
40
|
+
:'sale_list' => :'Array<SaleItem>'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# List of attributes with nullable: true
|
45
|
+
def self.openapi_nullable
|
46
|
+
Set.new([
|
47
|
+
])
|
48
|
+
end
|
49
|
+
|
50
|
+
# Initializes the object
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
52
|
+
def initialize(attributes = {})
|
53
|
+
if (!attributes.is_a?(Hash))
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DearInventoryRuby::SaleList` initialize method"
|
55
|
+
end
|
56
|
+
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
58
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
59
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
60
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DearInventoryRuby::SaleList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
61
|
+
end
|
62
|
+
h[k.to_sym] = v
|
63
|
+
}
|
64
|
+
|
65
|
+
if attributes.key?(:'total')
|
66
|
+
self.total = attributes[:'total']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.key?(:'page')
|
70
|
+
self.page = attributes[:'page']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'sale_list')
|
74
|
+
if (value = attributes[:'sale_list']).is_a?(Array)
|
75
|
+
self.sale_list = value
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
81
|
+
# @return Array for valid properties with the reasons
|
82
|
+
def list_invalid_properties
|
83
|
+
invalid_properties = Array.new
|
84
|
+
invalid_properties
|
85
|
+
end
|
86
|
+
|
87
|
+
# Check to see if the all the properties in the model are valid
|
88
|
+
# @return true if the model is valid
|
89
|
+
def valid?
|
90
|
+
true
|
91
|
+
end
|
92
|
+
|
93
|
+
# Checks equality by comparing each attribute.
|
94
|
+
# @param [Object] Object to be compared
|
95
|
+
def ==(o)
|
96
|
+
return true if self.equal?(o)
|
97
|
+
self.class == o.class &&
|
98
|
+
total == o.total &&
|
99
|
+
page == o.page &&
|
100
|
+
sale_list == o.sale_list
|
101
|
+
end
|
102
|
+
|
103
|
+
# @see the `==` method
|
104
|
+
# @param [Object] Object to be compared
|
105
|
+
def eql?(o)
|
106
|
+
self == o
|
107
|
+
end
|
108
|
+
|
109
|
+
# Calculates hash code according to all attributes.
|
110
|
+
# @return [Integer] Hash code
|
111
|
+
def hash
|
112
|
+
[total, page, sale_list].hash
|
113
|
+
end
|
114
|
+
|
115
|
+
# Builds the object from hash
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
117
|
+
# @return [Object] Returns the model itself
|
118
|
+
def self.build_from_hash(attributes)
|
119
|
+
new.build_from_hash(attributes)
|
120
|
+
end
|
121
|
+
|
122
|
+
# Builds the object from hash
|
123
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
124
|
+
# @return [Object] Returns the model itself
|
125
|
+
def build_from_hash(attributes)
|
126
|
+
return nil unless attributes.is_a?(Hash)
|
127
|
+
self.class.openapi_types.each_pair do |key, type|
|
128
|
+
if type =~ /\AArray<(.*)>/i
|
129
|
+
# check to ensure the input is an array given that the attribute
|
130
|
+
# is documented as an array but the input is not
|
131
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
132
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
133
|
+
end
|
134
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
135
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
136
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
137
|
+
end
|
138
|
+
|
139
|
+
self
|
140
|
+
end
|
141
|
+
|
142
|
+
# Deserializes the data based on type
|
143
|
+
# @param string type Data type
|
144
|
+
# @param string value Value to be deserialized
|
145
|
+
# @return [Object] Deserialized data
|
146
|
+
def _deserialize(type, value)
|
147
|
+
case type.to_sym
|
148
|
+
when :DateTime
|
149
|
+
DateTime.parse(value)
|
150
|
+
when :Date
|
151
|
+
Date.parse(value)
|
152
|
+
when :String
|
153
|
+
value.to_s
|
154
|
+
when :Integer
|
155
|
+
value.to_i
|
156
|
+
when :Float
|
157
|
+
value.to_f
|
158
|
+
when :Boolean
|
159
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
160
|
+
true
|
161
|
+
else
|
162
|
+
false
|
163
|
+
end
|
164
|
+
when :Object
|
165
|
+
# generic object (usually a Hash), return directly
|
166
|
+
value
|
167
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
168
|
+
inner_type = Regexp.last_match[:inner_type]
|
169
|
+
value.map { |v| _deserialize(inner_type, v) }
|
170
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
171
|
+
k_type = Regexp.last_match[:k_type]
|
172
|
+
v_type = Regexp.last_match[:v_type]
|
173
|
+
{}.tap do |hash|
|
174
|
+
value.each do |k, v|
|
175
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
else # model
|
179
|
+
DearInventoryRuby.const_get(type).build_from_hash(value)
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
# Returns the string representation of the object
|
184
|
+
# @return [String] String presentation of the object
|
185
|
+
def to_s
|
186
|
+
to_hash.to_s
|
187
|
+
end
|
188
|
+
|
189
|
+
# to_body is an alias to to_hash (backward compatibility)
|
190
|
+
# @return [Hash] Returns the object in the form of hash
|
191
|
+
def to_body
|
192
|
+
to_hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Returns the object in the form of hash
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
197
|
+
def to_hash
|
198
|
+
hash = {}
|
199
|
+
self.class.attribute_map.each_pair do |attr, param|
|
200
|
+
value = self.send(attr)
|
201
|
+
if value.nil?
|
202
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
203
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
204
|
+
end
|
205
|
+
|
206
|
+
hash[param] = _to_hash(value)
|
207
|
+
end
|
208
|
+
hash
|
209
|
+
end
|
210
|
+
|
211
|
+
# Outputs non-array value in the form of hash
|
212
|
+
# For object, use to_hash. Otherwise, just return the value
|
213
|
+
# @param [Object] value Any valid value
|
214
|
+
# @return [Hash] Returns the value in the form of hash
|
215
|
+
def _to_hash(value)
|
216
|
+
if value.is_a?(Array)
|
217
|
+
value.compact.map { |v| _to_hash(v) }
|
218
|
+
elsif value.is_a?(Hash)
|
219
|
+
{}.tap do |hash|
|
220
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
221
|
+
end
|
222
|
+
elsif value.respond_to? :to_hash
|
223
|
+
value.to_hash
|
224
|
+
else
|
225
|
+
value
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|
229
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
=begin
|
2
|
+
#DEAR Inventory API
|
3
|
+
|
4
|
+
#This specifing endpoints for DEAR Inventory API
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
Contact: nnhansg@gmail.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module DearInventoryRuby
|
16
|
+
class WebhookType
|
17
|
+
SALE_QUOTE_AUTHORISED = "Sale/QuoteAuthorised".freeze
|
18
|
+
SALE_ORDER_AUTHORISED = "Sale/OrderAuthorised".freeze
|
19
|
+
SALE_VOIDED = "Sale/Voided".freeze
|
20
|
+
SALE_BACKORDERED = "Sale/Backordered".freeze
|
21
|
+
SALE_SHIPMENT_AUTHORISED = "Sale/ShipmentAuthorised".freeze
|
22
|
+
SALE_INVOICE_AUTHORISED = "Sale/InvoiceAuthorised".freeze
|
23
|
+
SALE_PICK_AUTHORISED = "Sale/PickAuthorised".freeze
|
24
|
+
SALE_PACK_AUTHORISED = "Sale/PackAuthorised".freeze
|
25
|
+
SALE_CREDIT_NOTE_AUTHORISED = "Sale/CreditNoteAuthorised".freeze
|
26
|
+
SALE_UNDO = "Sale/Undo".freeze
|
27
|
+
SALE_PARTIAL_PAYMENT_RECEIVED = "Sale/PartialPaymentReceived".freeze
|
28
|
+
SALE_FULL_PAYMENT_RECEIVED = "Sale/FullPaymentReceived".freeze
|
29
|
+
SALE_SHIPMENT_TRACKING_NUMBER_CHANGED = "Sale/ShipmentTrackingNumberChanged".freeze
|
30
|
+
PURCHASE_ORDER_AUTHORISED = "Purchase/OrderAuthorised".freeze
|
31
|
+
PURCHASE_INVOICE_AUTHORISED = "Purchase/InvoiceAuthorised".freeze
|
32
|
+
PURCHASE_STOCK_RECEIVED_AUTHORISED = "Purchase/StockReceivedAuthorised".freeze
|
33
|
+
PURCHASE_CREDIT_NOTE_AUTHORISED = "Purchase/CreditNoteAuthorised".freeze
|
34
|
+
CUSTOMER_UPDATED = "Customer/Updated".freeze
|
35
|
+
SUPPLIER_UPDATED = "Supplier/Updated".freeze
|
36
|
+
STOCK_AVAILABLE_STOCK_LEVEL_CHANGED = "Stock/AvailableStockLevelChanged".freeze
|
37
|
+
|
38
|
+
# Builds the enum from string
|
39
|
+
# @param [String] The enum value in the form of the string
|
40
|
+
# @return [String] The enum value
|
41
|
+
def self.build_from_hash(value)
|
42
|
+
new.build_from_hash(value)
|
43
|
+
end
|
44
|
+
|
45
|
+
# Builds the enum from string
|
46
|
+
# @param [String] The enum value in the form of the string
|
47
|
+
# @return [String] The enum value
|
48
|
+
def build_from_hash(value)
|
49
|
+
constantValues = WebhookType.constants.select { |c| WebhookType::const_get(c) == value }
|
50
|
+
raise "Invalid ENUM value #{value} for class #WebhookType" if constantValues.empty?
|
51
|
+
value
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
data/lib/dear-inventory-ruby.rb
CHANGED
@@ -20,6 +20,7 @@ require 'dear-inventory-ruby/configuration'
|
|
20
20
|
require 'dear-inventory-ruby/models/account'
|
21
21
|
require 'dear-inventory-ruby/models/accounts'
|
22
22
|
require 'dear-inventory-ruby/models/address'
|
23
|
+
require 'dear-inventory-ruby/models/authorization_type'
|
23
24
|
require 'dear-inventory-ruby/models/contact'
|
24
25
|
require 'dear-inventory-ruby/models/customer'
|
25
26
|
require 'dear-inventory-ruby/models/customers'
|
@@ -30,6 +31,7 @@ require 'dear-inventory-ruby/models/payment_term'
|
|
30
31
|
require 'dear-inventory-ruby/models/payment_terms'
|
31
32
|
require 'dear-inventory-ruby/models/price_tier'
|
32
33
|
require 'dear-inventory-ruby/models/price_tiers'
|
34
|
+
require 'dear-inventory-ruby/models/sale'
|
33
35
|
require 'dear-inventory-ruby/models/sale_additional_charge'
|
34
36
|
require 'dear-inventory-ruby/models/sale_invoice'
|
35
37
|
require 'dear-inventory-ruby/models/sale_invoice_additional_charge'
|
@@ -37,6 +39,8 @@ require 'dear-inventory-ruby/models/sale_invoice_delete'
|
|
37
39
|
require 'dear-inventory-ruby/models/sale_invoice_line'
|
38
40
|
require 'dear-inventory-ruby/models/sale_invoice_post'
|
39
41
|
require 'dear-inventory-ruby/models/sale_invoices'
|
42
|
+
require 'dear-inventory-ruby/models/sale_item'
|
43
|
+
require 'dear-inventory-ruby/models/sale_list'
|
40
44
|
require 'dear-inventory-ruby/models/sale_order'
|
41
45
|
require 'dear-inventory-ruby/models/sale_order_line'
|
42
46
|
require 'dear-inventory-ruby/models/sale_payment'
|
@@ -49,6 +53,7 @@ require 'dear-inventory-ruby/models/tax'
|
|
49
53
|
require 'dear-inventory-ruby/models/tax_component'
|
50
54
|
require 'dear-inventory-ruby/models/taxes'
|
51
55
|
require 'dear-inventory-ruby/models/webhook'
|
56
|
+
require 'dear-inventory-ruby/models/webhook_type'
|
52
57
|
require 'dear-inventory-ruby/models/webhooks'
|
53
58
|
|
54
59
|
# APIs
|
data/spec/.DS_Store
ADDED
Binary file
|
@@ -133,7 +133,7 @@ describe 'InventoryApi' do
|
|
133
133
|
# @param webhook a webhook object with properties to create
|
134
134
|
# @param [Hash] opts the optional parameters
|
135
135
|
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
136
|
-
# @return [
|
136
|
+
# @return [Webhook]
|
137
137
|
describe 'create_webhook test' do
|
138
138
|
it 'should work' do
|
139
139
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -266,6 +266,20 @@ describe 'InventoryApi' do
|
|
266
266
|
end
|
267
267
|
end
|
268
268
|
|
269
|
+
# unit tests for get_sale
|
270
|
+
# Allows you to retrieve the Sale
|
271
|
+
# @param [Hash] opts the optional parameters
|
272
|
+
# @option opts [String] :id Default is nil
|
273
|
+
# @option opts [Boolean] :combine_additional_charges Show additional charges in 'Lines' array
|
274
|
+
# @option opts [Boolean] :hide_inventory_movements Hide inventory movements (Default = false)
|
275
|
+
# @option opts [Boolean] :include_transactions Show related transactions (Default = false)
|
276
|
+
# @return [Sale]
|
277
|
+
describe 'get_sale test' do
|
278
|
+
it 'should work' do
|
279
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
280
|
+
end
|
281
|
+
end
|
282
|
+
|
269
283
|
# unit tests for get_sale_invoices
|
270
284
|
# Allows you to retrieve the sale invoices
|
271
285
|
# @param [Hash] opts the optional parameters
|
@@ -279,6 +293,33 @@ describe 'InventoryApi' do
|
|
279
293
|
end
|
280
294
|
end
|
281
295
|
|
296
|
+
# unit tests for get_sale_list
|
297
|
+
# Allows you to retrieve the Sales based on conditions
|
298
|
+
# @param [Hash] opts the optional parameters
|
299
|
+
# @option opts [String] :page Default is 1
|
300
|
+
# @option opts [String] :limit Default is 100
|
301
|
+
# @option opts [String] :search Only return sales with search value contained in one of these fields: OrderNumber, Status, Customer, invoiceNumber, CustomerReference, CreditNoteNumber
|
302
|
+
# @option opts [DateTime] :created_since Only return sales created after specified date. Date must follow ISO 8601 format.
|
303
|
+
# @option opts [DateTime] :updated_since Only return sales changed after specified date. Date must follow ISO 8601 format.
|
304
|
+
# @option opts [DateTime] :ship_by Only return sales with Ship By date on or before specified date, with not authorised Shipment. Date must follow ISO 8601 format.
|
305
|
+
# @option opts [String] :quote_status Only return sales with specified quote status
|
306
|
+
# @option opts [String] :order_status Only return sales with specified order status
|
307
|
+
# @option opts [String] :combined_pick_status Only return sales with specified CombinedPickingStatus
|
308
|
+
# @option opts [String] :combined_pack_status Only return sales with specified CombinedPackingStatus
|
309
|
+
# @option opts [String] :combined_shipping_status Only return sales with specified CombinedShippingStatus
|
310
|
+
# @option opts [String] :combined_invoice_status Only return sales with specified CombinedInvoiceStatus
|
311
|
+
# @option opts [String] :credit_note_status Only return sales with specified credit note status
|
312
|
+
# @option opts [String] :external_id Only return sales with specified External ID
|
313
|
+
# @option opts [String] :status Default is nil
|
314
|
+
# @option opts [Boolean] :ready_for_shipping Only return sales with 'Authorised' pack and not 'Authorised' shipping
|
315
|
+
# @option opts [String] :order_location_id Only return sales with specified Order Location ID
|
316
|
+
# @return [SaleList]
|
317
|
+
describe 'get_sale_list test' do
|
318
|
+
it 'should work' do
|
319
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
320
|
+
end
|
321
|
+
end
|
322
|
+
|
282
323
|
# unit tests for get_sale_order
|
283
324
|
# Allows you to retrieve the Sale Order
|
284
325
|
# @param [Hash] opts the optional parameters
|
@@ -409,7 +450,7 @@ describe 'InventoryApi' do
|
|
409
450
|
# @param webhook a webhook object with properties to update
|
410
451
|
# @param [Hash] opts the optional parameters
|
411
452
|
# @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
|
412
|
-
# @return [
|
453
|
+
# @return [Webhook]
|
413
454
|
describe 'update_webhook test' do
|
414
455
|
it 'should work' do
|
415
456
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -0,0 +1,35 @@
|
|
1
|
+
=begin
|
2
|
+
#DEAR Inventory API
|
3
|
+
|
4
|
+
#This specifing endpoints for DEAR Inventory API
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
Contact: nnhansg@gmail.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for DearInventoryRuby::AuthorizationType
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'AuthorizationType' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = DearInventoryRuby::AuthorizationType.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of AuthorizationType' do
|
31
|
+
it 'should create an instance of AuthorizationType' do
|
32
|
+
expect(@instance).to be_instance_of(DearInventoryRuby::AuthorizationType)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,221 @@
|
|
1
|
+
=begin
|
2
|
+
#DEAR Inventory API
|
3
|
+
|
4
|
+
#This specifing endpoints for DEAR Inventory API
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
Contact: nnhansg@gmail.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for DearInventoryRuby::SaleItem
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'SaleItem' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = DearInventoryRuby::SaleItem.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of SaleItem' do
|
31
|
+
it 'should create an instance of SaleItem' do
|
32
|
+
expect(@instance).to be_instance_of(DearInventoryRuby::SaleItem)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "sale_id"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "order_number"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'test attribute "status"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe 'test attribute "order_date"' do
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe 'test attribute "invoice_date"' do
|
60
|
+
it 'should work' do
|
61
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe 'test attribute "customer"' do
|
66
|
+
it 'should work' do
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe 'test attribute "customer_id"' do
|
72
|
+
it 'should work' do
|
73
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe 'test attribute "invoice_number"' do
|
78
|
+
it 'should work' do
|
79
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
describe 'test attribute "customer_reference"' do
|
84
|
+
it 'should work' do
|
85
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
describe 'test attribute "invoice_amount"' do
|
90
|
+
it 'should work' do
|
91
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
describe 'test attribute "paid_amount"' do
|
96
|
+
it 'should work' do
|
97
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
describe 'test attribute "invoice_due_date"' do
|
102
|
+
it 'should work' do
|
103
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
describe 'test attribute "ship_by"' do
|
108
|
+
it 'should work' do
|
109
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
describe 'test attribute "base_currency"' do
|
114
|
+
it 'should work' do
|
115
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
describe 'test attribute "customer_currency"' do
|
120
|
+
it 'should work' do
|
121
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
describe 'test attribute "credit_note_number"' do
|
126
|
+
it 'should work' do
|
127
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
describe 'test attribute "updated"' do
|
132
|
+
it 'should work' do
|
133
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
describe 'test attribute "quote_status"' do
|
138
|
+
it 'should work' do
|
139
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
describe 'test attribute "order_status"' do
|
144
|
+
it 'should work' do
|
145
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
describe 'test attribute "combined_picking_status"' do
|
150
|
+
it 'should work' do
|
151
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
describe 'test attribute "combined_packing_status"' do
|
156
|
+
it 'should work' do
|
157
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
describe 'test attribute "combined_shipping_status"' do
|
162
|
+
it 'should work' do
|
163
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
describe 'test attribute "ful_filment_status"' do
|
168
|
+
it 'should work' do
|
169
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
describe 'test attribute "combined_invoice_status"' do
|
174
|
+
it 'should work' do
|
175
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
describe 'test attribute "credit_note_status"' do
|
180
|
+
it 'should work' do
|
181
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
describe 'test attribute "combined_payment_status"' do
|
186
|
+
it 'should work' do
|
187
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
describe 'test attribute "type"' do
|
192
|
+
it 'should work' do
|
193
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
describe 'test attribute "combined_tracking_numbers"' do
|
198
|
+
it 'should work' do
|
199
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
describe 'test attribute "source_channel"' do
|
204
|
+
it 'should work' do
|
205
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
describe 'test attribute "external_id"' do
|
210
|
+
it 'should work' do
|
211
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
describe 'test attribute "order_location_id"' do
|
216
|
+
it 'should work' do
|
217
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
end
|