huginn_bigcommerce_order_agent 1.2.1 → 1.2.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/client/order.rb +1 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: edd812483c158f12efa42c997a1d6127aef5d234c2d31d910a050e86977a46f1
4
- data.tar.gz: 4ef80e0657ae5673b0ddf356cbae6f2c14566ad1b2237eabd58b7720e37fc159
3
+ metadata.gz: '09bfbbea724149d71835325269ab6beca607203e3aa59b19ffb7fe5002167915'
4
+ data.tar.gz: 0bc134b1ce9b614cedeb52d63e4655253dec28153c2024e60e28313e4847eee9
5
5
  SHA512:
6
- metadata.gz: 23631ce1f2cb8e3c364be40ec6c9df05fd5c50de5b47648a60235f7109e372acc20882b9e280589645923884c1eafb179d6be7444655618551edee9f3a612e95
7
- data.tar.gz: 7ce3b54953402a26e39471c655553cd6d3eafdc91a9c0979100defba9f7648b65d04552c11a2216cf53c2f21dd2ae512023bd28fbe65b562ec58d57ec21295f1
6
+ metadata.gz: 6a0f4a8d05f093e1a43df25ae5ed06e1d533244bc9621a5a3869dfd43e680e35f9c579d9144dc52847e74558539935fa940c77765a6426719316e576a665c2a0
7
+ data.tar.gz: 2f77e9272d753232f24e26ec6f1b174ec0f81e4e6b021c054bdcad4bfcd47f699226015e5f6953081f4d815bf8fc35cf26facd793523cfaa7262148208123a70
data/lib/client/order.rb CHANGED
@@ -150,7 +150,7 @@ module BigcommerceOrderAgent
150
150
  # Returns the region (state) code for the provided address
151
151
  def get_region_code(address)
152
152
  country = Country.named(address['country'])
153
- state = country.subregions.named(address['state'])
153
+ state = country.nil? ? nil : country.subregions.named(address['state'])
154
154
 
155
155
  # For cases where a matching state is not found, default to the `state`
156
156
  # value on the address. (This is not uncommon for international addresses)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: huginn_bigcommerce_order_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - 5 Stones
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-21 00:00:00.000000000 Z
11
+ date: 2022-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler