bigcommerce-oauth-api 1.4.0 → 1.4.1

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: a484aad29a21d82ebb61dc10ad1051c174af5e64
4
- data.tar.gz: 84be7bae67c690f8f40e735af3862c1a9dfab2e1
3
+ metadata.gz: 7ba098105b05e84a8943eb2bdea8c55f535a6d79
4
+ data.tar.gz: 39b16841f846996dec05b66059de51c5ac0b2ac5
5
5
  SHA512:
6
- metadata.gz: 3508631521b911e5b7956bdd5cbe1387551b036348b09f6209ad5de061b86e0cbed6a24e422ddb0ddeee56186cb8e1de5a29ad0a445086c022837ca0a13b5010
7
- data.tar.gz: 6ca92909b5b6cd1edc34bd9f98e11e5073490c4739f0d7412971e960f13a9988de4031e8ef234d084a61190ea8e5a439a74aa670640dbc51d45c1badd6600dde
6
+ metadata.gz: 8a577194ff7933ebc652065cde142d1ea163a42beff6453fb5d3f2437fafffe350396944068ad6a353df024a342846da24084c3865e05c3bbdaa0b18e3dba732
7
+ data.tar.gz: deb9bc17ce5806bc6425d3c21c862d187942b369a09ade027f390d23e8cf10053aa34705f9cd4a2492492ba419d57964012beb9f3926960312454c7411dead08
@@ -1,3 +1,14 @@
1
+ ### 1.4.1 (2017-06-25)
2
+
3
+ Features:
4
+
5
+ - added shipping zone api
6
+
7
+ Bugfixes:
8
+
9
+ - fixed shipping method api
10
+ - fixed links to official api documentation
11
+
1
12
  ### 1.4.0 (2016-10-09)
2
13
 
3
14
  Features:
data/README.md CHANGED
@@ -122,84 +122,46 @@ The following APIs are currently supported:
122
122
 
123
123
  API | Gem Version | Official Documentation
124
124
  --- | --- | ---
125
- blog post | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/blog/posts
126
- blog tag | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/blog/tags
127
- brand api | 1.1.0 | https://developer.bigcommerce.com/api/stores/v2/brands
128
- bulk pricing (discount rules) | 1.1.0 | https://developer.bigcommerce.com/api/stores/v2/products/discount_rules
129
- category | 1.1.0 | https://developer.bigcommerce.com/api/stores/v2/categories
130
- customer api | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/customers
131
- customer address | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/customers/addresses
132
- customer group | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/customer_groups
133
- geography country | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/countries
134
- geography state | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/countries/states
135
- marketing banner | 1.4.0 | https://developer.bigcommerce.com/api/stores/v2/banners
136
- marketing coupon | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/coupons
137
- marketing gift certificate | 1.4.0 | https://developer.bigcommerce.com/api/stores/v2/gift_certificates
138
- option | 1.1.0 | https://developer.bigcommerce.com/api/stores/v2/options
139
- option set | 1.1.0 | https://developer.bigcommerce.com/api/stores/v2/option_sets
140
- option set option | 1.1.0 | https://developer.bigcommerce.com/api/stores/v2/option_sets/options
141
- option value | 1.2.0 | https://developer.bigcommerce.com/api/stores/v2/options/values
142
- order | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/orders
143
- order coupon | 1.2.0 | https://developer.bigcommerce.com/api/stores/v2/orders/coupons
144
- order message | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/orders/messages
145
- order product | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/orders/products
146
- order shipment | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/orders/shipments
147
- order shipping address | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/orders/shipping_addresses
125
+ blog post | 1.0.2 | https://developer.bigcommerce.com/api/v2/#blog-posts
126
+ blog tag | 1.0.2 | https://developer.bigcommerce.com/api/v2/#blog-tags
127
+ brand api | 1.1.0 | https://developer.bigcommerce.com/api/v2/#brands
128
+ bulk pricing (discount rules) | 1.1.0 | https://developer.bigcommerce.com/api/v2/#bulk-pricing
129
+ category | 1.1.0 | https://developer.bigcommerce.com/api/v2/#categories
130
+ customer api | 1.0.2 | https://developer.bigcommerce.com/api/v2/#customers-2
131
+ customer address | 1.0.2 | https://developer.bigcommerce.com/api/v2/#customer-addresses
132
+ customer group | 1.0.2 | https://developer.bigcommerce.com/api/v2/#customer-groups
133
+ geography country | 1.0.2 | https://developer.bigcommerce.com/api/v2/#countries
134
+ geography state | 1.0.2 | https://developer.bigcommerce.com/api/v2/#states
135
+ marketing banner | 1.4.0 | https://developer.bigcommerce.com/api/v2/#banners
136
+ marketing coupon | 1.0.2 | https://developer.bigcommerce.com/api/v2/#coupons
137
+ marketing gift certificate | 1.4.0 | https://developer.bigcommerce.com/api/v2/#gift-certificates
138
+ option | 1.1.0 | https://developer.bigcommerce.com/api/v2/#options
139
+ option set | 1.1.0 | https://developer.bigcommerce.com/api/v2/#option-sets
140
+ option set option | 1.1.0 | https://developer.bigcommerce.com/api/v2/#option-set-options
141
+ option value | 1.2.0 | https://developer.bigcommerce.com/api/v2/#option-values
142
+ order | 1.0.2 | https://developer.bigcommerce.com/api/v2/#orders-2
143
+ order coupon | 1.2.0 | https://developer.bigcommerce.com/api/v2/#order-coupons
144
+ order message | 1.0.2 | https://developer.bigcommerce.com/api/v2/#order-messages
145
+ order product | 1.0.2 | https://developer.bigcommerce.com/api/v2/#order-products-2
146
+ order shipment | 1.0.2 | https://developer.bigcommerce.com/api/v2/#shipments
147
+ order shipping address | 1.0.2 | https://developer.bigcommerce.com/api/v2/#order-shipping-addresses
148
148
  order statuses | 1.2.0 | https://developer.bigcommerce.com/api/stores/v2/order_statuses
149
- order tax | 1.2.0 | https://developer.bigcommerce.com/api/stores/v2/orders/taxes
150
- payment method | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/payments/methods
151
- product | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/products
152
- product configurable field | 1.1.0 | https://developer.bigcommerce.com/api/stores/v2/products/configurable_fields
153
- product custom field | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/products/custom_fields
154
- product googleproductsearch | 1.1.0 | https://developer.bigcommerce.com/api/stores/v2/products/googleproductsearch
155
- product image | 1.1.0 | https://developer.bigcommerce.com/api/stores/v2/products/images
156
- product option | 1.1.0 | https://developer.bigcommerce.com/api/stores/v2/products/options
157
- product review | 1.1.0 | https://developer.bigcommerce.com/api/stores/v2/products/reviews
158
- product rules | 1.1.0 | https://developer.bigcommerce.com/api/stores/v2/products/rules
159
- product video | 1.1.0 | https://developer.bigcommerce.com/api/stores/v2/products/videos
160
- product SKU | 1.1.0 | https://developer.bigcommerce.com/api/stores/v2/products/skus
161
- redirect | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/redirects
162
- shipping method api | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/shipping/methods
163
- store information | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/store_information
164
- system (time) | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/time
165
- tax class | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/tax_classes
166
- web hook | 1.0.2 | https://developer.bigcommerce.com/api/stores/v2/webhooks
167
-
168
- Getting an OAuth Access Token
169
- -------------
170
- The Bigcommerce API focused on making OAuth available for 3rd party development through Apps.
171
- Bigcommerce currently recommends using basic authentication when developing custom (private) integrations for your webshop.
172
-
173
- However, it is actually possible to aquire access tokens without publishing an App for Bigcommerce by following these steps:
174
-
175
- 1. Go to http://developer.bigcommerce.com
176
-
177
- 2. Login with the same user as the webshop you want to create a token for.
178
-
179
- 3. Go to "My Apps" and create dummy app (maybe call it "Authentication App")
180
-
181
- 4. Select the APIs you need and set the Auth Callback Url.
182
- * This needs to be a HTTPS Url where you can read incomming GET request
183
-
184
- 5. Go to your webshop and click on "Apps"
185
-
186
- 6. Select the tab "My Drafts" (which should contain your "Authentication App")
187
-
188
- 7. Install the "Authentication App" in your webshop.
189
- * This triggers a callback to your "Auth Callback Url" where you receive a code which can be exchanged for a token.
190
-
191
- 8. Send a POST request containing the following parameters (to https://login.bigcommerce.com/oauth2/token):
192
- * client_id (can be found under "My Apps" at developer.bigcommerce.com
193
- * client_secret (can be found under "My Apps" at developer.bigcommerce.com
194
- * code (is received in the "Auth Callback")
195
- * scope (is received in the "Auth Callback")
196
- * grant_type (is always authorization_code)
197
- * redirect_uri (your "Auth Callback Url")
198
- * context (is "stores/{your store hash / id}")
199
-
200
- 9. Done! The response returns your OAuth Access Token.
201
-
202
- If you are experiencing problems with the POST call try using the folllowing curl command
203
- ```
204
- curl --data "[YOUR POST PARAMETERS]" https://login.bigcommerce.com/oauth2/token
205
- ```
149
+ order tax | 1.2.0 | https://developer.bigcommerce.com/api/v2/#order-taxes
150
+ payment method | 1.0.2 | https://developer.bigcommerce.com/api/v2/#payment-methods
151
+ product | 1.0.2 | https://developer.bigcommerce.com/api/v2/#products
152
+ product configurable field | 1.1.0 | https://developer.bigcommerce.com/api/v2/#configurable-fields
153
+ product custom field | 1.0.2 | https://developer.bigcommerce.com/api/v2/#custom-fields
154
+ product googleproductsearch | 1.1.0 | https://developer.bigcommerce.com/api/v2/#google-product-search-mapping-object-properties
155
+ product image | 1.1.0 | https://developer.bigcommerce.com/api/v2/#product-images
156
+ product option | 1.1.0 | https://developer.bigcommerce.com/api/v2/#product-options
157
+ product review | 1.1.0 | https://developer.bigcommerce.com/api/v2/#product-reviews
158
+ product rules | 1.1.0 | https://developer.bigcommerce.com/api/v2/#product-rules
159
+ product video | 1.1.0 | https://developer.bigcommerce.com/api/v2/#videos
160
+ product SKU | 1.1.0 | https://developer.bigcommerce.com/api/v2/#skus
161
+ redirect | 1.0.2 | https://developer.bigcommerce.com/api/v2/#redirects
162
+ shipping method api | 1.0.2 | https://developer.bigcommerce.com/api/v2/#shipping-methods-reference
163
+ shipping zone api | 1.4.1 | https://developer.bigcommerce.com/api/v2/#shipping-zones-reference
164
+ store information | 1.0.2 | hhttps://developer.bigcommerce.com/api/v2/#store-information-reference
165
+ system (time) | 1.0.2 | https://developer.bigcommerce.com/api/v2/#system-reference
166
+ tax class | 1.0.2 | https://developer.bigcommerce.com/api/v2/#tax-class-reference
167
+ web hook | 1.0.2 | https://developer.bigcommerce.com/api/#webhook-object-properties
@@ -3,7 +3,7 @@ require File.expand_path('../lib/bigcommerce-oauth-api/version', __FILE__)
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'bigcommerce-oauth-api'
5
5
  s.version = BigcommerceOAuthAPI::VERSION.dup
6
- s.date = '2016-10-09'
6
+ s.date = '2017-06-25'
7
7
  s.summary = "Ruby client library for Bigcommerce APIs with OAuth and basic authentication support"
8
8
  s.description = "Connect Ruby applications to Bigcommerce APIs through OAuth or basic authentication"
9
9
  s.authors = ["Christian Orthmann"]
@@ -57,34 +57,35 @@ module BigcommerceOAuthAPI
57
57
  :product_video => { api_module: :video, scope: :product, methods: [:all, :select, :create, :update, :delete, :count]},
58
58
  :product_sku => { api_module: :sku, scope: :product, methods: [:all, :select, :create, :update, :delete, :count]},
59
59
  :redirect => { api_module: :redirect, scope: :self, methods: [:all, :select, :create, :update, :delete, :count]},
60
- :shipping_method => { api_module: :method, scope: :self, methods: [:all, :select], prefix_paths: 'shipping', prefix_methods: 'shipping'},
60
+ :shipping_method => { api_module: :method, scope: :zone, methods: [:all, :select, :create, :update, :delete], prefix_paths: 'shipping', prefix_methods: 'shipping'},
61
+ :shipping_zones => { api_module: :zone, scope: :self, methods: [:all, :select, :create, :update, :delete], prefix_paths: 'shipping', prefix_methods: 'shipping'},
61
62
  :tax_class => { api_module: :tax_class, scope: :self, methods: [:all, :select]},
62
63
  :web_hook => { api_module: :hook, scope: :self, methods: [:all, :select, :create, :update, :delete], legacy: false }
63
64
 
64
65
  # @!method blog_posts(options = {})
65
66
  # @param [Hash] options the filters for the posts
66
- # gets a list of posts
67
+ # gets a list of blog posts
67
68
 
68
69
  # @!method blog_post(id, options = {})
69
70
  # @param [Integer] id the identifier for the post
70
- # gets the post with the given id
71
+ # gets the blog post with the given id
71
72
 
72
73
  # @!method create_blog_post(options = {})
73
74
  # @param [Hash] options the attributes for the post
74
- # creates a post with the given attributes
75
+ # creates a blog post with the given attributes
75
76
 
76
77
  # @!method update_blog_post(id, options = {})
77
78
  # @param [Integer] id the identifier for the post
78
79
  # @param [Hash] options the attributes for the post
79
- # updates the attributes of the post with the given id
80
+ # updates the attributes of the blog post with the given id
80
81
 
81
82
  # @!method delete_blog_post(id)
82
83
  # @param [Integer] id the identifier for the post
83
- # deletes the post with the given id
84
+ # deletes the blog post with the given id
84
85
 
85
86
  # @!method blog_tags(options = {})
86
87
  # @param [Hash] options the filters for the tags
87
- # gets a list of tags
88
+ # gets a list of blog tags
88
89
 
89
90
  # @!method brands(options = {})
90
91
  # @param [Hash] options the filters for the brands
@@ -516,7 +517,7 @@ module BigcommerceOAuthAPI
516
517
 
517
518
  # @!method payment_methods(options = {})
518
519
  # @param [Hash] options the filters for the methods
519
- # gets a list of methods
520
+ # gets a list of payment methods
520
521
 
521
522
  # @!method products(options = {})
522
523
  # @param [Hash] options the filters for the products
@@ -784,13 +785,52 @@ module BigcommerceOAuthAPI
784
785
  # @param [Hash] options the filters for the redirects
785
786
  # returns the number of redirects
786
787
 
787
- # @!method shipping_methods(options = {})
788
+ # @!method shipping_zone_methods(zone_id, options = {})
789
+ # @param [Integer] zone_id the identifier for the zone
788
790
  # @param [Hash] options the filters for the methods
789
- # gets a list of methods
791
+ # gets a list of shipping methods for the given shipping zone
790
792
 
791
- # @!method shipping_method(id, options = {})
793
+ # @!method shipping_zone_method(zone_id, id, options = {})
794
+ # @param [Integer] zone_id the identifier for the zone
792
795
  # @param [Integer] id the identifier for the method
793
- # gets the method with the given id
796
+ # gets the shipping method with the given id for the given shipping zone
797
+
798
+ # @!method create_shipping_zone_method(zone_id, options = {})
799
+ # @param [Integer] zone_id the identifier for the zone
800
+ # @param [Hash] options the attributes for the method
801
+ # creates a shipping method with the given attributes for the given shipping zone
802
+
803
+ # @!method update_shipping_zone_method(zone_id, id, options = {})
804
+ # @param [Integer] zone_id the identifier for the zone
805
+ # @param [Integer] id the identifier for the method
806
+ # @param [Hash] options the attributes for the method
807
+ # updates the attributes of the shipping method with the given id for the given shipping zone
808
+
809
+ # @!method delete_shipping_zone_method(zone_id, id)
810
+ # @param [Integer] zone_id the identifier for the zone
811
+ # @param [Integer] id the identifier for the method
812
+ # deletes the shipping method with the given id for the given shipping zone
813
+
814
+ # @!method shipping_zones(options = {})
815
+ # @param [Hash] options the filters for the zones
816
+ # gets a list of shipping zones
817
+
818
+ # @!method shipping_zone(id, options = {})
819
+ # @param [Integer] id the identifier for the zone
820
+ # gets the shipping zone with the given id
821
+
822
+ # @!method create_shipping_zone(options = {})
823
+ # @param [Hash] options the attributes for the zone
824
+ # creates a shipping zone with the given attributes
825
+
826
+ # @!method update_shipping_zone(id, options = {})
827
+ # @param [Integer] id the identifier for the zone
828
+ # @param [Hash] options the attributes for the zone
829
+ # updates the attributes of the shipping zone with the given id
830
+
831
+ # @!method delete_shipping_zone(id)
832
+ # @param [Integer] id the identifier for the zone
833
+ # deletes the shipping zone with the given id
794
834
 
795
835
  # @!method tax_classes(options = {})
796
836
  # @param [Hash] options the filters for the tax_classes
@@ -1,3 +1,3 @@
1
1
  module BigcommerceOAuthAPI
2
- VERSION = '1.4.0'.freeze
2
+ VERSION = '1.4.1'.freeze
3
3
  end
@@ -22,7 +22,7 @@ describe BigcommerceOAuthAPI::Client do
22
22
  { api_module: 'product', methods: [:all, :select, :create, :update, :delete, :count]},
23
23
  { api_module: 'coupon', methods: [:all, :select, :create, :update, :delete, :count]},
24
24
  { api_module: 'redirect', methods: [:all, :select, :create, :update, :delete, :count]},
25
- { api_module: 'method', methods: [:all, :select], prefix_paths: 'shipping', prefix_methods: 'shipping'},
25
+ { api_module: 'zone', methods: [:all, :select, :create, :update, :delete], prefix_paths: 'shipping', prefix_methods: 'shipping'},
26
26
  { api_module: 'tax_class', scope: :self, methods: [:all, :select]},
27
27
  { api_module: 'hook', methods: [:all, :select, :create, :update, :delete], legacy: false}
28
28
  ]. each do |api_description|
@@ -17,6 +17,7 @@ describe BigcommerceOAuthAPI::Client do
17
17
  { api_module: 'value', api_parent_module: 'option', methods: [:all, :select, :create, :update, :delete]},
18
18
  { api_module: 'discount_rule', api_parent_module: 'product', methods: [:all, :select, :create, :update, :delete, :count]},
19
19
  { api_module: 'image', api_parent_module: 'product', methods: [:all, :select, :create, :update, :delete, :count]},
20
+ { api_module: 'method', api_parent_module: 'zone', methods: [:all, :select, :create, :update, :delete], prefix_paths: 'shipping', prefix_methods: 'shipping'},
20
21
  { api_module: 'option', api_parent_module: 'product', methods: [:all, :select]},
21
22
  { api_module: 'review', api_parent_module: 'product', methods: [:all]},
22
23
  { api_module: 'rule', api_parent_module: 'product', methods: [:all, :select, :create, :update, :delete, :count]},
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigcommerce-oauth-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Orthmann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-09 00:00:00.000000000 Z
11
+ date: 2017-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake