ruby-brightpearl 0.3.0 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36879f9ba393e143164df763df4236de07986efca7a99a7d2267e87015aa74e2
4
- data.tar.gz: 56674204c47ed147f9e8798b598f90b6c98320a5c29859112036c563d5b7c480
3
+ metadata.gz: 898c21eda2183ad39766aed1a0973d4d3501df69c572bedc50cbe55497de8bfc
4
+ data.tar.gz: 6f9bcc5638f5fdce7f58f0d6d0a7f8611d86ff3b5a89dd0bd447b036bdf6a73b
5
5
  SHA512:
6
- metadata.gz: fe7b11761a9aa7f475f694e249c1c6bf674fbf119c31efedc0225fa5265acfbbd9b21ee16ec240aa9916f03e38696ea5380d1762b181430e8e88a43a6fcd6c7b
7
- data.tar.gz: 35042bea78d916efe48dd23d7c7d2495f39c39b4445bce7043eca7701982bfc878a01e749df170f7fb64ae135fe25fbcd17bc24307a46ee1658c5fa6425e3665
6
+ metadata.gz: 523f4ca185fff9c6622cbb06e32469eb95f039d878ebe015fe1631926d9f17c54b5285aa5338397a7bcfe6cd35509b2f96536b93617e1640c28d222be91b2085
7
+ data.tar.gz: bd89d6e7a680e41092cb74d3f9be7a47870bf71a5de4017401f8845f25ac835db959d9fd614ae03dd8d9f7580e4de664d3cf1d37a1e5b2cf12240e70d329ce6a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.3.0] - 2022-02-03
4
+ - New resource TaxCode
5
+ - Fix minor typos
6
+ - New optional config `debug_mode`
3
7
  ## [0.3.0] - 2022-02-03
4
8
  - New resource ProductAvailability
5
9
  ## [0.2.0] - 2022-02-02
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-brightpearl (0.3.0)
4
+ ruby-brightpearl (0.4.0)
5
5
  httparty (~> 0.20)
6
6
 
7
7
  GEM
@@ -46,7 +46,7 @@ module Brightpearl
46
46
  puts "Unrecognized http method"
47
47
  end
48
48
 
49
- puts url
49
+ puts url if Brightpearl.config.debug_mode
50
50
  json = JSON.parse(response.body)
51
51
 
52
52
  if response.code == 503 # Unavailable MOST likeyly throttled
@@ -12,5 +12,7 @@ module Brightpearl
12
12
  attr_accessor :token # API token
13
13
  attr_accessor :api_domain # API URL base. Depends on instance region. Obtained after auth process
14
14
  attr_accessor :refresh_token # API refresh token
15
+
16
+ attr_accessor :debug_mode # Display log data for request done when true
15
17
  end
16
18
  end
@@ -9,8 +9,6 @@ module Brightpearl
9
9
  else
10
10
  super(msg)
11
11
  end
12
- puts @code
13
- puts error
14
12
  @response = response
15
13
  @status = status
16
14
  end
@@ -3,7 +3,7 @@ module Brightpearl
3
3
  extend Brightpearl::APIOperations::Get
4
4
  class << self
5
5
  def resource_path
6
- "warehouse-service/product-availability/"
6
+ "warehouse-service/product-availability"
7
7
  end
8
8
 
9
9
  # https://api-docs.brightpearl.com/warehouse/product-availability/get.html
@@ -0,0 +1,21 @@
1
+ module Brightpearl
2
+ class TaxCode < Resource
3
+ extend Brightpearl::APIOperations::Get
4
+ class << self
5
+ def resource_path
6
+ "accounting-service/tax-code"
7
+ end
8
+
9
+ def get(id_set = nil)
10
+ if id_set
11
+ super
12
+ else
13
+ super(nil)
14
+ end
15
+ end
16
+
17
+ # https://api-docs.brightpearl.com/accounting/tax-code/get.html
18
+
19
+ end
20
+ end
21
+ end
@@ -7,4 +7,6 @@ require 'brightpearl/resources/order_status_update'
7
7
  require 'brightpearl/resources/product'
8
8
  require 'brightpearl/resources/product_price'
9
9
  require 'brightpearl/resources/price_list'
10
- require 'brightpearl/resources/product_availability'
10
+ require 'brightpearl/resources/product_availability'
11
+ # Accounting
12
+ require 'brightpearl/resources/tax_code'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Brightpearl
4
- VERSION = "0.3.0"
4
+ VERSION = "0.4.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-brightpearl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - vicvans20
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-04 00:00:00.000000000 Z
11
+ date: 2022-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -105,6 +105,7 @@ files:
105
105
  - lib/brightpearl/resources/product.rb
106
106
  - lib/brightpearl/resources/product_availability.rb
107
107
  - lib/brightpearl/resources/product_price.rb
108
+ - lib/brightpearl/resources/tax_code.rb
108
109
  - lib/brightpearl/version.rb
109
110
  - playground.rb
110
111
  - ruby-brightpearl.gemspec