dear_inventory 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.env.example +2 -0
- data/.gitignore +15 -0
- data/.rspec +5 -0
- data/.rubocop.yml +84 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +69 -0
- data/Rakefile +8 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/dear_inventory.gemspec +45 -0
- data/lib/dear_inventory.rb +79 -0
- data/lib/dear_inventory/config.rb +55 -0
- data/lib/dear_inventory/environment.rb +54 -0
- data/lib/dear_inventory/error.rb +16 -0
- data/lib/dear_inventory/errors/request.rb +40 -0
- data/lib/dear_inventory/errors/validation.rb +6 -0
- data/lib/dear_inventory/lib/date_time.rb +18 -0
- data/lib/dear_inventory/lib/endpoint_class.rb +57 -0
- data/lib/dear_inventory/lib/is_a_subclass.rb +19 -0
- data/lib/dear_inventory/model.rb +98 -0
- data/lib/dear_inventory/models/additional_attributes.rb +53 -0
- data/lib/dear_inventory/models/additional_charge.rb +45 -0
- data/lib/dear_inventory/models/address.rb +45 -0
- data/lib/dear_inventory/models/attachment.rb +33 -0
- data/lib/dear_inventory/models/inventory_movement.rb +29 -0
- data/lib/dear_inventory/models/sale.rb +217 -0
- data/lib/dear_inventory/models/sale_list.rb +133 -0
- data/lib/dear_inventory/models/sale_lists.rb +26 -0
- data/lib/dear_inventory/models/sales/credit_note.rb +75 -0
- data/lib/dear_inventory/models/sales/fulfilment.rb +46 -0
- data/lib/dear_inventory/models/sales/fulfilments/pick_pack.rb +26 -0
- data/lib/dear_inventory/models/sales/fulfilments/pick_pack_line.rb +57 -0
- data/lib/dear_inventory/models/sales/fulfilments/ship.rb +35 -0
- data/lib/dear_inventory/models/sales/fulfilments/ship_line.rb +45 -0
- data/lib/dear_inventory/models/sales/invoice.rb +86 -0
- data/lib/dear_inventory/models/sales/invoice_line.rb +19 -0
- data/lib/dear_inventory/models/sales/line.rb +59 -0
- data/lib/dear_inventory/models/sales/manual_journal.rb +24 -0
- data/lib/dear_inventory/models/sales/manual_journal_line.rb +35 -0
- data/lib/dear_inventory/models/sales/order.rb +49 -0
- data/lib/dear_inventory/models/sales/payment_line.rb +43 -0
- data/lib/dear_inventory/models/sales/quote.rb +50 -0
- data/lib/dear_inventory/models/shipping_address.rb +25 -0
- data/lib/dear_inventory/models/transaction.rb +41 -0
- data/lib/dear_inventory/parameters.rb +209 -0
- data/lib/dear_inventory/parameters/sale/index.rb +35 -0
- data/lib/dear_inventory/parameters/sale_list/index.rb +119 -0
- data/lib/dear_inventory/resource.rb +59 -0
- data/lib/dear_inventory/resources/sale.rb +22 -0
- data/lib/dear_inventory/resources/sale_list.rb +24 -0
- data/lib/dear_inventory/response.rb +75 -0
- data/lib/dear_inventory/validator.rb +61 -0
- data/lib/dear_inventory/validators/boolean.rb +18 -0
- data/lib/dear_inventory/validators/enum.rb +23 -0
- data/lib/dear_inventory/validators/guid.rb +27 -0
- data/lib/dear_inventory/validators/integer.rb +19 -0
- data/lib/dear_inventory/validators/required.rb +17 -0
- data/lib/dear_inventory/validators/string.rb +35 -0
- data/lib/dear_inventory/validators/time.rb +21 -0
- data/lib/dear_inventory/version.rb +6 -0
- data/sorbet/config +2 -0
- data/sorbet/rbi/gems/addressable.rbi +199 -0
- data/sorbet/rbi/gems/ast.rbi +48 -0
- data/sorbet/rbi/gems/byebug.rbi +1040 -0
- data/sorbet/rbi/gems/coderay.rbi +92 -0
- data/sorbet/rbi/gems/crack.rbi +48 -0
- data/sorbet/rbi/gems/domain_name.rbi +52 -0
- data/sorbet/rbi/gems/dotenv.rbi +68 -0
- data/sorbet/rbi/gems/ffi-compiler.rbi +27 -0
- data/sorbet/rbi/gems/ffi.rbi +560 -0
- data/sorbet/rbi/gems/hashdiff.rbi +66 -0
- data/sorbet/rbi/gems/http-cookie.rbi +93 -0
- data/sorbet/rbi/gems/http-form_data.rbi +76 -0
- data/sorbet/rbi/gems/http-parser.rbi +121 -0
- data/sorbet/rbi/gems/http.rbi +616 -0
- data/sorbet/rbi/gems/jaro_winkler.rbi +15 -0
- data/sorbet/rbi/gems/method_source.rbi +64 -0
- data/sorbet/rbi/gems/parallel.rbi +82 -0
- data/sorbet/rbi/gems/parser.rbi +857 -0
- data/sorbet/rbi/gems/pry-byebug.rbi +155 -0
- data/sorbet/rbi/gems/pry.rbi +1965 -0
- data/sorbet/rbi/gems/public_suffix.rbi +104 -0
- data/sorbet/rbi/gems/rainbow.rbi +118 -0
- data/sorbet/rbi/gems/rake.rbi +646 -0
- data/sorbet/rbi/gems/rspec-core.rbi +1732 -0
- data/sorbet/rbi/gems/rspec-expectations.rbi +388 -0
- data/sorbet/rbi/gems/rspec-mocks.rbi +820 -0
- data/sorbet/rbi/gems/rspec-support.rbi +269 -0
- data/sorbet/rbi/gems/rspec.rbi +15 -0
- data/sorbet/rbi/gems/rubocop-performance.rbi +277 -0
- data/sorbet/rbi/gems/rubocop-rspec.rbi +887 -0
- data/sorbet/rbi/gems/rubocop.rbi +6952 -0
- data/sorbet/rbi/gems/ruby-progressbar.rbi +305 -0
- data/sorbet/rbi/gems/unf.rbi +19 -0
- data/sorbet/rbi/gems/unicode-display_width.rbi +17 -0
- data/sorbet/rbi/gems/vcr.rbi +572 -0
- data/sorbet/rbi/gems/webmock.rbi +569 -0
- data/sorbet/rbi/hidden-definitions/errors.txt +11809 -0
- data/sorbet/rbi/hidden-definitions/hidden.rbi +20627 -0
- data/sorbet/rbi/sorbet-typed/lib/bundler/all/bundler.rbi +8684 -0
- data/sorbet/rbi/sorbet-typed/lib/rainbow/all/rainbow.rbi +276 -0
- data/sorbet/rbi/sorbet-typed/lib/ruby/all/gem.rbi +4222 -0
- data/sorbet/rbi/sorbet-typed/lib/ruby/all/open3.rbi +111 -0
- data/sorbet/rbi/sorbet-typed/lib/ruby/all/resolv.rbi +543 -0
- data/sorbet/rbi/todo.rbi +11 -0
- metadata +339 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5de01e56315ab3e8fdab17da4ac986c6a0e8a28cea8ca4f12c6d3fe9d72d4b2b
|
4
|
+
data.tar.gz: fa31df63741d89de3b94f23ecd4de85e6de934dffc65dbcdebf41bf8469776be
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c49a7abd36e48c1f3bbe90e39343db5468737f70f5b626b061234e728981308b16fe236fc8168daf49a415b90f2f8c98354b7990db8aea3c5062bad2b712649e
|
7
|
+
data.tar.gz: fbb67a2d10e7a6fb7f4145babe1d6b7a50e2625c7d50140c250f48a7972c803a852eaa5905539c4f16f9f90f109fc80789382593fac241094454fcab8f71c205
|
data/.env.example
ADDED
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-performance
|
3
|
+
- rubocop-rspec
|
4
|
+
|
5
|
+
AllCops:
|
6
|
+
TargetRubyVersion: 2.5
|
7
|
+
Exclude:
|
8
|
+
- bin/**/*
|
9
|
+
|
10
|
+
Layout/AlignParameters:
|
11
|
+
EnforcedStyle: with_fixed_indentation
|
12
|
+
|
13
|
+
Layout/DotPosition:
|
14
|
+
EnforcedStyle: trailing
|
15
|
+
|
16
|
+
Layout/EndAlignment:
|
17
|
+
AutoCorrect: true
|
18
|
+
EnforcedStyleAlignWith: variable
|
19
|
+
|
20
|
+
Layout/IndentFirstArrayElement:
|
21
|
+
EnforcedStyle: consistent
|
22
|
+
|
23
|
+
Layout/MultilineMethodCallIndentation:
|
24
|
+
EnforcedStyle: indented
|
25
|
+
|
26
|
+
Layout/MultilineOperationIndentation:
|
27
|
+
EnforcedStyle: indented
|
28
|
+
|
29
|
+
Lint/AmbiguousBlockAssociation:
|
30
|
+
Exclude:
|
31
|
+
- spec/**/*
|
32
|
+
|
33
|
+
Metrics/BlockLength:
|
34
|
+
Exclude:
|
35
|
+
- dear_inventory.gemspec
|
36
|
+
- spec/**/*
|
37
|
+
|
38
|
+
RSpec/BeforeAfterAll:
|
39
|
+
Enabled: false
|
40
|
+
|
41
|
+
RSpec/ExampleLength:
|
42
|
+
Max: 10
|
43
|
+
|
44
|
+
RSpec/MultipleExpectations:
|
45
|
+
Enabled: false
|
46
|
+
|
47
|
+
RSpec/NestedGroups:
|
48
|
+
Max: 4
|
49
|
+
|
50
|
+
RSpec/FilePath:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
Security/Eval:
|
54
|
+
Enabled: false
|
55
|
+
|
56
|
+
Style/Documentation:
|
57
|
+
Enabled: false
|
58
|
+
|
59
|
+
Style/GuardClause:
|
60
|
+
Enabled: false
|
61
|
+
|
62
|
+
Style/LambdaCall:
|
63
|
+
Enabled: false
|
64
|
+
|
65
|
+
Style/NegatedIf:
|
66
|
+
Enabled: false
|
67
|
+
|
68
|
+
Style/RaiseArgs:
|
69
|
+
Enabled: false
|
70
|
+
|
71
|
+
Style/Send:
|
72
|
+
Enabled: true
|
73
|
+
|
74
|
+
Style/StringLiterals:
|
75
|
+
EnforcedStyle: double_quotes
|
76
|
+
|
77
|
+
Style/StringLiteralsInInterpolation:
|
78
|
+
EnforcedStyle: double_quotes
|
79
|
+
|
80
|
+
Style/TrailingCommaInArrayLiteral:
|
81
|
+
EnforcedStyleForMultiline: consistent_comma
|
82
|
+
|
83
|
+
Style/TrailingCommaInHashLiteral:
|
84
|
+
EnforcedStyleForMultiline: consistent_comma
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at development@hashnotadam.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 Adam Rice
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
# DearInventory
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/dear_inventory`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem "dear_inventory"
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install dear_inventory
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
Before you begin, you will need to setup API credentials in DEAR Inventory at
|
26
|
+
https://inventory.dearsystems.com/ExternalApi
|
27
|
+
|
28
|
+
Next you need to supply your API credentials:
|
29
|
+
```ruby
|
30
|
+
require "dear_inventory"
|
31
|
+
|
32
|
+
DearInventory.configure do |config|
|
33
|
+
config.account_id = "account_id"
|
34
|
+
config.key = "key"
|
35
|
+
end
|
36
|
+
```
|
37
|
+
|
38
|
+
## Development
|
39
|
+
|
40
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
41
|
+
|
42
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push
|
43
|
+
git commits and tags, and push the `.gem` file to
|
44
|
+
[rubygems.org](https://rubygems.org).
|
45
|
+
|
46
|
+
Since it is necessary to authenticate with DEAR Inventory to test API resources,
|
47
|
+
credentials are required. The dotenv gem is loaded when tests are run and will
|
48
|
+
look for a .env file in the root directory. A .env.example file has been
|
49
|
+
supplied so you copy it to .env and replace the example values:
|
50
|
+
|
51
|
+
```sh
|
52
|
+
cp .env.example .env
|
53
|
+
```
|
54
|
+
|
55
|
+
## Contributing
|
56
|
+
|
57
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/HashNotAdam/dear_inventory. This project is intended to be a safe, welcoming
|
58
|
+
space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
59
|
+
|
60
|
+
## License
|
61
|
+
|
62
|
+
The gem is available as open source under the terms of the
|
63
|
+
[MIT License](https://opensource.org/licenses/MIT).
|
64
|
+
|
65
|
+
## Code of Conduct
|
66
|
+
|
67
|
+
Everyone interacting in the DearInventory project’s codebases, issue trackers,
|
68
|
+
chat rooms and mailing lists is expected to follow the
|
69
|
+
[code of conduct](https://github.com/HashNotAdam/dear_inventory/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "dear_inventory"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path("lib", __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require "dear_inventory/version"
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = "dear_inventory"
|
9
|
+
spec.version = DearInventory::VERSION
|
10
|
+
spec.authors = ["Adam Rice"]
|
11
|
+
spec.email = ["development@hashnotadam.com"]
|
12
|
+
|
13
|
+
spec.summary = "Library for connecting to the DEAR Inventory API"
|
14
|
+
spec.description = "Works with V2 of the DEAR Systems / DEAR Inventory " \
|
15
|
+
"API as seen at https://dearinventory.docs.apiary.io/"
|
16
|
+
spec.homepage = "https://morningcoffee.com.au"
|
17
|
+
spec.license = "MIT"
|
18
|
+
|
19
|
+
spec.required_ruby_version = ">= 2.5.0"
|
20
|
+
spec.required_rubygems_version = ">= 1.8.11"
|
21
|
+
|
22
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
23
|
+
`git ls-files -z`.
|
24
|
+
split("\x0").
|
25
|
+
reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
+
end
|
27
|
+
spec.bindir = "exe"
|
28
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
|
+
spec.require_paths = ["lib"]
|
30
|
+
|
31
|
+
spec.add_dependency "http", ">= 4.0.0", "< 5.0"
|
32
|
+
spec.add_dependency "sorbet-runtime"
|
33
|
+
|
34
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
35
|
+
spec.add_development_dependency "dotenv"
|
36
|
+
spec.add_development_dependency "pry-byebug"
|
37
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
38
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
39
|
+
spec.add_development_dependency "rubocop", "~> 0.71"
|
40
|
+
spec.add_development_dependency "rubocop-performance"
|
41
|
+
spec.add_development_dependency "rubocop-rspec"
|
42
|
+
spec.add_development_dependency "sorbet"
|
43
|
+
spec.add_development_dependency "vcr"
|
44
|
+
spec.add_development_dependency "webmock"
|
45
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# typed: strong
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "http"
|
5
|
+
require "sorbet-runtime"
|
6
|
+
|
7
|
+
require "dear_inventory/config"
|
8
|
+
require "dear_inventory/environment"
|
9
|
+
|
10
|
+
require "dear_inventory/error"
|
11
|
+
require "dear_inventory/errors/request"
|
12
|
+
require "dear_inventory/errors/validation"
|
13
|
+
|
14
|
+
require "dear_inventory/lib/endpoint_class"
|
15
|
+
require "dear_inventory/lib/is_a_subclass"
|
16
|
+
|
17
|
+
require "dear_inventory/model"
|
18
|
+
require "dear_inventory/models/additional_attributes"
|
19
|
+
require "dear_inventory/models/additional_charge"
|
20
|
+
require "dear_inventory/models/address"
|
21
|
+
require "dear_inventory/models/attachment"
|
22
|
+
require "dear_inventory/models/inventory_movement"
|
23
|
+
require "dear_inventory/models/sale_list"
|
24
|
+
require "dear_inventory/models/sales/line"
|
25
|
+
require "dear_inventory/models/sales/invoice_line"
|
26
|
+
require "dear_inventory/models/sales/manual_journal_line"
|
27
|
+
require "dear_inventory/models/sales/manual_journal"
|
28
|
+
require "dear_inventory/models/sales/order"
|
29
|
+
require "dear_inventory/models/sales/payment_line"
|
30
|
+
require "dear_inventory/models/sales/quote"
|
31
|
+
require "dear_inventory/models/shipping_address"
|
32
|
+
require "dear_inventory/models/transaction"
|
33
|
+
require "dear_inventory/models/sales/fulfilments/pick_pack_line"
|
34
|
+
require "dear_inventory/models/sales/fulfilments/pick_pack"
|
35
|
+
require "dear_inventory/models/sales/fulfilments/ship_line"
|
36
|
+
require "dear_inventory/models/sales/fulfilments/ship"
|
37
|
+
require "dear_inventory/models/sales/fulfilment"
|
38
|
+
require "dear_inventory/models/sale_lists"
|
39
|
+
require "dear_inventory/models/sales/credit_note"
|
40
|
+
require "dear_inventory/models/sales/invoice"
|
41
|
+
require "dear_inventory/models/sale"
|
42
|
+
|
43
|
+
require "dear_inventory/validator"
|
44
|
+
require "dear_inventory/validators/boolean"
|
45
|
+
require "dear_inventory/validators/enum"
|
46
|
+
require "dear_inventory/validators/integer"
|
47
|
+
require "dear_inventory/validators/required"
|
48
|
+
require "dear_inventory/validators/string"
|
49
|
+
require "dear_inventory/validators/time"
|
50
|
+
|
51
|
+
require "dear_inventory/parameters"
|
52
|
+
require "dear_inventory/parameters/sale/index"
|
53
|
+
require "dear_inventory/parameters/sale_list/index"
|
54
|
+
|
55
|
+
require "dear_inventory/resource"
|
56
|
+
require "dear_inventory/resources/sale"
|
57
|
+
require "dear_inventory/resources/sale_list"
|
58
|
+
|
59
|
+
require "dear_inventory/response"
|
60
|
+
|
61
|
+
require "dear_inventory/version"
|
62
|
+
|
63
|
+
module DearInventory
|
64
|
+
extend T::Sig
|
65
|
+
|
66
|
+
@config = T.let(Config.new, Config)
|
67
|
+
|
68
|
+
class << self
|
69
|
+
extend T::Sig
|
70
|
+
|
71
|
+
sig { returns(Config) }
|
72
|
+
attr_reader :config
|
73
|
+
|
74
|
+
sig { params(block: T.proc.params(config: Config).void).void }
|
75
|
+
def configure(&block)
|
76
|
+
yield config
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|