noths 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +10 -23
- data/bin/generate_gem +3 -1
- data/bin/refresh_schemas +22 -16
- data/docs/AcceptanceBulkModel.md +2 -2
- data/docs/DispatchBulkModel.md +1 -1
- data/docs/Financials.md +1 -1
- data/docs/Order.md +12 -11
- data/docs/OrdersApi.md +104 -151
- data/docs/RefundsApi.md +8 -12
- data/git_push.sh +55 -0
- data/lib/noths.rb +1 -11
- data/lib/noths/api/orders_api.rb +234 -114
- data/lib/noths/api/refunds_api.rb +25 -15
- data/lib/noths/api_client.rb +3 -12
- data/lib/noths/api_error.rb +16 -11
- data/lib/noths/configuration.rb +3 -20
- data/lib/noths/models/acceptance_bulk_model.rb +3 -14
- data/lib/noths/models/currency.rb +1 -12
- data/lib/noths/models/decline_bulk_model.rb +1 -12
- data/lib/noths/models/delivery_address.rb +1 -12
- data/lib/noths/models/delivery_service.rb +1 -12
- data/lib/noths/models/delivery_zone.rb +1 -12
- data/lib/noths/models/dispatch_bulk_model.rb +2 -13
- data/lib/noths/models/dispatch_notes_bulk_model.rb +1 -12
- data/lib/noths/models/enquiry.rb +1 -12
- data/lib/noths/models/enquiry_message.rb +1 -12
- data/lib/noths/models/error.rb +1 -12
- data/lib/noths/models/financials.rb +5 -14
- data/lib/noths/models/financials_details.rb +1 -12
- data/lib/noths/models/image_url.rb +1 -12
- data/lib/noths/models/item.rb +1 -12
- data/lib/noths/models/item_financials.rb +1 -12
- data/lib/noths/models/link.rb +1 -12
- data/lib/noths/models/manual_payment.rb +1 -12
- data/lib/noths/models/money.rb +1 -12
- data/lib/noths/models/order.rb +28 -28
- data/lib/noths/models/order_detail.rb +1 -12
- data/lib/noths/models/order_details_bulk_model.rb +1 -12
- data/lib/noths/models/order_index.rb +1 -12
- data/lib/noths/models/order_refund.rb +1 -12
- data/lib/noths/models/product.rb +1 -12
- data/lib/noths/models/product_option.rb +1 -12
- data/lib/noths/models/refund_response.rb +1 -12
- data/lib/noths/models/search_result_meta.rb +1 -12
- data/lib/noths/models/user.rb +1 -12
- data/lib/noths/version.rb +2 -12
- data/noths.gemspec +1 -11
- data/schemas/api-docs.json +3 -7
- data/schemas/orders.json +163 -88
- data/schemas/refunds.json +10 -5
- data/spec/api/orders_api_spec.rb +53 -99
- data/spec/api/refunds_api_spec.rb +6 -28
- data/spec/api_client_spec.rb +2 -14
- data/spec/configuration_spec.rb +9 -25
- data/spec/models/acceptance_bulk_model_spec.rb +7 -38
- data/spec/models/currency_spec.rb +7 -38
- data/spec/models/decline_bulk_model_spec.rb +5 -32
- data/spec/models/delivery_address_spec.rb +9 -44
- data/spec/models/delivery_service_spec.rb +5 -32
- data/spec/models/delivery_zone_spec.rb +5 -32
- data/spec/models/dispatch_bulk_model_spec.rb +8 -41
- data/spec/models/dispatch_notes_bulk_model_spec.rb +4 -29
- data/spec/models/enquiry_message_spec.rb +4 -29
- data/spec/models/enquiry_spec.rb +6 -35
- data/spec/models/error_spec.rb +5 -32
- data/spec/models/financials_details_spec.rb +6 -35
- data/spec/models/financials_spec.rb +21 -80
- data/spec/models/image_url_spec.rb +9 -44
- data/spec/models/item_financials_spec.rb +9 -44
- data/spec/models/item_spec.rb +11 -50
- data/spec/models/link_spec.rb +6 -35
- data/spec/models/manual_payment_spec.rb +7 -38
- data/spec/models/money_spec.rb +5 -32
- data/spec/models/order_detail_spec.rb +5 -32
- data/spec/models/order_details_bulk_model_spec.rb +4 -29
- data/spec/models/order_index_spec.rb +6 -35
- data/spec/models/order_refund_spec.rb +4 -29
- data/spec/models/order_spec.rb +53 -164
- data/spec/models/product_option_spec.rb +5 -32
- data/spec/models/product_spec.rb +8 -41
- data/spec/models/refund_response_spec.rb +6 -35
- data/spec/models/search_result_meta_spec.rb +5 -32
- data/spec/models/user_spec.rb +6 -35
- data/spec/spec_helper.rb +1 -11
- data/swagger_config.json +1 -1
- data/templates/Gemfile.mustache +7 -0
- data/templates/README.mustache +127 -0
- data/templates/Rakefile.mustache +8 -0
- data/templates/api.mustache +194 -0
- data/templates/api_client.mustache +383 -0
- data/templates/api_client_spec.mustache +214 -0
- data/templates/api_doc.mustache +79 -0
- data/templates/api_error.mustache +43 -0
- data/templates/api_info.mustache +12 -0
- data/templates/api_test.mustache +29 -0
- data/templates/base_object.mustache +102 -0
- data/templates/base_object_spec.mustache +107 -0
- data/templates/configuration.mustache +221 -0
- data/templates/configuration_spec.mustache +26 -0
- data/templates/gem.mustache +38 -0
- data/templates/gemspec.mustache +41 -0
- data/templates/git_push.sh.mustache +55 -0
- data/templates/gitignore.mustache +35 -0
- data/templates/model.mustache +7 -0
- data/templates/model_doc.mustache +9 -0
- data/templates/model_test.mustache +19 -0
- data/templates/partial_model_enum_class.mustache +13 -0
- data/templates/partial_model_generic.mustache +275 -0
- data/templates/rspec.mustache +2 -0
- data/templates/spec_helper.mustache +101 -0
- data/templates/version.mustache +5 -0
- metadata +30 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2494e3398ec4ec1bafde2131a86b9f6d304b8dc870017f2781cd61040d01f27f
|
|
4
|
+
data.tar.gz: 5a1753685a248dac129f4c1863aa8b84ef0f25ab12495db8601892612d570e10
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1069a29d1be38e96c69dbb6db09e5601892538ede59a14d9637b0ad747c6d26dd39469c844f319973eb3afe6caa8ddcfcd202b9cd6ff6a18edaa7f22d8aeca65
|
|
7
|
+
data.tar.gz: cad59063a6a33b976bfa2e386d82f99a1835a26ad0c9b9b75bb43f9e06e0418331da89abe54d5fd459e3f8ae4d05eec5ba8f22a52d3a1e9e76e5929156a271a9
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
# noths
|
|
2
2
|
|
|
3
|
-
Noths - the Ruby gem for the
|
|
4
|
-
|
|
5
|
-
www.notonthehighstreet.com API client
|
|
3
|
+
Noths - the Ruby gem for the www.notonthehighstreet.com API
|
|
6
4
|
|
|
7
5
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
|
8
6
|
|
|
9
7
|
- API version: 1.0
|
|
10
|
-
- Package version: 0.
|
|
8
|
+
- Package version: 0.2.0
|
|
11
9
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
|
12
10
|
|
|
13
11
|
## Installation
|
|
@@ -23,15 +21,15 @@ gem build noths.gemspec
|
|
|
23
21
|
Then either install the gem locally:
|
|
24
22
|
|
|
25
23
|
```shell
|
|
26
|
-
gem install ./noths-0.
|
|
24
|
+
gem install ./noths-0.2.0.gem
|
|
27
25
|
```
|
|
28
|
-
(for development, run `gem install --dev ./noths-0.
|
|
26
|
+
(for development, run `gem install --dev ./noths-0.2.0.gem` to install the development dependencies)
|
|
29
27
|
|
|
30
28
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
31
29
|
|
|
32
30
|
Finally add this to the Gemfile:
|
|
33
31
|
|
|
34
|
-
gem 'noths', '~> 0.
|
|
32
|
+
gem 'noths', '~> 0.2.0'
|
|
35
33
|
|
|
36
34
|
### Install from Git
|
|
37
35
|
|
|
@@ -54,16 +52,10 @@ Please follow the [installation](#installation) procedure and then run the follo
|
|
|
54
52
|
# Load the gem
|
|
55
53
|
require 'noths'
|
|
56
54
|
|
|
57
|
-
# Setup authorization
|
|
58
|
-
Noths.configure do |config|
|
|
59
|
-
# Configure API key authorization: token
|
|
60
|
-
config.api_key['token'] = 'YOUR API KEY'
|
|
61
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
62
|
-
#config.api_key_prefix['token'] = 'Bearer'
|
|
63
|
-
end
|
|
64
|
-
|
|
65
55
|
api_instance = Noths::OrdersApi.new
|
|
66
56
|
|
|
57
|
+
token = "token_example" # String | Authentication credential
|
|
58
|
+
|
|
67
59
|
id = 56 # Integer | Order id
|
|
68
60
|
|
|
69
61
|
estimated_delivery_date = Date.parse("2013-10-20") # Date | 'yyyy-mm-dd'
|
|
@@ -76,7 +68,7 @@ opts = {
|
|
|
76
68
|
|
|
77
69
|
begin
|
|
78
70
|
#Accept an order
|
|
79
|
-
api_instance.orders_acceptance(id, estimated_delivery_date, estimated_dispatch_at, opts)
|
|
71
|
+
api_instance.orders_acceptance(token, id, estimated_delivery_date, estimated_dispatch_at, opts)
|
|
80
72
|
rescue Noths::ApiError => e
|
|
81
73
|
puts "Exception when calling OrdersApi->orders_acceptance: #{e}"
|
|
82
74
|
end
|
|
@@ -85,7 +77,7 @@ end
|
|
|
85
77
|
|
|
86
78
|
## Documentation for API Endpoints
|
|
87
79
|
|
|
88
|
-
All URIs are relative to
|
|
80
|
+
All URIs are relative to https://api.notonthehighstreet.com
|
|
89
81
|
|
|
90
82
|
Class | Method | HTTP request | Description
|
|
91
83
|
------------ | ------------- | ------------- | -------------
|
|
@@ -140,10 +132,5 @@ Class | Method | HTTP request | Description
|
|
|
140
132
|
|
|
141
133
|
## Documentation for Authorization
|
|
142
134
|
|
|
143
|
-
|
|
144
|
-
### token
|
|
145
|
-
|
|
146
|
-
- **Type**: API key
|
|
147
|
-
- **API key parameter name**: token
|
|
148
|
-
- **Location**: URL query string
|
|
135
|
+
All endpoints do not require authorization.
|
|
149
136
|
|
data/bin/generate_gem
CHANGED
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
gem_dir = File.expand_path('../', __dir__)
|
|
4
4
|
config_path = File.expand_path('../swagger_config.json', __dir__)
|
|
5
5
|
api_schema_path = File.expand_path('../schemas/api-docs.json', __dir__)
|
|
6
|
+
templates_dir = File.expand_path('../templates', __dir__)
|
|
6
7
|
|
|
7
8
|
default_generator_options = {
|
|
8
9
|
'-l' => 'ruby',
|
|
9
10
|
'-i' => api_schema_path,
|
|
10
11
|
'-o' => gem_dir,
|
|
11
|
-
'-c' => config_path
|
|
12
|
+
'-c' => config_path,
|
|
13
|
+
'-t' => templates_dir
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
generator_options = default_generator_options.merge(Hash[*ARGV])
|
data/bin/refresh_schemas
CHANGED
|
@@ -24,13 +24,7 @@ def apply_ammendments(api_schema)
|
|
|
24
24
|
api_schema.fetch(:apis).each do |endpoint|
|
|
25
25
|
endpoint.fetch(:operations).each do |method|
|
|
26
26
|
method[:nickname] = method[:nickname].sub('Api::V1::', '') unless method[:nickname].nil?
|
|
27
|
-
|
|
28
|
-
token_parameter = method[:parameters].detect { |p| p[:name] == 'token' }
|
|
29
|
-
|
|
30
|
-
if token_parameter
|
|
31
|
-
method[:authorizations] ||= { token: [] }
|
|
32
|
-
method[:parameters].delete(token_parameter)
|
|
33
|
-
end
|
|
27
|
+
method[:consumes] = ['application/x-www-form-urlencoded'] if ['post', 'patch', 'put', 'delete'].include? method[:method].downcase
|
|
34
28
|
|
|
35
29
|
method[:parameters].each do |p|
|
|
36
30
|
p[:required] = true if p[:required] == 'required'
|
|
@@ -45,13 +39,31 @@ def apply_ammendments(api_schema)
|
|
|
45
39
|
end
|
|
46
40
|
|
|
47
41
|
p[:name] = :payload if p[:paramType] == 'body' && p[:name] == ''
|
|
42
|
+
p[:'allowMultiple'] = true if p[:name] == 'state' # actually API allows multiple states in query
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
method[:responseMessages].each do |response_message|
|
|
46
|
+
next unless response_message[:message].match?(/pdf/i)
|
|
47
|
+
|
|
48
|
+
response_message[:responseModel] ||= 'File'
|
|
49
|
+
method[:produces] ||= ['application/pdf', 'application/json']
|
|
48
50
|
end
|
|
49
51
|
end
|
|
50
52
|
end
|
|
51
53
|
|
|
54
|
+
|
|
52
55
|
api_schema.fetch(:models).values.each do |model|
|
|
53
|
-
model.fetch(:
|
|
54
|
-
|
|
56
|
+
if model.fetch(:id) == 'Order'
|
|
57
|
+
model.fetch(:properties)['updated_at'] ||= {:type=>"date-time", :description=>nil}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
model.fetch(:properties).each do |name, property|
|
|
61
|
+
case property[:type]
|
|
62
|
+
when 'complex'
|
|
63
|
+
property[:type] = [:items, :purchase_items].include?(name) ? 'array' : property[:items][:'$ref']
|
|
64
|
+
when 'date'
|
|
65
|
+
property[:type] = 'date-time'
|
|
66
|
+
end
|
|
55
67
|
end
|
|
56
68
|
end
|
|
57
69
|
end
|
|
@@ -81,13 +93,7 @@ main_schema[:info] ||= {
|
|
|
81
93
|
description: 'www.notonthehighstreet.com API client'
|
|
82
94
|
}
|
|
83
95
|
|
|
84
|
-
main_schema[:
|
|
85
|
-
token: {
|
|
86
|
-
'type': 'apiKey',
|
|
87
|
-
'passAs': 'query',
|
|
88
|
-
'keyname': 'token'
|
|
89
|
-
}
|
|
90
|
-
}
|
|
96
|
+
main_schema[:produces] ||= ['application/json']
|
|
91
97
|
|
|
92
98
|
File.open [schemas_dir, File.basename(api_docs_uri.path)].join('/'), 'w' do |io|
|
|
93
99
|
io.write JSON.pretty_generate(main_schema)
|
data/docs/AcceptanceBulkModel.md
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
|
6
6
|
**id** | **Integer** | Order Id |
|
|
7
|
-
**estimated_delivery_date** | **
|
|
8
|
-
**estimated_dispatch_at** | **
|
|
7
|
+
**estimated_delivery_date** | **DateTime** | 'yyyy-mm-dd' |
|
|
8
|
+
**estimated_dispatch_at** | **DateTime** | 'yyyy-mm-dd' |
|
|
9
9
|
**confirmation_note** | **String** | | [optional]
|
|
10
10
|
|
|
11
11
|
|
data/docs/DispatchBulkModel.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
|
6
6
|
**id** | **Integer** | Order Id |
|
|
7
|
-
**estimated_delivery_date** | **
|
|
7
|
+
**estimated_delivery_date** | **DateTime** | 'yyyy-mm-dd' |
|
|
8
8
|
**resolve_enquiry** | **BOOLEAN** | | [optional]
|
|
9
9
|
**tracking_number** | **String** | | [optional]
|
|
10
10
|
**parcel_tracking_url** | **String** | | [optional]
|
data/docs/Financials.md
CHANGED
|
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
|
|
|
14
14
|
**manual_payment_total** | [**FinancialsDetails**](FinancialsDetails.md) | |
|
|
15
15
|
**purchase_delivery** | [**FinancialsDetails**](FinancialsDetails.md) | |
|
|
16
16
|
**purchase_discount** | [**FinancialsDetails**](FinancialsDetails.md) | |
|
|
17
|
-
**purchase_items** | [**FinancialsDetails
|
|
17
|
+
**purchase_items** | [**Array<FinancialsDetails>**](FinancialsDetails.md) | |
|
|
18
18
|
**purchase_subtotal** | [**FinancialsDetails**](FinancialsDetails.md) | |
|
|
19
19
|
**purchase_total** | [**FinancialsDetails**](FinancialsDetails.md) | |
|
|
20
20
|
**partner_total** | [**FinancialsDetails**](FinancialsDetails.md) | |
|
data/docs/Order.md
CHANGED
|
@@ -5,16 +5,16 @@ Name | Type | Description | Notes
|
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
|
6
6
|
**id** | **Integer** | |
|
|
7
7
|
**state** | **String** | |
|
|
8
|
-
**confirm_by** | **
|
|
9
|
-
**estimated_dispatch_at** | **
|
|
10
|
-
**placed_at** | **
|
|
11
|
-
**expired_at** | **
|
|
12
|
-
**declined_at** | **
|
|
13
|
-
**accepted_at** | **
|
|
14
|
-
**dispatched_at** | **
|
|
15
|
-
**archived_at** | **
|
|
8
|
+
**confirm_by** | **DateTime** | |
|
|
9
|
+
**estimated_dispatch_at** | **DateTime** | |
|
|
10
|
+
**placed_at** | **DateTime** | |
|
|
11
|
+
**expired_at** | **DateTime** | |
|
|
12
|
+
**declined_at** | **DateTime** | |
|
|
13
|
+
**accepted_at** | **DateTime** | |
|
|
14
|
+
**dispatched_at** | **DateTime** | |
|
|
15
|
+
**archived_at** | **DateTime** | | [optional]
|
|
16
16
|
**repeat_customer** | **BOOLEAN** | |
|
|
17
|
-
**customer_expected_delivery_date** | **
|
|
17
|
+
**customer_expected_delivery_date** | **DateTime** | |
|
|
18
18
|
**number** | **String** | |
|
|
19
19
|
**dispatch_note_viewed** | **BOOLEAN** | |
|
|
20
20
|
**express** | **BOOLEAN** | |
|
|
@@ -30,7 +30,7 @@ Name | Type | Description | Notes
|
|
|
30
30
|
**gift_receipt** | **BOOLEAN** | |
|
|
31
31
|
**delivery_note** | **String** | |
|
|
32
32
|
**has_enquiry** | **BOOLEAN** | |
|
|
33
|
-
**estimated_delivery_date** | **
|
|
33
|
+
**estimated_delivery_date** | **DateTime** | |
|
|
34
34
|
**rebate_qualified** | **BOOLEAN** | null in sites where rebates are not offered | [optional]
|
|
35
35
|
**rebate_achieved** | **BOOLEAN** | null in sites where rebates are not offered | [optional]
|
|
36
36
|
**financials** | [**Financials**](Financials.md) | |
|
|
@@ -47,7 +47,8 @@ Name | Type | Description | Notes
|
|
|
47
47
|
**order_total** | [**Money**](Money.md) | |
|
|
48
48
|
**delivery_total** | [**Money**](Money.md) | |
|
|
49
49
|
**enquiry** | [**Enquiry**](Enquiry.md) | |
|
|
50
|
-
**items** | [**Item
|
|
50
|
+
**items** | [**Array<Item>**](Item.md) | |
|
|
51
51
|
**links** | [**Array<Link>**](Link.md) | |
|
|
52
|
+
**updated_at** | **DateTime** | | [optional]
|
|
52
53
|
|
|
53
54
|
|
data/docs/OrdersApi.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Noths::OrdersApi
|
|
2
2
|
|
|
3
|
-
All URIs are relative to
|
|
3
|
+
All URIs are relative to https://api.notonthehighstreet.com
|
|
4
4
|
|
|
5
5
|
Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
|
@@ -20,7 +20,7 @@ Method | HTTP request | Description
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
# **orders_acceptance**
|
|
23
|
-
> orders_acceptance(id, estimated_delivery_date, estimated_dispatch_at, opts)
|
|
23
|
+
> orders_acceptance(token, id, estimated_delivery_date, estimated_dispatch_at, opts)
|
|
24
24
|
|
|
25
25
|
Accept an order
|
|
26
26
|
|
|
@@ -30,16 +30,11 @@ Accept an order
|
|
|
30
30
|
```ruby
|
|
31
31
|
# load the gem
|
|
32
32
|
require 'noths'
|
|
33
|
-
# setup authorization
|
|
34
|
-
Noths.configure do |config|
|
|
35
|
-
# Configure API key authorization: token
|
|
36
|
-
config.api_key['token'] = 'YOUR API KEY'
|
|
37
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
38
|
-
#config.api_key_prefix['token'] = 'Bearer'
|
|
39
|
-
end
|
|
40
33
|
|
|
41
34
|
api_instance = Noths::OrdersApi.new
|
|
42
35
|
|
|
36
|
+
token = "token_example" # String | Authentication credential
|
|
37
|
+
|
|
43
38
|
id = 56 # Integer | Order id
|
|
44
39
|
|
|
45
40
|
estimated_delivery_date = Date.parse("2013-10-20") # Date | 'yyyy-mm-dd'
|
|
@@ -52,7 +47,7 @@ opts = {
|
|
|
52
47
|
|
|
53
48
|
begin
|
|
54
49
|
#Accept an order
|
|
55
|
-
api_instance.orders_acceptance(id, estimated_delivery_date, estimated_dispatch_at, opts)
|
|
50
|
+
api_instance.orders_acceptance(token, id, estimated_delivery_date, estimated_dispatch_at, opts)
|
|
56
51
|
rescue Noths::ApiError => e
|
|
57
52
|
puts "Exception when calling OrdersApi->orders_acceptance: #{e}"
|
|
58
53
|
end
|
|
@@ -62,6 +57,7 @@ end
|
|
|
62
57
|
|
|
63
58
|
Name | Type | Description | Notes
|
|
64
59
|
------------- | ------------- | ------------- | -------------
|
|
60
|
+
**token** | **String**| Authentication credential |
|
|
65
61
|
**id** | **Integer**| Order id |
|
|
66
62
|
**estimated_delivery_date** | **Date**| 'yyyy-mm-dd' |
|
|
67
63
|
**estimated_dispatch_at** | **Date**| 'yyyy-mm-dd' |
|
|
@@ -73,17 +69,17 @@ nil (empty response body)
|
|
|
73
69
|
|
|
74
70
|
### Authorization
|
|
75
71
|
|
|
76
|
-
|
|
72
|
+
No authorization required
|
|
77
73
|
|
|
78
74
|
### HTTP request headers
|
|
79
75
|
|
|
80
|
-
- **Content-Type**:
|
|
76
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
81
77
|
- **Accept**: Not defined
|
|
82
78
|
|
|
83
79
|
|
|
84
80
|
|
|
85
81
|
# **orders_acceptance_bulk**
|
|
86
|
-
> orders_acceptance_bulk(payload)
|
|
82
|
+
> orders_acceptance_bulk(token, payload)
|
|
87
83
|
|
|
88
84
|
Accept multiple orders
|
|
89
85
|
|
|
@@ -93,22 +89,17 @@ Returns an array of hashes containing order ids and status codes. A status code
|
|
|
93
89
|
```ruby
|
|
94
90
|
# load the gem
|
|
95
91
|
require 'noths'
|
|
96
|
-
# setup authorization
|
|
97
|
-
Noths.configure do |config|
|
|
98
|
-
# Configure API key authorization: token
|
|
99
|
-
config.api_key['token'] = 'YOUR API KEY'
|
|
100
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
101
|
-
#config.api_key_prefix['token'] = 'Bearer'
|
|
102
|
-
end
|
|
103
92
|
|
|
104
93
|
api_instance = Noths::OrdersApi.new
|
|
105
94
|
|
|
95
|
+
token = "token_example" # String | Authentication credential
|
|
96
|
+
|
|
106
97
|
payload = [Noths::AcceptanceBulkModel.new] # Array<AcceptanceBulkModel> |
|
|
107
98
|
|
|
108
99
|
|
|
109
100
|
begin
|
|
110
101
|
#Accept multiple orders
|
|
111
|
-
api_instance.orders_acceptance_bulk(payload)
|
|
102
|
+
api_instance.orders_acceptance_bulk(token, payload)
|
|
112
103
|
rescue Noths::ApiError => e
|
|
113
104
|
puts "Exception when calling OrdersApi->orders_acceptance_bulk: #{e}"
|
|
114
105
|
end
|
|
@@ -118,6 +109,7 @@ end
|
|
|
118
109
|
|
|
119
110
|
Name | Type | Description | Notes
|
|
120
111
|
------------- | ------------- | ------------- | -------------
|
|
112
|
+
**token** | **String**| Authentication credential |
|
|
121
113
|
**payload** | [**Array<AcceptanceBulkModel>**](AcceptanceBulkModel.md)| |
|
|
122
114
|
|
|
123
115
|
### Return type
|
|
@@ -126,17 +118,17 @@ nil (empty response body)
|
|
|
126
118
|
|
|
127
119
|
### Authorization
|
|
128
120
|
|
|
129
|
-
|
|
121
|
+
No authorization required
|
|
130
122
|
|
|
131
123
|
### HTTP request headers
|
|
132
124
|
|
|
133
|
-
- **Content-Type**:
|
|
125
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
134
126
|
- **Accept**: Not defined
|
|
135
127
|
|
|
136
128
|
|
|
137
129
|
|
|
138
130
|
# **orders_decline**
|
|
139
|
-
> orders_decline(id, decline_reason)
|
|
131
|
+
> orders_decline(token, id, decline_reason)
|
|
140
132
|
|
|
141
133
|
Decline an order
|
|
142
134
|
|
|
@@ -146,16 +138,11 @@ Declines an order that is in the placed state
|
|
|
146
138
|
```ruby
|
|
147
139
|
# load the gem
|
|
148
140
|
require 'noths'
|
|
149
|
-
# setup authorization
|
|
150
|
-
Noths.configure do |config|
|
|
151
|
-
# Configure API key authorization: token
|
|
152
|
-
config.api_key['token'] = 'YOUR API KEY'
|
|
153
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
154
|
-
#config.api_key_prefix['token'] = 'Bearer'
|
|
155
|
-
end
|
|
156
141
|
|
|
157
142
|
api_instance = Noths::OrdersApi.new
|
|
158
143
|
|
|
144
|
+
token = "token_example" # String | Authentication credential
|
|
145
|
+
|
|
159
146
|
id = 56 # Integer | Order id
|
|
160
147
|
|
|
161
148
|
decline_reason = "decline_reason_example" # String |
|
|
@@ -163,7 +150,7 @@ decline_reason = "decline_reason_example" # String |
|
|
|
163
150
|
|
|
164
151
|
begin
|
|
165
152
|
#Decline an order
|
|
166
|
-
api_instance.orders_decline(id, decline_reason)
|
|
153
|
+
api_instance.orders_decline(token, id, decline_reason)
|
|
167
154
|
rescue Noths::ApiError => e
|
|
168
155
|
puts "Exception when calling OrdersApi->orders_decline: #{e}"
|
|
169
156
|
end
|
|
@@ -173,6 +160,7 @@ end
|
|
|
173
160
|
|
|
174
161
|
Name | Type | Description | Notes
|
|
175
162
|
------------- | ------------- | ------------- | -------------
|
|
163
|
+
**token** | **String**| Authentication credential |
|
|
176
164
|
**id** | **Integer**| Order id |
|
|
177
165
|
**decline_reason** | **String**| |
|
|
178
166
|
|
|
@@ -182,17 +170,17 @@ nil (empty response body)
|
|
|
182
170
|
|
|
183
171
|
### Authorization
|
|
184
172
|
|
|
185
|
-
|
|
173
|
+
No authorization required
|
|
186
174
|
|
|
187
175
|
### HTTP request headers
|
|
188
176
|
|
|
189
|
-
- **Content-Type**:
|
|
177
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
190
178
|
- **Accept**: Not defined
|
|
191
179
|
|
|
192
180
|
|
|
193
181
|
|
|
194
182
|
# **orders_decline_bulk**
|
|
195
|
-
> orders_decline_bulk(payload)
|
|
183
|
+
> orders_decline_bulk(token, payload)
|
|
196
184
|
|
|
197
185
|
Decline multiple orders
|
|
198
186
|
|
|
@@ -202,22 +190,17 @@ Returns an array of hashes containing order ids and status codes. A status code
|
|
|
202
190
|
```ruby
|
|
203
191
|
# load the gem
|
|
204
192
|
require 'noths'
|
|
205
|
-
# setup authorization
|
|
206
|
-
Noths.configure do |config|
|
|
207
|
-
# Configure API key authorization: token
|
|
208
|
-
config.api_key['token'] = 'YOUR API KEY'
|
|
209
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
210
|
-
#config.api_key_prefix['token'] = 'Bearer'
|
|
211
|
-
end
|
|
212
193
|
|
|
213
194
|
api_instance = Noths::OrdersApi.new
|
|
214
195
|
|
|
196
|
+
token = "token_example" # String | Authentication credential
|
|
197
|
+
|
|
215
198
|
payload = [Noths::DeclineBulkModel.new] # Array<DeclineBulkModel> |
|
|
216
199
|
|
|
217
200
|
|
|
218
201
|
begin
|
|
219
202
|
#Decline multiple orders
|
|
220
|
-
api_instance.orders_decline_bulk(payload)
|
|
203
|
+
api_instance.orders_decline_bulk(token, payload)
|
|
221
204
|
rescue Noths::ApiError => e
|
|
222
205
|
puts "Exception when calling OrdersApi->orders_decline_bulk: #{e}"
|
|
223
206
|
end
|
|
@@ -227,6 +210,7 @@ end
|
|
|
227
210
|
|
|
228
211
|
Name | Type | Description | Notes
|
|
229
212
|
------------- | ------------- | ------------- | -------------
|
|
213
|
+
**token** | **String**| Authentication credential |
|
|
230
214
|
**payload** | [**Array<DeclineBulkModel>**](DeclineBulkModel.md)| |
|
|
231
215
|
|
|
232
216
|
### Return type
|
|
@@ -235,17 +219,17 @@ nil (empty response body)
|
|
|
235
219
|
|
|
236
220
|
### Authorization
|
|
237
221
|
|
|
238
|
-
|
|
222
|
+
No authorization required
|
|
239
223
|
|
|
240
224
|
### HTTP request headers
|
|
241
225
|
|
|
242
|
-
- **Content-Type**:
|
|
226
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
243
227
|
- **Accept**: Not defined
|
|
244
228
|
|
|
245
229
|
|
|
246
230
|
|
|
247
231
|
# **orders_dispatch_note**
|
|
248
|
-
> orders_dispatch_note(id, opts)
|
|
232
|
+
> File orders_dispatch_note(token, id, opts)
|
|
249
233
|
|
|
250
234
|
Generate a dispatch note pdf or gift note pdf.
|
|
251
235
|
|
|
@@ -255,16 +239,11 @@ Force the kind of document by passing the force_type parameter. A gift note can
|
|
|
255
239
|
```ruby
|
|
256
240
|
# load the gem
|
|
257
241
|
require 'noths'
|
|
258
|
-
# setup authorization
|
|
259
|
-
Noths.configure do |config|
|
|
260
|
-
# Configure API key authorization: token
|
|
261
|
-
config.api_key['token'] = 'YOUR API KEY'
|
|
262
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
263
|
-
#config.api_key_prefix['token'] = 'Bearer'
|
|
264
|
-
end
|
|
265
242
|
|
|
266
243
|
api_instance = Noths::OrdersApi.new
|
|
267
244
|
|
|
245
|
+
token = "token_example" # String | Authentication credential
|
|
246
|
+
|
|
268
247
|
id = 56 # Integer | Order id
|
|
269
248
|
|
|
270
249
|
opts = {
|
|
@@ -273,7 +252,8 @@ opts = {
|
|
|
273
252
|
|
|
274
253
|
begin
|
|
275
254
|
#Generate a dispatch note pdf or gift note pdf.
|
|
276
|
-
api_instance.orders_dispatch_note(id, opts)
|
|
255
|
+
result = api_instance.orders_dispatch_note(token, id, opts)
|
|
256
|
+
p result
|
|
277
257
|
rescue Noths::ApiError => e
|
|
278
258
|
puts "Exception when calling OrdersApi->orders_dispatch_note: #{e}"
|
|
279
259
|
end
|
|
@@ -283,26 +263,27 @@ end
|
|
|
283
263
|
|
|
284
264
|
Name | Type | Description | Notes
|
|
285
265
|
------------- | ------------- | ------------- | -------------
|
|
266
|
+
**token** | **String**| Authentication credential |
|
|
286
267
|
**id** | **Integer**| Order id |
|
|
287
268
|
**force_type** | **String**| Type of document | [optional]
|
|
288
269
|
|
|
289
270
|
### Return type
|
|
290
271
|
|
|
291
|
-
|
|
272
|
+
**File**
|
|
292
273
|
|
|
293
274
|
### Authorization
|
|
294
275
|
|
|
295
|
-
|
|
276
|
+
No authorization required
|
|
296
277
|
|
|
297
278
|
### HTTP request headers
|
|
298
279
|
|
|
299
280
|
- **Content-Type**: Not defined
|
|
300
|
-
- **Accept**:
|
|
281
|
+
- **Accept**: application/pdf, application/json
|
|
301
282
|
|
|
302
283
|
|
|
303
284
|
|
|
304
285
|
# **orders_dispatch_notes_bulk**
|
|
305
|
-
> orders_dispatch_notes_bulk(payload)
|
|
286
|
+
> File orders_dispatch_notes_bulk(token, payload)
|
|
306
287
|
|
|
307
288
|
Generate pdf with dispatch note for each order
|
|
308
289
|
|
|
@@ -312,22 +293,18 @@ Generate pdf with dispatch note for each order
|
|
|
312
293
|
```ruby
|
|
313
294
|
# load the gem
|
|
314
295
|
require 'noths'
|
|
315
|
-
# setup authorization
|
|
316
|
-
Noths.configure do |config|
|
|
317
|
-
# Configure API key authorization: token
|
|
318
|
-
config.api_key['token'] = 'YOUR API KEY'
|
|
319
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
320
|
-
#config.api_key_prefix['token'] = 'Bearer'
|
|
321
|
-
end
|
|
322
296
|
|
|
323
297
|
api_instance = Noths::OrdersApi.new
|
|
324
298
|
|
|
299
|
+
token = "token_example" # String | Authentication credential
|
|
300
|
+
|
|
325
301
|
payload = [Noths::DispatchNotesBulkModel.new] # Array<DispatchNotesBulkModel> |
|
|
326
302
|
|
|
327
303
|
|
|
328
304
|
begin
|
|
329
305
|
#Generate pdf with dispatch note for each order
|
|
330
|
-
api_instance.orders_dispatch_notes_bulk(payload)
|
|
306
|
+
result = api_instance.orders_dispatch_notes_bulk(token, payload)
|
|
307
|
+
p result
|
|
331
308
|
rescue Noths::ApiError => e
|
|
332
309
|
puts "Exception when calling OrdersApi->orders_dispatch_notes_bulk: #{e}"
|
|
333
310
|
end
|
|
@@ -337,25 +314,26 @@ end
|
|
|
337
314
|
|
|
338
315
|
Name | Type | Description | Notes
|
|
339
316
|
------------- | ------------- | ------------- | -------------
|
|
317
|
+
**token** | **String**| Authentication credential |
|
|
340
318
|
**payload** | [**Array<DispatchNotesBulkModel>**](DispatchNotesBulkModel.md)| |
|
|
341
319
|
|
|
342
320
|
### Return type
|
|
343
321
|
|
|
344
|
-
|
|
322
|
+
**File**
|
|
345
323
|
|
|
346
324
|
### Authorization
|
|
347
325
|
|
|
348
|
-
|
|
326
|
+
No authorization required
|
|
349
327
|
|
|
350
328
|
### HTTP request headers
|
|
351
329
|
|
|
352
|
-
- **Content-Type**:
|
|
353
|
-
- **Accept**:
|
|
330
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
331
|
+
- **Accept**: application/pdf, application/json
|
|
354
332
|
|
|
355
333
|
|
|
356
334
|
|
|
357
335
|
# **orders_dispatch_order**
|
|
358
|
-
> orders_dispatch_order(id, estimated_delivery_date, opts)
|
|
336
|
+
> orders_dispatch_order(token, id, estimated_delivery_date, opts)
|
|
359
337
|
|
|
360
338
|
Dispatch an order
|
|
361
339
|
|
|
@@ -365,16 +343,11 @@ Dispatches an order that is in an accepted state and has also had its dispatch n
|
|
|
365
343
|
```ruby
|
|
366
344
|
# load the gem
|
|
367
345
|
require 'noths'
|
|
368
|
-
# setup authorization
|
|
369
|
-
Noths.configure do |config|
|
|
370
|
-
# Configure API key authorization: token
|
|
371
|
-
config.api_key['token'] = 'YOUR API KEY'
|
|
372
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
373
|
-
#config.api_key_prefix['token'] = 'Bearer'
|
|
374
|
-
end
|
|
375
346
|
|
|
376
347
|
api_instance = Noths::OrdersApi.new
|
|
377
348
|
|
|
349
|
+
token = "token_example" # String | Authentication credential
|
|
350
|
+
|
|
378
351
|
id = 56 # Integer | Order id
|
|
379
352
|
|
|
380
353
|
estimated_delivery_date = Date.parse("2013-10-20") # Date | 'yyyy-mm-dd'
|
|
@@ -388,7 +361,7 @@ opts = {
|
|
|
388
361
|
|
|
389
362
|
begin
|
|
390
363
|
#Dispatch an order
|
|
391
|
-
api_instance.orders_dispatch_order(id, estimated_delivery_date, opts)
|
|
364
|
+
api_instance.orders_dispatch_order(token, id, estimated_delivery_date, opts)
|
|
392
365
|
rescue Noths::ApiError => e
|
|
393
366
|
puts "Exception when calling OrdersApi->orders_dispatch_order: #{e}"
|
|
394
367
|
end
|
|
@@ -398,6 +371,7 @@ end
|
|
|
398
371
|
|
|
399
372
|
Name | Type | Description | Notes
|
|
400
373
|
------------- | ------------- | ------------- | -------------
|
|
374
|
+
**token** | **String**| Authentication credential |
|
|
401
375
|
**id** | **Integer**| Order id |
|
|
402
376
|
**estimated_delivery_date** | **Date**| 'yyyy-mm-dd' |
|
|
403
377
|
**resolve_enquiry** | **BOOLEAN**| | [optional]
|
|
@@ -411,17 +385,17 @@ nil (empty response body)
|
|
|
411
385
|
|
|
412
386
|
### Authorization
|
|
413
387
|
|
|
414
|
-
|
|
388
|
+
No authorization required
|
|
415
389
|
|
|
416
390
|
### HTTP request headers
|
|
417
391
|
|
|
418
|
-
- **Content-Type**:
|
|
392
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
419
393
|
- **Accept**: Not defined
|
|
420
394
|
|
|
421
395
|
|
|
422
396
|
|
|
423
397
|
# **orders_dispatch_orders_bulk**
|
|
424
|
-
> orders_dispatch_orders_bulk(payload, opts)
|
|
398
|
+
> orders_dispatch_orders_bulk(token, payload, opts)
|
|
425
399
|
|
|
426
400
|
Dispatch multiple orders
|
|
427
401
|
|
|
@@ -431,16 +405,11 @@ Returns an array of hashes containing order ids and status codes. A status code
|
|
|
431
405
|
```ruby
|
|
432
406
|
# load the gem
|
|
433
407
|
require 'noths'
|
|
434
|
-
# setup authorization
|
|
435
|
-
Noths.configure do |config|
|
|
436
|
-
# Configure API key authorization: token
|
|
437
|
-
config.api_key['token'] = 'YOUR API KEY'
|
|
438
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
439
|
-
#config.api_key_prefix['token'] = 'Bearer'
|
|
440
|
-
end
|
|
441
408
|
|
|
442
409
|
api_instance = Noths::OrdersApi.new
|
|
443
410
|
|
|
411
|
+
token = "token_example" # String | Authentication credential
|
|
412
|
+
|
|
444
413
|
payload = [Noths::DispatchBulkModel.new] # Array<DispatchBulkModel> |
|
|
445
414
|
|
|
446
415
|
opts = {
|
|
@@ -449,7 +418,7 @@ opts = {
|
|
|
449
418
|
|
|
450
419
|
begin
|
|
451
420
|
#Dispatch multiple orders
|
|
452
|
-
api_instance.orders_dispatch_orders_bulk(payload, opts)
|
|
421
|
+
api_instance.orders_dispatch_orders_bulk(token, payload, opts)
|
|
453
422
|
rescue Noths::ApiError => e
|
|
454
423
|
puts "Exception when calling OrdersApi->orders_dispatch_orders_bulk: #{e}"
|
|
455
424
|
end
|
|
@@ -459,6 +428,7 @@ end
|
|
|
459
428
|
|
|
460
429
|
Name | Type | Description | Notes
|
|
461
430
|
------------- | ------------- | ------------- | -------------
|
|
431
|
+
**token** | **String**| Authentication credential |
|
|
462
432
|
**payload** | [**Array<DispatchBulkModel>**](DispatchBulkModel.md)| |
|
|
463
433
|
**ignore_unresolved_enquiries** | **BOOLEAN**| Defaults to false | [optional]
|
|
464
434
|
|
|
@@ -468,17 +438,17 @@ nil (empty response body)
|
|
|
468
438
|
|
|
469
439
|
### Authorization
|
|
470
440
|
|
|
471
|
-
|
|
441
|
+
No authorization required
|
|
472
442
|
|
|
473
443
|
### HTTP request headers
|
|
474
444
|
|
|
475
|
-
- **Content-Type**:
|
|
445
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
476
446
|
- **Accept**: Not defined
|
|
477
447
|
|
|
478
448
|
|
|
479
449
|
|
|
480
450
|
# **orders_index**
|
|
481
|
-
> OrderIndex orders_index(opts)
|
|
451
|
+
> OrderIndex orders_index(token, opts)
|
|
482
452
|
|
|
483
453
|
Fetch orders
|
|
484
454
|
|
|
@@ -488,16 +458,11 @@ Lists orders descending by placed at time by default.<p/>If you just want a coun
|
|
|
488
458
|
```ruby
|
|
489
459
|
# load the gem
|
|
490
460
|
require 'noths'
|
|
491
|
-
# setup authorization
|
|
492
|
-
Noths.configure do |config|
|
|
493
|
-
# Configure API key authorization: token
|
|
494
|
-
config.api_key['token'] = 'YOUR API KEY'
|
|
495
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
496
|
-
#config.api_key_prefix['token'] = 'Bearer'
|
|
497
|
-
end
|
|
498
461
|
|
|
499
462
|
api_instance = Noths::OrdersApi.new
|
|
500
463
|
|
|
464
|
+
token = "token_example" # String | Authentication credential
|
|
465
|
+
|
|
501
466
|
opts = {
|
|
502
467
|
customer_expected_delivery_date_from: DateTime.parse("2013-10-20T19:20:30+01:00"), # DateTime | Earliest customer_expected_delivery_date datetime - format iso8601 eg '2011-10-05T22:26:12-04:00'
|
|
503
468
|
customer_expected_delivery_date_to: DateTime.parse("2013-10-20T19:20:30+01:00"), # DateTime | Latest customer_expected_delivery_date datetime - format iso8601 eg '2011-10-05T22:26:12-04:00'
|
|
@@ -521,12 +486,12 @@ opts = {
|
|
|
521
486
|
query: "query_example", # String | Matches your query to information related to your orders
|
|
522
487
|
repeat_customer: true, # BOOLEAN |
|
|
523
488
|
sort: "sort_example", # String | Defaults to placed_at
|
|
524
|
-
state: "state_example" # String | State
|
|
489
|
+
state: ["state_example"] # Array<String> | State
|
|
525
490
|
}
|
|
526
491
|
|
|
527
492
|
begin
|
|
528
493
|
#Fetch orders
|
|
529
|
-
result = api_instance.orders_index(opts)
|
|
494
|
+
result = api_instance.orders_index(token, opts)
|
|
530
495
|
p result
|
|
531
496
|
rescue Noths::ApiError => e
|
|
532
497
|
puts "Exception when calling OrdersApi->orders_index: #{e}"
|
|
@@ -537,6 +502,7 @@ end
|
|
|
537
502
|
|
|
538
503
|
Name | Type | Description | Notes
|
|
539
504
|
------------- | ------------- | ------------- | -------------
|
|
505
|
+
**token** | **String**| Authentication credential |
|
|
540
506
|
**customer_expected_delivery_date_from** | **DateTime**| Earliest customer_expected_delivery_date datetime - format iso8601 eg '2011-10-05T22:26:12-04:00' | [optional]
|
|
541
507
|
**customer_expected_delivery_date_to** | **DateTime**| Latest customer_expected_delivery_date datetime - format iso8601 eg '2011-10-05T22:26:12-04:00' | [optional]
|
|
542
508
|
**delivery_service_code** | **String**| Delivery service code | [optional]
|
|
@@ -559,7 +525,7 @@ Name | Type | Description | Notes
|
|
|
559
525
|
**query** | **String**| Matches your query to information related to your orders | [optional]
|
|
560
526
|
**repeat_customer** | **BOOLEAN**| | [optional]
|
|
561
527
|
**sort** | **String**| Defaults to placed_at | [optional]
|
|
562
|
-
**state** | **String
|
|
528
|
+
**state** | [**Array<String>**](String.md)| State | [optional]
|
|
563
529
|
|
|
564
530
|
### Return type
|
|
565
531
|
|
|
@@ -567,7 +533,7 @@ Name | Type | Description | Notes
|
|
|
567
533
|
|
|
568
534
|
### Authorization
|
|
569
535
|
|
|
570
|
-
|
|
536
|
+
No authorization required
|
|
571
537
|
|
|
572
538
|
### HTTP request headers
|
|
573
539
|
|
|
@@ -577,7 +543,7 @@ Name | Type | Description | Notes
|
|
|
577
543
|
|
|
578
544
|
|
|
579
545
|
# **orders_invoice**
|
|
580
|
-
> orders_invoice(id, type)
|
|
546
|
+
> File orders_invoice(token, id, type)
|
|
581
547
|
|
|
582
548
|
Generate a vat invoice pdf.
|
|
583
549
|
|
|
@@ -587,16 +553,11 @@ Generate a vat invoice pdf.
|
|
|
587
553
|
```ruby
|
|
588
554
|
# load the gem
|
|
589
555
|
require 'noths'
|
|
590
|
-
# setup authorization
|
|
591
|
-
Noths.configure do |config|
|
|
592
|
-
# Configure API key authorization: token
|
|
593
|
-
config.api_key['token'] = 'YOUR API KEY'
|
|
594
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
595
|
-
#config.api_key_prefix['token'] = 'Bearer'
|
|
596
|
-
end
|
|
597
556
|
|
|
598
557
|
api_instance = Noths::OrdersApi.new
|
|
599
558
|
|
|
559
|
+
token = "token_example" # String | Authentication credential
|
|
560
|
+
|
|
600
561
|
id = 56 # Integer | Order id
|
|
601
562
|
|
|
602
563
|
type = "type_example" # String | Type of invoice
|
|
@@ -604,7 +565,8 @@ type = "type_example" # String | Type of invoice
|
|
|
604
565
|
|
|
605
566
|
begin
|
|
606
567
|
#Generate a vat invoice pdf.
|
|
607
|
-
api_instance.orders_invoice(id, type)
|
|
568
|
+
result = api_instance.orders_invoice(token, id, type)
|
|
569
|
+
p result
|
|
608
570
|
rescue Noths::ApiError => e
|
|
609
571
|
puts "Exception when calling OrdersApi->orders_invoice: #{e}"
|
|
610
572
|
end
|
|
@@ -614,26 +576,27 @@ end
|
|
|
614
576
|
|
|
615
577
|
Name | Type | Description | Notes
|
|
616
578
|
------------- | ------------- | ------------- | -------------
|
|
579
|
+
**token** | **String**| Authentication credential |
|
|
617
580
|
**id** | **Integer**| Order id |
|
|
618
581
|
**type** | **String**| Type of invoice |
|
|
619
582
|
|
|
620
583
|
### Return type
|
|
621
584
|
|
|
622
|
-
|
|
585
|
+
**File**
|
|
623
586
|
|
|
624
587
|
### Authorization
|
|
625
588
|
|
|
626
|
-
|
|
589
|
+
No authorization required
|
|
627
590
|
|
|
628
591
|
### HTTP request headers
|
|
629
592
|
|
|
630
593
|
- **Content-Type**: Not defined
|
|
631
|
-
- **Accept**:
|
|
594
|
+
- **Accept**: application/pdf, application/json
|
|
632
595
|
|
|
633
596
|
|
|
634
597
|
|
|
635
598
|
# **orders_order_details**
|
|
636
|
-
> orders_order_details(id)
|
|
599
|
+
> File orders_order_details(token, id)
|
|
637
600
|
|
|
638
601
|
Generate an order details pdf
|
|
639
602
|
|
|
@@ -643,22 +606,18 @@ Here is an example of how to obtain a pdf using curl: <pre>curl -XPOST [UR
|
|
|
643
606
|
```ruby
|
|
644
607
|
# load the gem
|
|
645
608
|
require 'noths'
|
|
646
|
-
# setup authorization
|
|
647
|
-
Noths.configure do |config|
|
|
648
|
-
# Configure API key authorization: token
|
|
649
|
-
config.api_key['token'] = 'YOUR API KEY'
|
|
650
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
651
|
-
#config.api_key_prefix['token'] = 'Bearer'
|
|
652
|
-
end
|
|
653
609
|
|
|
654
610
|
api_instance = Noths::OrdersApi.new
|
|
655
611
|
|
|
612
|
+
token = "token_example" # String | Authentication credential
|
|
613
|
+
|
|
656
614
|
id = 56 # Integer | Order id
|
|
657
615
|
|
|
658
616
|
|
|
659
617
|
begin
|
|
660
618
|
#Generate an order details pdf
|
|
661
|
-
api_instance.orders_order_details(id)
|
|
619
|
+
result = api_instance.orders_order_details(token, id)
|
|
620
|
+
p result
|
|
662
621
|
rescue Noths::ApiError => e
|
|
663
622
|
puts "Exception when calling OrdersApi->orders_order_details: #{e}"
|
|
664
623
|
end
|
|
@@ -668,25 +627,26 @@ end
|
|
|
668
627
|
|
|
669
628
|
Name | Type | Description | Notes
|
|
670
629
|
------------- | ------------- | ------------- | -------------
|
|
630
|
+
**token** | **String**| Authentication credential |
|
|
671
631
|
**id** | **Integer**| Order id |
|
|
672
632
|
|
|
673
633
|
### Return type
|
|
674
634
|
|
|
675
|
-
|
|
635
|
+
**File**
|
|
676
636
|
|
|
677
637
|
### Authorization
|
|
678
638
|
|
|
679
|
-
|
|
639
|
+
No authorization required
|
|
680
640
|
|
|
681
641
|
### HTTP request headers
|
|
682
642
|
|
|
683
643
|
- **Content-Type**: Not defined
|
|
684
|
-
- **Accept**:
|
|
644
|
+
- **Accept**: application/pdf, application/json
|
|
685
645
|
|
|
686
646
|
|
|
687
647
|
|
|
688
648
|
# **orders_order_details_bulk**
|
|
689
|
-
> orders_order_details_bulk(payload)
|
|
649
|
+
> File orders_order_details_bulk(token, payload)
|
|
690
650
|
|
|
691
651
|
Generate pdf with order details for each order
|
|
692
652
|
|
|
@@ -696,22 +656,18 @@ Generate pdf with order details for each order
|
|
|
696
656
|
```ruby
|
|
697
657
|
# load the gem
|
|
698
658
|
require 'noths'
|
|
699
|
-
# setup authorization
|
|
700
|
-
Noths.configure do |config|
|
|
701
|
-
# Configure API key authorization: token
|
|
702
|
-
config.api_key['token'] = 'YOUR API KEY'
|
|
703
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
704
|
-
#config.api_key_prefix['token'] = 'Bearer'
|
|
705
|
-
end
|
|
706
659
|
|
|
707
660
|
api_instance = Noths::OrdersApi.new
|
|
708
661
|
|
|
662
|
+
token = "token_example" # String | Authentication credential
|
|
663
|
+
|
|
709
664
|
payload = [Noths::OrderDetailsBulkModel.new] # Array<OrderDetailsBulkModel> |
|
|
710
665
|
|
|
711
666
|
|
|
712
667
|
begin
|
|
713
668
|
#Generate pdf with order details for each order
|
|
714
|
-
api_instance.orders_order_details_bulk(payload)
|
|
669
|
+
result = api_instance.orders_order_details_bulk(token, payload)
|
|
670
|
+
p result
|
|
715
671
|
rescue Noths::ApiError => e
|
|
716
672
|
puts "Exception when calling OrdersApi->orders_order_details_bulk: #{e}"
|
|
717
673
|
end
|
|
@@ -721,25 +677,26 @@ end
|
|
|
721
677
|
|
|
722
678
|
Name | Type | Description | Notes
|
|
723
679
|
------------- | ------------- | ------------- | -------------
|
|
680
|
+
**token** | **String**| Authentication credential |
|
|
724
681
|
**payload** | [**Array<OrderDetailsBulkModel>**](OrderDetailsBulkModel.md)| |
|
|
725
682
|
|
|
726
683
|
### Return type
|
|
727
684
|
|
|
728
|
-
|
|
685
|
+
**File**
|
|
729
686
|
|
|
730
687
|
### Authorization
|
|
731
688
|
|
|
732
|
-
|
|
689
|
+
No authorization required
|
|
733
690
|
|
|
734
691
|
### HTTP request headers
|
|
735
692
|
|
|
736
|
-
- **Content-Type**:
|
|
737
|
-
- **Accept**:
|
|
693
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
694
|
+
- **Accept**: application/pdf, application/json
|
|
738
695
|
|
|
739
696
|
|
|
740
697
|
|
|
741
698
|
# **orders_show**
|
|
742
|
-
> Order orders_show(id, opts)
|
|
699
|
+
> Order orders_show(token, id, opts)
|
|
743
700
|
|
|
744
701
|
Fetch a single Order
|
|
745
702
|
|
|
@@ -747,16 +704,11 @@ Fetch a single Order
|
|
|
747
704
|
```ruby
|
|
748
705
|
# load the gem
|
|
749
706
|
require 'noths'
|
|
750
|
-
# setup authorization
|
|
751
|
-
Noths.configure do |config|
|
|
752
|
-
# Configure API key authorization: token
|
|
753
|
-
config.api_key['token'] = 'YOUR API KEY'
|
|
754
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
755
|
-
#config.api_key_prefix['token'] = 'Bearer'
|
|
756
|
-
end
|
|
757
707
|
|
|
758
708
|
api_instance = Noths::OrdersApi.new
|
|
759
709
|
|
|
710
|
+
token = "token_example" # String | Authentication credential
|
|
711
|
+
|
|
760
712
|
id = 56 # Integer | Order Id
|
|
761
713
|
|
|
762
714
|
opts = {
|
|
@@ -765,7 +717,7 @@ opts = {
|
|
|
765
717
|
|
|
766
718
|
begin
|
|
767
719
|
#Fetch a single Order
|
|
768
|
-
result = api_instance.orders_show(id, opts)
|
|
720
|
+
result = api_instance.orders_show(token, id, opts)
|
|
769
721
|
p result
|
|
770
722
|
rescue Noths::ApiError => e
|
|
771
723
|
puts "Exception when calling OrdersApi->orders_show: #{e}"
|
|
@@ -776,6 +728,7 @@ end
|
|
|
776
728
|
|
|
777
729
|
Name | Type | Description | Notes
|
|
778
730
|
------------- | ------------- | ------------- | -------------
|
|
731
|
+
**token** | **String**| Authentication credential |
|
|
779
732
|
**id** | **Integer**| Order Id |
|
|
780
733
|
**include** | **String**| Comma separated list of nodes to expand. Currently the available values are: <br /><b style=\"margin-left: 10px\">financials</b> <p style=\"margin-left: 20px\"> Additional financial data about this order, eg: commission and discount amounts. </p> | [optional]
|
|
781
734
|
|
|
@@ -785,7 +738,7 @@ Name | Type | Description | Notes
|
|
|
785
738
|
|
|
786
739
|
### Authorization
|
|
787
740
|
|
|
788
|
-
|
|
741
|
+
No authorization required
|
|
789
742
|
|
|
790
743
|
### HTTP request headers
|
|
791
744
|
|