dear-inventory-ruby 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51c48b4739e560045deac028714486d1db23d4f3424c59798638e8f0f935e425
4
- data.tar.gz: 4cd9898b7d3202d14cc6488eb3cf7be1c09d6965a5f49d5ceac56172c4477ee5
3
+ metadata.gz: 665772a1eec52c5945c0e6106d4d169e9b310a2046d1974d67f18f4044d779af
4
+ data.tar.gz: 914df67acb8c2358a21af9ecbf1aafd575cfa2ea01b17f4b3468ddab1489bd38
5
5
  SHA512:
6
- metadata.gz: f288879bd2f68534b6fe69afeafd8c8884ff9f4bcef34723147bfdf92541663bf6c788cfdde49558053bf8affa7faa0b697f9cd463324552e182a927b7d19175
7
- data.tar.gz: ec3eee176bc1a6b496e05cdcfc84c658f43ae7070b236f91a20c2fd48b058486b4b10a77d5cdda8d6d0feefb76a8c74d39319790b77843e1cf91058d28325b36
6
+ metadata.gz: 6ac843e11c132abf8137314fa384f9fe68c1e3fb18db81b115a08a8a06681fa77d349e7e392e35717043b31a6915c3854938faff85df2c8d90654a04b8ff5244
7
+ data.tar.gz: 5a14e0e4c109c10847ec9996ee656427021d46abe4dd1bad6e4708fe91e15078d775881dea00b561cdc1b0059b775bd737f3b0342c526c9d03ae39b8c40f3c59
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.2.6] - 2022-07-14
6
+
7
+ - Update final totals of each invoice for the endpoint GET `/sale`
8
+
5
9
  ## [0.2.5] - 2022-05-26
6
10
 
7
11
  - Add the new endpoint GET `/saleList`
