bigcommerce_api 0.6.2 → 0.6.3

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
  SHA1:
3
- metadata.gz: 34769ffea0359f1f9a04ea1d72a88ea3e71b3aa2
4
- data.tar.gz: 35465d8fd5ac884171670fff9376b7229131f3e8
3
+ metadata.gz: 01abb5cc7c76c570309b4e94698f1c24e4a5c59f
4
+ data.tar.gz: a6a7cd9349a3092e189a9642c5d71a7692409bb1
5
5
  SHA512:
6
- metadata.gz: fc64c1c91bd8f9fe5c59775f00ddf897ac2fb21ed480a99592e6a4f86f187e2f8d62512ffc977291488833d21318b4791beea4d62191414e23c543510eefb464
7
- data.tar.gz: 231af73c8d64a31050d32f981022f0a14257f4e4e887b9d38865e2dc4e2b0d5e6530ca6e3d85c1fa68739ab392a70f67f91000eb77af7d144fda506450a938c6
6
+ metadata.gz: 94507ff8220f1d9785d0dbd72c38b84c6cd175c01672b883cd0cade6d3604aeddca24da80affd2a825e73c6a7e0ce19c1d604f65465c6d67e59ca7394669b706
7
+ data.tar.gz: 2ababf2435e4cebd995a33209b0f0dc54436afb85407d0eac6fb005810c554bb1f4fb06849283a7691579a1c61e9e99f770a388e782404da2ad76cf26d5de3b3
data/README.md CHANGED
@@ -47,7 +47,7 @@ api = BigcommerceAPI::Base.new(
47
47
  )
48
48
  ```
49
49
 
50
- Or using the new OAuth credentials (currently in Alpha at Bigcommerce):
50
+ Or using the new OAuth credentials:
51
51
  ```
52
52
  api = BigcommerceAPI::Base.new(
53
53
  :client_id => APP_CLIENT_ID,
@@ -59,11 +59,17 @@ api = BigcommerceAPI::Base.new(
59
59
  You can test your connection by getting the time
60
60
 
61
61
  ```
62
- BigcommerceAPI::Base.get_time
62
+ api.time
63
63
  ```
64
64
 
65
65
  A valid time means your connection and credentials are good.
66
66
 
67
+ You can also get your store info settings via the 'api' instance:
68
+
69
+ ```
70
+ api.store
71
+ ```
72
+
67
73
  ### Usage
68
74
 
69
75
  The API currently gives you read/write access to MOST of your Big Commerce API V2 resources (https://developer.bigcommerce.com/docs/api/v2)
@@ -27,9 +27,14 @@ module BigcommerceAPI
27
27
  end
28
28
 
29
29
  def option_value
30
- option_id = self.product_option.option_id
31
- ov = BigcommerceAPI::Base.get '/options/' + option_id.to_s + '/values/' + self.option_value_id.to_s
32
- (ov.success? and !ov.nil?) ? OptionValue.new(ov) : nil
30
+ po = self.product_option
31
+ if po # we've got to have a product option for this to work
32
+ option_id = po.option_id
33
+ ov = BigcommerceAPI::Base.get '/options/' + option_id.to_s + '/values/' + self.option_value_id.to_s
34
+ (ov.success? and !ov.nil?) ? OptionValue.new(ov) : nil
35
+ else
36
+ return nil
37
+ end
33
38
  end
34
39
 
35
40
  def description
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigcommerce_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Dickson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-27 00:00:00.000000000 Z
11
+ date: 2015-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport