diff --git a/README.md b/README.md index d2bb750..3b3aabc 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,14 @@ Veeqo::Company.info(connection: connection) => # ``` +### Nested Attributes + +To use nested attibutes you need add root key. + +```rb +Veeqo::Customer.create(customer: { email: 'customer@example.com', billing_address_attributes: { first_name: 'Phil', last_name: 'Reynolds' }}) +``` + ## Development diff --git a/lib/veeqo/resources/stock_entry.rb b/lib/veeqo/resources/stock_entry.rb index ddec42b..165df93 100644 --- a/lib/veeqo/resources/stock_entry.rb +++ b/lib/veeqo/resources/stock_entry.rb @@ -4,7 +4,7 @@ module Veeqo class StockEntry < Resource - include Veeqo::SubresourceActions.new(uri: 'sellables/%d/warehouses/%d/stock_entry', disable: %i[destroy destroy_all all find create]) + include Veeqo::SubresourceActions.new(uri: 'sellables/%d/warehouses/%d/stock_entry', disable: %i[destroy destroy_all all create]) property :allocated_stock_level property :available_stock_level property :id diff --git a/veeqo_api_ruby.gemspec b/veeqo_api_ruby.gemspec index 872a2b9..47025ea 100644 --- a/veeqo_api_ruby.gemspec +++ b/veeqo_api_ruby.gemspec @@ -25,9 +25,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec' spec.add_development_dependency 'rspec-nc' - spec.add_dependency 'faraday', '~> 0.13.1' + spec.add_dependency 'faraday', '~> 1.0.0' spec.add_dependency 'oj' - spec.add_dependency 'faraday_middleware', '~> 0.10.0' + spec.add_dependency 'faraday_middleware', '~> 1.0.0' spec.add_dependency 'hashie', '~> 3.4' - spec.add_dependency 'jwt', '~> 1.5.4' + spec.add_dependency 'jwt', '~> 2.2' end