data/README.md CHANGED
@@ -7,7 +7,7 @@ This specifing endpoints for DEAR Inventory API
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 0.2.5
10
+ - Package version: 0.2.6
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [https://www.nhansg.com](https://www.nhansg.com)
13
13
 
@@ -24,16 +24,16 @@ gem build dear-inventory-ruby.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./dear-inventory-ruby-0.2.5.gem
27
+ gem install ./dear-inventory-ruby-0.2.6.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./dear-inventory-ruby-0.2.5.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./dear-inventory-ruby-0.2.6.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'dear-inventory-ruby', '~> 0.2.5'
36
+ gem 'dear-inventory-ruby', '~> 0.2.6'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -149,6 +149,7 @@ Class | Method | HTTP request | Description
149
149
  - [DearInventoryRuby::SaleInvoiceAdditionalCharge](docs/SaleInvoiceAdditionalCharge.md)
150
150
  - [DearInventoryRuby::SaleInvoiceDelete](docs/SaleInvoiceDelete.md)
151
151
  - [DearInventoryRuby::SaleInvoiceLine](docs/SaleInvoiceLine.md)
152
+ - [DearInventoryRuby::SaleInvoicePartial](docs/SaleInvoicePartial.md)
152
153
  - [DearInventoryRuby::SaleInvoicePost](docs/SaleInvoicePost.md)
153
154
  - [DearInventoryRuby::SaleInvoices](docs/SaleInvoices.md)
154
155
  - [DearInventoryRuby::SaleItem](docs/SaleItem.md)
@@ -156,6 +157,7 @@ Class | Method | HTTP request | Description
156
157
  - [DearInventoryRuby::SaleOrder](docs/SaleOrder.md)
157
158
  - [DearInventoryRuby::SaleOrderLine](docs/SaleOrderLine.md)
158
159
  - [DearInventoryRuby::SalePayment](docs/SalePayment.md)
160
+ - [DearInventoryRuby::SalePaymentLine](docs/SalePaymentLine.md)
159
161
  - [DearInventoryRuby::SaleQuote](docs/SaleQuote.md)
160
162
  - [DearInventoryRuby::SaleQuoteLine](docs/SaleQuoteLine.md)
161
163
  - [DearInventoryRuby::ShippingAddress](docs/ShippingAddress.md)
data/docs/SaleInvoice.md CHANGED
@@ -5,7 +5,6 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **task_id** | **String** | Identifier of sale Invoice task |
8
- **combine_additional_charges** | **Boolean** | If `true` then `additional charges` lines displayed in `Lines` array | [default to false]
9
8
  **invoice_number** | **String** | Invoice Number (auto-generated) | [optional]
10
9
  **memo** | **String** | Additional information for Invoice. | [optional]
11
10
  **status** | **String** | Invoice status. Possible Values are values. For POST available values are DRAFT, AUTHORISED |
@@ -17,6 +16,11 @@ Name | Type | Description | Notes
17
16
  **linked_fulfillment_number** | **Integer** | Number of Fulfilment linked to this invoice | [optional]
18
17
  **lines** | [**Array<SaleInvoiceLine>**](SaleInvoiceLine.md) | | [optional]
19
18
  **additional_charges** | [**Array<SaleInvoiceAdditionalCharge>**](SaleInvoiceAdditionalCharge.md) | | [optional]
19
+ **payments** | [**Array<SalePaymentLine>**](SalePaymentLine.md) | | [optional]
20
+ **total_before_tax** | **Float** | Decimal with up to 4 decimal places. Sum of Invoice lines and additional charges without taxes. | [optional]
21
+ **tax** | **Float** | Decimal with up to 4 decimal places. Sum of Invoice lines and additional charges taxes. | [optional]
22
+ **total** | **Float** | Decimal with up to 4 decimal places. Sum of Invoice lines and additional charges with taxes. | [optional]
23
+ **paid** | **Float** | Decimal with up to 4 decimal places. Sum of payments. | [optional]
20
24
 
21
25
  ## Code Sample
22
26
 
@@ -24,7 +28,6 @@ Name | Type | Description | Notes
24
28
  require 'DearInventoryRuby'
25
29
 
26
30
  instance = DearInventoryRuby::SaleInvoice.new(task_id: nil,
27
- combine_additional_charges: nil,
28
31
  invoice_number: nil,
29
32
  memo: nil,
30
33
  status: nil,
@@ -35,7 +38,12 @@ instance = DearInventoryRuby::SaleInvoice.new(task_id: nil,
35
38
  billing_address_line2: nil,
36
39
  linked_fulfillment_number: nil,
37
40
  lines: nil,
38
- additional_charges: nil)
41
+ additional_charges: nil,
42
+ payments: nil,
43
+ total_before_tax: nil,
44
+ tax: nil,
45
+ total: nil,
46
+ paid: nil)
39
47
  ```
40
48
 
41
49
 
@@ -0,0 +1,41 @@
1
+ # DearInventoryRuby::SaleInvoicePartial
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **task_id** | **String** | Identifier of sale Invoice task |
8
+ **combine_additional_charges** | **Boolean** | If `true` then `additional charges` lines displayed in `Lines` array | [optional] [default to false]
9
+ **invoice_number** | **String** | Invoice Number (auto-generated) | [optional]
10
+ **memo** | **String** | Additional information for Invoice. | [optional]
11
+ **status** | **String** | Invoice status. Possible Values are values. For POST available values are DRAFT, AUTHORISED |
12
+ **invoice_date** | **String** | Invoice Date. |
13
+ **invoice_due_date** | **String** | Invoice Due Date. |
14
+ **currency_conversion_rate** | **Float** | Decimal with up to 4 decimal places | [optional]
15
+ **billing_address_line1** | **String** | Billing Address Line 1 | [optional]
16
+ **billing_address_line2** | **String** | Billing Address Line 2 | [optional]
17
+ **linked_fulfillment_number** | **Integer** | Number of Fulfilment linked to this invoice | [optional]
18
+ **lines** | [**Array<SaleInvoiceLine>**](SaleInvoiceLine.md) | | [optional]
19
+ **additional_charges** | [**Array<SaleInvoiceAdditionalCharge>**](SaleInvoiceAdditionalCharge.md) | | [optional]
20
+
21
+ ## Code Sample
22
+
23
+ ```ruby
24
+ require 'DearInventoryRuby'
25
+
26
+ instance = DearInventoryRuby::SaleInvoicePartial.new(task_id: nil,
27
+ combine_additional_charges: nil,
28
+ invoice_number: nil,
29
+ memo: nil,
30
+ status: nil,
31
+ invoice_date: nil,
32
+ invoice_due_date: nil,
33
+ currency_conversion_rate: nil,
34
+ billing_address_line1: nil,
35
+ billing_address_line2: nil,
36
+ linked_fulfillment_number: nil,
37
+ lines: nil,
38
+ additional_charges: nil)
39
+ ```
40
+
41
+
data/docs/SaleInvoices.md CHANGED
@@ -5,7 +5,7 @@
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **sale_id** | **String** | Unique DEAR Sale ID |
8
- **invoices** | [**Array<SaleInvoice>**](SaleInvoice.md) | Array of Invoices | [optional]
8
+ **invoices** | [**Array<SaleInvoicePartial>**](SaleInvoicePartial.md) | Array of Invoices | [optional]
9
9
 
10
10
  ## Code Sample
11
11
 
@@ -0,0 +1,29 @@
1
+ # DearInventoryRuby::SalePaymentLine
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **id** | **String** | Identifier of payment. | [optional]
8
+ **reference** | **String** | Payment reference number. | [optional]
9
+ **amount** | **Float** | Decimal with up to 2 decimal places. Payment amount in customer currency. | [optional]
10
+ **date_paid** | **Date** | Date when payment has been made. | [optional]
11
+ **account** | **String** | Account Code of the bank/payment account from Chart of accounts. | [optional]
12
+ **currency_rate** | **Float** | Decimal with up to 4 decimal places. Currency Conversion rate expressed as number of Base currency units for one Customer currency unit. | [optional]
13
+ **date_created** | **Date** | Date of creation payment record. | [optional]
14
+
15
+ ## Code Sample
16
+
17
+ ```ruby
18
+ require 'DearInventoryRuby'
19
+
20
+ instance = DearInventoryRuby::SalePaymentLine.new(id: nil,
21
+ reference: nil,
22
+ amount: nil,
23
+ date_paid: nil,
24
+ account: nil,
25
+ currency_rate: nil,
26
+ date_created: nil)
27
+ ```
28
+
29
+
@@ -17,9 +17,6 @@ module DearInventoryRuby
17
17
  # Identifier of sale Invoice task
18
18
  attr_accessor :task_id
19
19
 
20
- # If `true` then `additional charges` lines displayed in `Lines` array
21
- attr_accessor :combine_additional_charges
22
-
23
20
  # Invoice Number (auto-generated)
24
21
  attr_accessor :invoice_number
25
22
 
@@ -51,11 +48,24 @@ module DearInventoryRuby
51
48
 
52
49
  attr_accessor :additional_charges
53
50
 
51
+ attr_accessor :payments
52
+
53
+ # Decimal with up to 4 decimal places. Sum of Invoice lines and additional charges without taxes.
54
+ attr_accessor :total_before_tax
55
+
56
+ # Decimal with up to 4 decimal places. Sum of Invoice lines and additional charges taxes.
57
+ attr_accessor :tax
58
+
59
+ # Decimal with up to 4 decimal places. Sum of Invoice lines and additional charges with taxes.
60
+ attr_accessor :total
61
+
62
+ # Decimal with up to 4 decimal places. Sum of payments.
63
+ attr_accessor :paid
64
+
54
65
  # Attribute mapping from ruby-style variable name to JSON key.
55
66
  def self.attribute_map
56
67
  {
57
68
  :'task_id' => :'TaskID',
58
- :'combine_additional_charges' => :'CombineAdditionalCharges',
59
69
  :'invoice_number' => :'InvoiceNumber',
60
70
  :'memo' => :'Memo',
61
71
  :'status' => :'Status',
@@ -66,7 +76,12 @@ module DearInventoryRuby
66
76
  :'billing_address_line2' => :'BillingAddressLine2',
67
77
  :'linked_fulfillment_number' => :'LinkedFulfillmentNumber',
68
78
  :'lines' => :'Lines',
69
- :'additional_charges' => :'AdditionalCharges'
79
+ :'additional_charges' => :'AdditionalCharges',
80
+ :'payments' => :'Payments',
81
+ :'total_before_tax' => :'TotalBeforeTax',
82
+ :'tax' => :'Tax',
83
+ :'total' => :'Total',
84
+ :'paid' => :'Paid'
70
85
  }
71
86
  end
72
87
 
@@ -74,7 +89,6 @@ module DearInventoryRuby
74
89
  def self.openapi_types
75
90
  {
76
91
  :'task_id' => :'String',
77
- :'combine_additional_charges' => :'Boolean',
78
92
  :'invoice_number' => :'String',
79
93
  :'memo' => :'String',
80
94
  :'status' => :'String',
@@ -85,7 +99,12 @@ module DearInventoryRuby
85
99
  :'billing_address_line2' => :'String',
86
100
  :'linked_fulfillment_number' => :'Integer',
87
101
  :'lines' => :'Array<SaleInvoiceLine>',
88
- :'additional_charges' => :'Array<SaleInvoiceAdditionalCharge>'
102
+ :'additional_charges' => :'Array<SaleInvoiceAdditionalCharge>',
103
+ :'payments' => :'Array<SalePaymentLine>',
104
+ :'total_before_tax' => :'Float',
105
+ :'tax' => :'Float',
106
+ :'total' => :'Float',
107
+ :'paid' => :'Float'
89
108
  }
90
109
  end
91
110
 
@@ -114,12 +133,6 @@ module DearInventoryRuby
114
133
  self.task_id = attributes[:'task_id']
115
134
  end
116
135
 
117
- if attributes.key?(:'combine_additional_charges')
118
- self.combine_additional_charges = attributes[:'combine_additional_charges']
119
- else
120
- self.combine_additional_charges = false
121
- end
122
-
123
136
  if attributes.key?(:'invoice_number')
124
137
  self.invoice_number = attributes[:'invoice_number']
125
138
  end
@@ -167,6 +180,28 @@ module DearInventoryRuby
167
180
  self.additional_charges = value
168
181
  end
169
182
  end
183
+
184
+ if attributes.key?(:'payments')
185
+ if (value = attributes[:'payments']).is_a?(Array)
186
+ self.payments = value
187
+ end
188
+ end
189
+
190
+ if attributes.key?(:'total_before_tax')
191
+ self.total_before_tax = attributes[:'total_before_tax']
192
+ end
193
+
194
+ if attributes.key?(:'tax')
195
+ self.tax = attributes[:'tax']
196
+ end
197
+
198
+ if attributes.key?(:'total')
199
+ self.total = attributes[:'total']
200
+ end
201
+
202
+ if attributes.key?(:'paid')
203
+ self.paid = attributes[:'paid']
204
+ end
170
205
  end
171
206
 
172
207
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -177,10 +212,6 @@ module DearInventoryRuby
177
212
  invalid_properties.push('invalid value for "task_id", task_id cannot be nil.')
178
213
  end
179
214
 
180
- if @combine_additional_charges.nil?
181
- invalid_properties.push('invalid value for "combine_additional_charges", combine_additional_charges cannot be nil.')
182
- end
183
-
184
215
  if @status.nil?
185
216
  invalid_properties.push('invalid value for "status", status cannot be nil.')
186
217
  end
@@ -200,7 +231,6 @@ module DearInventoryRuby
200
231
  # @return true if the model is valid
201
232
  def valid?
202
233
  return false if @task_id.nil?
203
- return false if @combine_additional_charges.nil?
204
234
  return false if @status.nil?
205
235
  return false if @invoice_date.nil?
206
236
  return false if @invoice_due_date.nil?
@@ -213,7 +243,6 @@ module DearInventoryRuby
213
243
  return true if self.equal?(o)
214
244
  self.class == o.class &&
215
245
  task_id == o.task_id &&
216
- combine_additional_charges == o.combine_additional_charges &&
217
246
  invoice_number == o.invoice_number &&
218
247
  memo == o.memo &&
219
248
  status == o.status &&
@@ -224,7 +253,12 @@ module DearInventoryRuby
224
253
  billing_address_line2 == o.billing_address_line2 &&
225
254
  linked_fulfillment_number == o.linked_fulfillment_number &&
226
255
  lines == o.lines &&
227
- additional_charges == o.additional_charges
256
+ additional_charges == o.additional_charges &&
257
+ payments == o.payments &&
258
+ total_before_tax == o.total_before_tax &&
259
+ tax == o.tax &&
260
+ total == o.total &&
261
+ paid == o.paid
228
262
  end
229
263
 
230
264
  # @see the `==` method
@@ -236,7 +270,7 @@ module DearInventoryRuby
236
270
  # Calculates hash code according to all attributes.
237
271
  # @return [Integer] Hash code
238
272
  def hash
239
- [task_id, combine_additional_charges, invoice_number, memo, status, invoice_date, invoice_due_date, currency_conversion_rate, billing_address_line1, billing_address_line2, linked_fulfillment_number, lines, additional_charges].hash
273
+ [task_id, invoice_number, memo, status, invoice_date, invoice_due_date, currency_conversion_rate, billing_address_line1, billing_address_line2, linked_fulfillment_number, lines, additional_charges, payments, total_before_tax, tax, total, paid].hash
240
274
  end
241
275
 
242
276
  # Builds the object from hash
@@ -0,0 +1,351 @@
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 SaleInvoicePartial
17
+ # Identifier of sale Invoice task
18
+ attr_accessor :task_id
19
+
20
+ # If `true` then `additional charges` lines displayed in `Lines` array
21
+ attr_accessor :combine_additional_charges
22
+
23
+ # Invoice Number (auto-generated)
24
+ attr_accessor :invoice_number
25
+
26
+ # Additional information for Invoice.
27
+ attr_accessor :memo
28
+
29
+ # Invoice status. Possible Values are values. For POST available values are DRAFT, AUTHORISED
30
+ attr_accessor :status
31
+
32
+ # Invoice Date.
33
+ attr_accessor :invoice_date
34
+
35
+ # Invoice Due Date.
36
+ attr_accessor :invoice_due_date
37
+
38
+ # Decimal with up to 4 decimal places
39
+ attr_accessor :currency_conversion_rate
40
+
41
+ # Billing Address Line 1
42
+ attr_accessor :billing_address_line1
43
+
44
+ # Billing Address Line 2
45
+ attr_accessor :billing_address_line2
46
+
47
+ # Number of Fulfilment linked to this invoice
48
+ attr_accessor :linked_fulfillment_number
49
+
50
+ attr_accessor :lines
51
+
52
+ attr_accessor :additional_charges
53
+
54
+ # Attribute mapping from ruby-style variable name to JSON key.
55
+ def self.attribute_map
56
+ {
57
+ :'task_id' => :'TaskID',
58
+ :'combine_additional_charges' => :'CombineAdditionalCharges',
59
+ :'invoice_number' => :'InvoiceNumber',
60
+ :'memo' => :'Memo',
61
+ :'status' => :'Status',
62
+ :'invoice_date' => :'InvoiceDate',
63
+ :'invoice_due_date' => :'InvoiceDueDate',
64
+ :'currency_conversion_rate' => :'CurrencyConversionRate',
65
+ :'billing_address_line1' => :'BillingAddressLine1',
66
+ :'billing_address_line2' => :'BillingAddressLine2',
67
+ :'linked_fulfillment_number' => :'LinkedFulfillmentNumber',
68
+ :'lines' => :'Lines',
69
+ :'additional_charges' => :'AdditionalCharges'
70
+ }
71
+ end
72
+
73
+ # Attribute type mapping.
74
+ def self.openapi_types
75
+ {
76
+ :'task_id' => :'String',
77
+ :'combine_additional_charges' => :'Boolean',
78
+ :'invoice_number' => :'String',
79
+ :'memo' => :'String',
80
+ :'status' => :'String',
81
+ :'invoice_date' => :'String',
82
+ :'invoice_due_date' => :'String',
83
+ :'currency_conversion_rate' => :'Float',
84
+ :'billing_address_line1' => :'String',
85
+ :'billing_address_line2' => :'String',
86
+ :'linked_fulfillment_number' => :'Integer',
87
+ :'lines' => :'Array<SaleInvoiceLine>',
88
+ :'additional_charges' => :'Array<SaleInvoiceAdditionalCharge>'
89
+ }
90
+ end
91
+
92
+ # List of attributes with nullable: true
93
+ def self.openapi_nullable
94
+ Set.new([
95
+ ])
96
+ end
97
+
98
+ # Initializes the object
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ def initialize(attributes = {})
101
+ if (!attributes.is_a?(Hash))
102
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DearInventoryRuby::SaleInvoicePartial` initialize method"
103
+ end
104
+
105
+ # check to see if the attribute exists and convert string to symbol for hash key
106
+ attributes = attributes.each_with_object({}) { |(k, v), h|
107
+ if (!self.class.attribute_map.key?(k.to_sym))
108
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DearInventoryRuby::SaleInvoicePartial`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
109
+ end
110
+ h[k.to_sym] = v
111
+ }
112
+
113
+ if attributes.key?(:'task_id')
114
+ self.task_id = attributes[:'task_id']
115
+ end
116
+
117
+ if attributes.key?(:'combine_additional_charges')
118
+ self.combine_additional_charges = attributes[:'combine_additional_charges']
119
+ else
120
+ self.combine_additional_charges = false
121
+ end
122
+
123
+ if attributes.key?(:'invoice_number')
124
+ self.invoice_number = attributes[:'invoice_number']
125
+ end
126
+
127
+ if attributes.key?(:'memo')
128
+ self.memo = attributes[:'memo']
129
+ end
130
+
131
+ if attributes.key?(:'status')
132
+ self.status = attributes[:'status']
133
+ end
134
+
135
+ if attributes.key?(:'invoice_date')
136
+ self.invoice_date = attributes[:'invoice_date']
137
+ end
138
+
139
+ if attributes.key?(:'invoice_due_date')
140
+ self.invoice_due_date = attributes[:'invoice_due_date']
141
+ end
142
+
143
+ if attributes.key?(:'currency_conversion_rate')
144
+ self.currency_conversion_rate = attributes[:'currency_conversion_rate']
145
+ end
146
+
147
+ if attributes.key?(:'billing_address_line1')
148
+ self.billing_address_line1 = attributes[:'billing_address_line1']
149
+ end
150
+
151
+ if attributes.key?(:'billing_address_line2')
152
+ self.billing_address_line2 = attributes[:'billing_address_line2']
153
+ end
154
+
155
+ if attributes.key?(:'linked_fulfillment_number')
156
+ self.linked_fulfillment_number = attributes[:'linked_fulfillment_number']
157
+ end
158
+
159
+ if attributes.key?(:'lines')
160
+ if (value = attributes[:'lines']).is_a?(Array)
161
+ self.lines = value
162
+ end
163
+ end
164
+
165
+ if attributes.key?(:'additional_charges')
166
+ if (value = attributes[:'additional_charges']).is_a?(Array)
167
+ self.additional_charges = value
168
+ end
169
+ end
170
+ end
171
+
172
+ # Show invalid properties with the reasons. Usually used together with valid?
173
+ # @return Array for valid properties with the reasons
174
+ def list_invalid_properties
175
+ invalid_properties = Array.new
176
+ if @task_id.nil?
177
+ invalid_properties.push('invalid value for "task_id", task_id cannot be nil.')
178
+ end
179
+
180
+ if @status.nil?
181
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
182
+ end
183
+
184
+ if @invoice_date.nil?
185
+ invalid_properties.push('invalid value for "invoice_date", invoice_date cannot be nil.')
186
+ end
187
+
188
+ if @invoice_due_date.nil?
189
+ invalid_properties.push('invalid value for "invoice_due_date", invoice_due_date cannot be nil.')
190
+ end
191
+
192
+ invalid_properties
193
+ end
194
+
195
+ # Check to see if the all the properties in the model are valid
196
+ # @return true if the model is valid
197
+ def valid?
198
+ return false if @task_id.nil?
199
+ return false if @status.nil?
200
+ return false if @invoice_date.nil?
201
+ return false if @invoice_due_date.nil?
202
+ true
203
+ end
204
+
205
+ # Checks equality by comparing each attribute.
206
+ # @param [Object] Object to be compared
207
+ def ==(o)
208
+ return true if self.equal?(o)
209
+ self.class == o.class &&
210
+ task_id == o.task_id &&
211
+ combine_additional_charges == o.combine_additional_charges &&
212
+ invoice_number == o.invoice_number &&
213
+ memo == o.memo &&
214
+ status == o.status &&
215
+ invoice_date == o.invoice_date &&
216
+ invoice_due_date == o.invoice_due_date &&
217
+ currency_conversion_rate == o.currency_conversion_rate &&
218
+ billing_address_line1 == o.billing_address_line1 &&
219
+ billing_address_line2 == o.billing_address_line2 &&
220
+ linked_fulfillment_number == o.linked_fulfillment_number &&
221
+ lines == o.lines &&
222
+ additional_charges == o.additional_charges
223
+ end
224
+
225
+ # @see the `==` method
226
+ # @param [Object] Object to be compared
227
+ def eql?(o)
228
+ self == o
229
+ end
230
+
231
+ # Calculates hash code according to all attributes.
232
+ # @return [Integer] Hash code
233
+ def hash
234
+ [task_id, combine_additional_charges, invoice_number, memo, status, invoice_date, invoice_due_date, currency_conversion_rate, billing_address_line1, billing_address_line2, linked_fulfillment_number, lines, additional_charges].hash
235
+ end
236
+
237
+ # Builds the object from hash
238
+ # @param [Hash] attributes Model attributes in the form of hash
239
+ # @return [Object] Returns the model itself
240
+ def self.build_from_hash(attributes)
241
+ new.build_from_hash(attributes)
242
+ end
243
+
244
+ # Builds the object from hash
245
+ # @param [Hash] attributes Model attributes in the form of hash
246
+ # @return [Object] Returns the model itself
247
+ def build_from_hash(attributes)
248
+ return nil unless attributes.is_a?(Hash)
249
+ self.class.openapi_types.each_pair do |key, type|
250
+ if type =~ /\AArray<(.*)>/i
251
+ # check to ensure the input is an array given that the attribute
252
+ # is documented as an array but the input is not
253
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
254
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
255
+ end
256
+ elsif !attributes[self.class.attribute_map[key]].nil?
257
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
258
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
259
+ end
260
+
261
+ self
262
+ end
263
+
264
+ # Deserializes the data based on type
265
+ # @param string type Data type
266
+ # @param string value Value to be deserialized
267
+ # @return [Object] Deserialized data
268
+ def _deserialize(type, value)
269
+ case type.to_sym
270
+ when :DateTime
271
+ DateTime.parse(value)
272
+ when :Date
273
+ Date.parse(value)
274
+ when :String
275
+ value.to_s
276
+ when :Integer
277
+ value.to_i
278
+ when :Float
279
+ value.to_f
280
+ when :Boolean
281
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
282
+ true
283
+ else
284
+ false
285
+ end
286
+ when :Object
287
+ # generic object (usually a Hash), return directly
288
+ value
289
+ when /\AArray<(?<inner_type>.+)>\z/
290
+ inner_type = Regexp.last_match[:inner_type]
291
+ value.map { |v| _deserialize(inner_type, v) }
292
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
293
+ k_type = Regexp.last_match[:k_type]
294
+ v_type = Regexp.last_match[:v_type]
295
+ {}.tap do |hash|
296
+ value.each do |k, v|
297
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
298
+ end
299
+ end
300
+ else # model
301
+ DearInventoryRuby.const_get(type).build_from_hash(value)
302
+ end
303
+ end
304
+
305
+ # Returns the string representation of the object
306
+ # @return [String] String presentation of the object
307
+ def to_s
308
+ to_hash.to_s
309
+ end
310
+
311
+ # to_body is an alias to to_hash (backward compatibility)
312
+ # @return [Hash] Returns the object in the form of hash
313
+ def to_body
314
+ to_hash
315
+ end
316
+
317
+ # Returns the object in the form of hash
318
+ # @return [Hash] Returns the object in the form of hash
319
+ def to_hash
320
+ hash = {}
321
+ self.class.attribute_map.each_pair do |attr, param|
322
+ value = self.send(attr)
323
+ if value.nil?
324
+ is_nullable = self.class.openapi_nullable.include?(attr)
325
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
326
+ end
327
+
328
+ hash[param] = _to_hash(value)
329
+ end
330
+ hash
331
+ end
332
+
333
+ # Outputs non-array value in the form of hash
334
+ # For object, use to_hash. Otherwise, just return the value
335
+ # @param [Object] value Any valid value
336
+ # @return [Hash] Returns the value in the form of hash
337
+ def _to_hash(value)
338
+ if value.is_a?(Array)
339
+ value.compact.map { |v| _to_hash(v) }
340
+ elsif value.is_a?(Hash)
341
+ {}.tap do |hash|
342
+ value.each { |k, v| hash[k] = _to_hash(v) }
343
+ end
344
+ elsif value.respond_to? :to_hash
345
+ value.to_hash
346
+ else
347
+ value
348
+ end
349
+ end
350
+ end
351
+ end
@@ -32,7 +32,7 @@ module DearInventoryRuby
32
32
  def self.openapi_types
33
33
  {
34
34
  :'sale_id' => :'String',
35
- :'invoices' => :'Array<SaleInvoice>'
35
+ :'invoices' => :'Array<SaleInvoicePartial>'
36
36
  }
37
37
  end
38
38
 
@@ -0,0 +1,267 @@
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 SalePaymentLine
17
+ # Identifier of payment.
18
+ attr_accessor :id
19
+
20
+ # Payment reference number.
21
+ attr_accessor :reference
22
+
23
+ # Decimal with up to 2 decimal places. Payment amount in customer currency.
24
+ attr_accessor :amount
25
+
26
+ # Date when payment has been made.
27
+ attr_accessor :date_paid
28
+
29
+ # Account Code of the bank/payment account from Chart of accounts.
30
+ attr_accessor :account
31
+
32
+ # Decimal with up to 4 decimal places. Currency Conversion rate expressed as number of Base currency units for one Customer currency unit.
33
+ attr_accessor :currency_rate
34
+
35
+ # Date of creation payment record.
36
+ attr_accessor :date_created
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'id' => :'ID',
42
+ :'reference' => :'Reference',
43
+ :'amount' => :'Amount',
44
+ :'date_paid' => :'DatePaid',
45
+ :'account' => :'Account',
46
+ :'currency_rate' => :'CurrencyRate',
47
+ :'date_created' => :'DateCreated'
48
+ }
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'id' => :'String',
55
+ :'reference' => :'String',
56
+ :'amount' => :'Float',
57
+ :'date_paid' => :'Date',
58
+ :'account' => :'String',
59
+ :'currency_rate' => :'Float',
60
+ :'date_created' => :'Date'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DearInventoryRuby::SalePaymentLine` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ attributes = attributes.each_with_object({}) { |(k, v), h|
79
+ if (!self.class.attribute_map.key?(k.to_sym))
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DearInventoryRuby::SalePaymentLine`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
81
+ end
82
+ h[k.to_sym] = v
83
+ }
84
+
85
+ if attributes.key?(:'id')
86
+ self.id = attributes[:'id']
87
+ end
88
+
89
+ if attributes.key?(:'reference')
90
+ self.reference = attributes[:'reference']
91
+ end
92
+
93
+ if attributes.key?(:'amount')
94
+ self.amount = attributes[:'amount']
95
+ end
96
+
97
+ if attributes.key?(:'date_paid')
98
+ self.date_paid = attributes[:'date_paid']
99
+ end
100
+
101
+ if attributes.key?(:'account')
102
+ self.account = attributes[:'account']
103
+ end
104
+
105
+ if attributes.key?(:'currency_rate')
106
+ self.currency_rate = attributes[:'currency_rate']
107
+ end
108
+
109
+ if attributes.key?(:'date_created')
110
+ self.date_created = attributes[:'date_created']
111
+ end
112
+ end
113
+
114
+ # Show invalid properties with the reasons. Usually used together with valid?
115
+ # @return Array for valid properties with the reasons
116
+ def list_invalid_properties
117
+ invalid_properties = Array.new
118
+ invalid_properties
119
+ end
120
+
121
+ # Check to see if the all the properties in the model are valid
122
+ # @return true if the model is valid
123
+ def valid?
124
+ true
125
+ end
126
+
127
+ # Checks equality by comparing each attribute.
128
+ # @param [Object] Object to be compared
129
+ def ==(o)
130
+ return true if self.equal?(o)
131
+ self.class == o.class &&
132
+ id == o.id &&
133
+ reference == o.reference &&
134
+ amount == o.amount &&
135
+ date_paid == o.date_paid &&
136
+ account == o.account &&
137
+ currency_rate == o.currency_rate &&
138
+ date_created == o.date_created
139
+ end
140
+
141
+ # @see the `==` method
142
+ # @param [Object] Object to be compared
143
+ def eql?(o)
144
+ self == o
145
+ end
146
+
147
+ # Calculates hash code according to all attributes.
148
+ # @return [Integer] Hash code
149
+ def hash
150
+ [id, reference, amount, date_paid, account, currency_rate, date_created].hash
151
+ end
152
+
153
+ # Builds the object from hash
154
+ # @param [Hash] attributes Model attributes in the form of hash
155
+ # @return [Object] Returns the model itself
156
+ def self.build_from_hash(attributes)
157
+ new.build_from_hash(attributes)
158
+ end
159
+
160
+ # Builds the object from hash
161
+ # @param [Hash] attributes Model attributes in the form of hash
162
+ # @return [Object] Returns the model itself
163
+ def build_from_hash(attributes)
164
+ return nil unless attributes.is_a?(Hash)
165
+ self.class.openapi_types.each_pair do |key, type|
166
+ if type =~ /\AArray<(.*)>/i
167
+ # check to ensure the input is an array given that the attribute
168
+ # is documented as an array but the input is not
169
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
170
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
171
+ end
172
+ elsif !attributes[self.class.attribute_map[key]].nil?
173
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
174
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
175
+ end
176
+
177
+ self
178
+ end
179
+
180
+ # Deserializes the data based on type
181
+ # @param string type Data type
182
+ # @param string value Value to be deserialized
183
+ # @return [Object] Deserialized data
184
+ def _deserialize(type, value)
185
+ case type.to_sym
186
+ when :DateTime
187
+ DateTime.parse(value)
188
+ when :Date
189
+ Date.parse(value)
190
+ when :String
191
+ value.to_s
192
+ when :Integer
193
+ value.to_i
194
+ when :Float
195
+ value.to_f
196
+ when :Boolean
197
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
198
+ true
199
+ else
200
+ false
201
+ end
202
+ when :Object
203
+ # generic object (usually a Hash), return directly
204
+ value
205
+ when /\AArray<(?<inner_type>.+)>\z/
206
+ inner_type = Regexp.last_match[:inner_type]
207
+ value.map { |v| _deserialize(inner_type, v) }
208
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
209
+ k_type = Regexp.last_match[:k_type]
210
+ v_type = Regexp.last_match[:v_type]
211
+ {}.tap do |hash|
212
+ value.each do |k, v|
213
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
214
+ end
215
+ end
216
+ else # model
217
+ DearInventoryRuby.const_get(type).build_from_hash(value)
218
+ end
219
+ end
220
+
221
+ # Returns the string representation of the object
222
+ # @return [String] String presentation of the object
223
+ def to_s
224
+ to_hash.to_s
225
+ end
226
+
227
+ # to_body is an alias to to_hash (backward compatibility)
228
+ # @return [Hash] Returns the object in the form of hash
229
+ def to_body
230
+ to_hash
231
+ end
232
+
233
+ # Returns the object in the form of hash
234
+ # @return [Hash] Returns the object in the form of hash
235
+ def to_hash
236
+ hash = {}
237
+ self.class.attribute_map.each_pair do |attr, param|
238
+ value = self.send(attr)
239
+ if value.nil?
240
+ is_nullable = self.class.openapi_nullable.include?(attr)
241
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
242
+ end
243
+
244
+ hash[param] = _to_hash(value)
245
+ end
246
+ hash
247
+ end
248
+
249
+ # Outputs non-array value in the form of hash
250
+ # For object, use to_hash. Otherwise, just return the value
251
+ # @param [Object] value Any valid value
252
+ # @return [Hash] Returns the value in the form of hash
253
+ def _to_hash(value)
254
+ if value.is_a?(Array)
255
+ value.compact.map { |v| _to_hash(v) }
256
+ elsif value.is_a?(Hash)
257
+ {}.tap do |hash|
258
+ value.each { |k, v| hash[k] = _to_hash(v) }
259
+ end
260
+ elsif value.respond_to? :to_hash
261
+ value.to_hash
262
+ else
263
+ value
264
+ end
265
+ end
266
+ end
267
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module DearInventoryRuby
14
- VERSION = '0.2.5'
14
+ VERSION = '0.2.6'
15
15
  end
@@ -37,6 +37,7 @@ require 'dear-inventory-ruby/models/sale_invoice'
37
37
  require 'dear-inventory-ruby/models/sale_invoice_additional_charge'
38
38
  require 'dear-inventory-ruby/models/sale_invoice_delete'
39
39
  require 'dear-inventory-ruby/models/sale_invoice_line'
40
+ require 'dear-inventory-ruby/models/sale_invoice_partial'
40
41
  require 'dear-inventory-ruby/models/sale_invoice_post'
41
42
  require 'dear-inventory-ruby/models/sale_invoices'
42
43
  require 'dear-inventory-ruby/models/sale_item'
@@ -44,6 +45,7 @@ require 'dear-inventory-ruby/models/sale_list'
44
45
  require 'dear-inventory-ruby/models/sale_order'
45
46
  require 'dear-inventory-ruby/models/sale_order_line'
46
47
  require 'dear-inventory-ruby/models/sale_payment'
48
+ require 'dear-inventory-ruby/models/sale_payment_line'
47
49
  require 'dear-inventory-ruby/models/sale_quote'
48
50
  require 'dear-inventory-ruby/models/sale_quote_line'
49
51
  require 'dear-inventory-ruby/models/shipping_address'
data/spec/.DS_Store CHANGED
Binary file
@@ -0,0 +1,113 @@
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::SaleInvoicePartial
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'SaleInvoicePartial' do
21
+ before do
22
+ # run before each test
23
+ @instance = DearInventoryRuby::SaleInvoicePartial.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of SaleInvoicePartial' do
31
+ it 'should create an instance of SaleInvoicePartial' do
32
+ expect(@instance).to be_instance_of(DearInventoryRuby::SaleInvoicePartial)
33
+ end
34
+ end
35
+ describe 'test attribute "task_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 "combine_additional_charges"' 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 "invoice_number"' 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 "memo"' 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 "status"' 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 "invoice_date"' 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 "invoice_due_date"' 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 "currency_conversion_rate"' 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 "billing_address_line1"' 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 "billing_address_line2"' 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 "linked_fulfillment_number"' 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 "lines"' 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 "additional_charges"' 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
+ end
@@ -38,12 +38,6 @@ describe 'SaleInvoice' do
38
38
  end
39
39
  end
40
40
 
41
- describe 'test attribute "combine_additional_charges"' 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
41
  describe 'test attribute "invoice_number"' do
48
42
  it 'should work' do
49
43
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -110,4 +104,34 @@ describe 'SaleInvoice' do
110
104
  end
111
105
  end
112
106
 
107
+ describe 'test attribute "payments"' 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 "total_before_tax"' 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 "tax"' 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 "total"' 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 "paid"' 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
+
113
137
  end
@@ -0,0 +1,77 @@
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::SalePaymentLine
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'SalePaymentLine' do
21
+ before do
22
+ # run before each test
23
+ @instance = DearInventoryRuby::SalePaymentLine.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of SalePaymentLine' do
31
+ it 'should create an instance of SalePaymentLine' do
32
+ expect(@instance).to be_instance_of(DearInventoryRuby::SalePaymentLine)
33
+ end
34
+ end
35
+ describe 'test attribute "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 "reference"' 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 "amount"' 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 "date_paid"' 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 "account"' 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 "currency_rate"' 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 "date_created"' 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
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dear-inventory-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nhan Nguyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-26 00:00:00.000000000 Z
11
+ date: 2022-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -105,6 +105,7 @@ files:
105
105
  - docs/SaleInvoiceAdditionalCharge.md
106
106
  - docs/SaleInvoiceDelete.md
107
107
  - docs/SaleInvoiceLine.md
108
+ - docs/SaleInvoicePartial.md
108
109
  - docs/SaleInvoicePost.md
109
110
  - docs/SaleInvoices.md
110
111
  - docs/SaleItem.md
@@ -112,6 +113,7 @@ files:
112
113
  - docs/SaleOrder.md
113
114
  - docs/SaleOrderLine.md
114
115
  - docs/SalePayment.md
116
+ - docs/SalePaymentLine.md
115
117
  - docs/SaleQuote.md
116
118
  - docs/SaleQuoteLine.md
117
119
  - docs/ShippingAddress.md
@@ -149,6 +151,7 @@ files:
149
151
  - lib/dear-inventory-ruby/models/sale_invoice_additional_charge.rb
150
152
  - lib/dear-inventory-ruby/models/sale_invoice_delete.rb
151
153
  - lib/dear-inventory-ruby/models/sale_invoice_line.rb
154
+ - lib/dear-inventory-ruby/models/sale_invoice_partial.rb
152
155
  - lib/dear-inventory-ruby/models/sale_invoice_post.rb
153
156
  - lib/dear-inventory-ruby/models/sale_invoices.rb
154
157
  - lib/dear-inventory-ruby/models/sale_item.rb
@@ -156,6 +159,7 @@ files:
156
159
  - lib/dear-inventory-ruby/models/sale_order.rb
157
160
  - lib/dear-inventory-ruby/models/sale_order_line.rb
158
161
  - lib/dear-inventory-ruby/models/sale_payment.rb
162
+ - lib/dear-inventory-ruby/models/sale_payment_line.rb
159
163
  - lib/dear-inventory-ruby/models/sale_quote.rb
160
164
  - lib/dear-inventory-ruby/models/sale_quote_line.rb
161
165
  - lib/dear-inventory-ruby/models/shipping_address.rb
@@ -190,6 +194,7 @@ files:
190
194
  - spec/models/sale_invoice_additional_charge_spec.rb
191
195
  - spec/models/sale_invoice_delete_spec.rb
192
196
  - spec/models/sale_invoice_line_spec.rb
197
+ - spec/models/sale_invoice_partial_spec.rb
193
198
  - spec/models/sale_invoice_post_spec.rb
194
199
  - spec/models/sale_invoice_spec.rb
195
200
  - spec/models/sale_invoices_spec.rb
@@ -197,6 +202,7 @@ files:
197
202
  - spec/models/sale_list_spec.rb
198
203
  - spec/models/sale_order_line_spec.rb
199
204
  - spec/models/sale_order_spec.rb
205
+ - spec/models/sale_payment_line_spec.rb
200
206
  - spec/models/sale_payment_spec.rb
201
207
  - spec/models/sale_quote_line_spec.rb
202
208
  - spec/models/sale_quote_spec.rb
@@ -256,6 +262,7 @@ test_files:
256
262
  - spec/models/payment_term_spec.rb
257
263
  - spec/models/payment_terms_spec.rb
258
264
  - spec/models/sale_invoice_spec.rb
265
+ - spec/models/sale_invoice_partial_spec.rb
259
266
  - spec/models/sale_order_line_spec.rb
260
267
  - spec/models/customers_spec.rb
261
268
  - spec/models/customer_spec.rb
@@ -277,6 +284,7 @@ test_files:
277
284
  - spec/models/sale_quote_line_spec.rb
278
285
  - spec/models/webhooks_spec.rb
279
286
  - spec/models/success_spec.rb
287
+ - spec/models/sale_payment_line_spec.rb
280
288
  - spec/models/price_tier_spec.rb
281
289
  - spec/models/address_spec.rb
282
290
  - spec/models/price_tiers_spec.rb