bigcommerce 1.0.1 → 2.0.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.
Files changed (58) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +48 -27
  3. data/bigcommerce.gemspec +9 -10
  4. data/lib/bigcommerce/config.rb +16 -2
  5. data/lib/bigcommerce/connection.rb +6 -3
  6. data/lib/bigcommerce/exception.rb +13 -11
  7. data/lib/bigcommerce/middleware/auth.rb +14 -6
  8. data/lib/bigcommerce/middleware/http_exception.rb +9 -1
  9. data/lib/bigcommerce/path_builder.rb +44 -0
  10. data/lib/bigcommerce/request.rb +10 -30
  11. data/lib/bigcommerce/resource_actions.rb +8 -0
  12. data/lib/bigcommerce/resources/content/blog_post.rb +2 -0
  13. data/lib/bigcommerce/resources/content/blog_tag.rb +2 -0
  14. data/lib/bigcommerce/resources/content/redirect.rb +2 -0
  15. data/lib/bigcommerce/resources/customers/customer.rb +7 -3
  16. data/lib/bigcommerce/resources/customers/customer_address.rb +2 -0
  17. data/lib/bigcommerce/resources/customers/customer_group.rb +2 -0
  18. data/lib/bigcommerce/resources/geography/country.rb +2 -0
  19. data/lib/bigcommerce/resources/geography/state.rb +2 -0
  20. data/lib/bigcommerce/resources/marketing/banner.rb +2 -0
  21. data/lib/bigcommerce/resources/marketing/coupon.rb +2 -0
  22. data/lib/bigcommerce/resources/marketing/gift_certificates.rb +2 -0
  23. data/lib/bigcommerce/resources/orders/order.rb +10 -0
  24. data/lib/bigcommerce/resources/orders/order_coupon.rb +2 -0
  25. data/lib/bigcommerce/resources/orders/order_message.rb +2 -0
  26. data/lib/bigcommerce/resources/orders/order_product.rb +2 -0
  27. data/lib/bigcommerce/resources/orders/order_shipping_address.rb +2 -0
  28. data/lib/bigcommerce/resources/orders/order_status.rb +2 -0
  29. data/lib/bigcommerce/resources/orders/order_tax.rb +2 -0
  30. data/lib/bigcommerce/resources/orders/shipment.rb +2 -0
  31. data/lib/bigcommerce/resources/payments/payment_method.rb +2 -0
  32. data/lib/bigcommerce/resources/products/brand.rb +2 -0
  33. data/lib/bigcommerce/resources/products/bulk_pricing_rule.rb +2 -0
  34. data/lib/bigcommerce/resources/products/category.rb +2 -0
  35. data/lib/bigcommerce/resources/products/configurable_field.rb +2 -0
  36. data/lib/bigcommerce/resources/products/custom_field.rb +2 -0
  37. data/lib/bigcommerce/resources/products/google_product_search_mapping.rb +2 -0
  38. data/lib/bigcommerce/resources/products/option.rb +2 -0
  39. data/lib/bigcommerce/resources/products/option_set.rb +2 -0
  40. data/lib/bigcommerce/resources/products/option_set_option.rb +2 -0
  41. data/lib/bigcommerce/resources/products/option_value.rb +2 -0
  42. data/lib/bigcommerce/resources/products/product.rb +2 -0
  43. data/lib/bigcommerce/resources/products/product_image.rb +2 -0
  44. data/lib/bigcommerce/resources/products/product_option.rb +2 -0
  45. data/lib/bigcommerce/resources/products/product_review.rb +2 -0
  46. data/lib/bigcommerce/resources/products/product_rule.rb +2 -0
  47. data/lib/bigcommerce/resources/products/product_video.rb +2 -0
  48. data/lib/bigcommerce/resources/products/sku.rb +2 -0
  49. data/lib/bigcommerce/resources/resource.rb +2 -0
  50. data/lib/bigcommerce/resources/shipping/shipping_method.rb +2 -0
  51. data/lib/bigcommerce/resources/store/store_information.rb +2 -0
  52. data/lib/bigcommerce/resources/system/time.rb +2 -0
  53. data/lib/bigcommerce/resources/tax/tax_class.rb +2 -0
  54. data/lib/bigcommerce/resources/webhooks/webhook.rb +2 -0
  55. data/lib/bigcommerce/subresource_actions.rb +8 -0
  56. data/lib/bigcommerce/version.rb +3 -1
  57. data/lib/bigcommerce.rb +20 -11
  58. metadata +34 -47
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f89e22fe6e4042c5231912f0594eccc6e20cf2d2
4
- data.tar.gz: e72dc04e6ea9894c47740882e89edfc14ceb84ae
2
+ SHA256:
3
+ metadata.gz: b85e649ea8b069cb792e147e901165cd5f81c8975ac434bf0182d369d07f0eb7
4
+ data.tar.gz: 89e5a3dff01013f56c51bf8aa5eaa3ef21c0af3e8304ccd6b2d72e4315d5117f
5
5
  SHA512:
6
- metadata.gz: ab56f2ab83b837201fc23c4e749633b47702a0ef48d081854b14ce220760f130675200a1513f2a8ba516419a2cf44b2e2da120289ab458130de333e5756f8077
7
- data.tar.gz: b35e6c9009776ad58a0565d8d8785de254dfba5f1cadd10980c8c133d7fa70038485008c15bbcd6cf9f5f11f8e886b940c45ce269cb8e9a51e995207a70a53c9
6
+ metadata.gz: c715fd627a137ff3a2a3e18d230bab0eeb0e4622574c123f08391fa483b3f342c34c68d8e05377d4db824997d76aaebaf6cb82145ae209c7658422db4a0e19a9
7
+ data.tar.gz: 61ed2eaa4b6d5bb724ded917e40a881187523d0cb9df63c87833d2eaa109bc0c165e7bc0510dd5388f5016ea6313454d7947698827a0a9d55b6395780fab60f4
data/README.md CHANGED
@@ -1,13 +1,15 @@
1
1
  # BigCommerce API Ruby
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/bigcommerce.svg)](https://rubygems.org/gems/bigcommerce)
4
- [![Build Status](https://travis-ci.org/bigcommerce/bigcommerce-api-ruby.svg?branch=master)](https://travis-ci.org/bigcommerce/bigcommerce-api-ruby)
5
- [![Dependency Status](https://gemnasium.com/bigcommerce/bigcommerce-api-ruby.svg?travis)](https://gemnasium.com/bigcommerce/bigcommerce-api-ruby)
6
-
7
- This is the official BigCommerce API client to support our Stores API. You can find more information about becoming a BigCommerce developer here: [developer.bigcommerce.com](http://developer.bigcommerce.com).
4
+ [![CircleCI](https://circleci.com/gh/bigcommerce/bigcommerce-api-ruby/tree/master.svg?style=svg)](https://circleci.com/gh/bigcommerce/bigcommerce-api-ruby/tree/master)
5
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/d1ba1b74a2a74a26e8b4/test_coverage)](https://codeclimate.com/github/bigcommerce/bigcommerce-api-ruby/test_coverage)
6
+ [![Maintainability](https://api.codeclimate.com/v1/badges/d1ba1b74a2a74a26e8b4/maintainability)](https://codeclimate.com/github/bigcommerce/bigcommerce-api-ruby/maintainability)
8
7
 
8
+ This is the official BigCommerce API client to support our Stores API. You can find more information about becoming a
9
+ BigCommerce developer on the [docs site](https://docs.bigcommerce.com).
9
10
 
10
11
  ## Installation
12
+
11
13
  BigCommerce is available on [RubyGems](https://rubygems.org/gems/bigcommerce).
12
14
 
13
15
  ```sh
@@ -17,38 +19,41 @@ gem install bigcommerce
17
19
  You can also add it to your Gemfile.
18
20
 
19
21
  ```rb
20
- gem 'bigcommerce', '~> 1.0'
22
+ gem 'bigcommerce', '~> 2.0'
21
23
  ```
22
24
 
23
25
  ## Requirements
24
- - Ruby 2.0.0 or newer. Please refer to the `.travis.yml` to see which versions we officially support.
26
+
27
+ - Ruby 3.2 or newer
25
28
 
26
29
  ## Getting Started
30
+
27
31
  To make requests to our API, you must register as a developer and have your credentials ready.
28
32
 
29
- Also very important: For the OAuth authentication mechanism, the resources to which you have acccess depend on the scopes that the merchant has granted to your application. For more information about Store API scopes, see: [OAuth Scopes](https://developer.bigcommerce.com/api/scopes).
33
+ Also very important: For the OAuth authentication mechanism, the resources to which you have acccess depend on the
34
+ scopes that the merchant has granted to your application. For more information about Store API scopes,
35
+ see: [OAuth Scopes](https://docs.bigcommerce.com/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).
30
36
 
31
37
  ## Authentication
38
+
32
39
  We currently have two different authentication schemes that you can select, depending on your use case.
33
40
 
34
41
  ### OAuth
35
- OAuth apps can be submitted to [BigCommerce App Store](https://www.bigcommerce.com/apps), allowing other merchants to install these apps in their BigCommerce stores.
36
-
37
- __[More Information](https://developer.bigcommerce.com/api/using-oauth-intro)__
38
42
 
39
- ### Basic Authentication (Legacy)
40
- To develop a custom integration for one store, your app needs to use Basic Authentication.
43
+ OAuth apps can be submitted to [BigCommerce App Store](https://www.bigcommerce.com/apps), allowing other merchants to install these apps in their
44
+ BigCommerce stores.
41
45
 
42
- __[More Information](https://developer.bigcommerce.com/api/legacy/basic-auth)__
46
+ **[More Information](https://docs.bigcommerce.com/developer/docs/overview/api-fundamentals/api-accounts#authentication)**
43
47
 
44
48
  ## Configuration
49
+
45
50
  To authenticate your API client, you will need to configure the client like the following examples.
46
51
 
47
52
  ### OAuth App
48
53
 
49
- - ```client_id```: Obtained from the on the BigCommerce [Developer Portal's](http://developer.bigcommerce.com) "My Apps" section.
50
- - ```access_token```: Obtained after a token exchange in the auth callback.
51
- - ```store_hash```: Also obtained after the token exchange.
54
+ - `client_id`: Obtained from the on the BigCommerce [Developer Portal's](https://build.bigcommerce.com) Apps section.
55
+ - `access_token`: Obtained after a token exchange in the auth callback.
56
+ - `store_hash`: Also obtained after the token exchange.
52
57
 
53
58
  ```rb
54
59
  Bigcommerce.configure do |config|
@@ -60,7 +65,8 @@ end
60
65
 
61
66
  ### Basic Authentication (Legacy)
62
67
 
63
- To get all the basic auth credentials, simply visit your store admin page, and navigate to the `Advanced Settings` > `Legacy API Settings`. Once there, you can create a new legacy API account on which to authenticate.
68
+ To get all the basic auth credentials, simply visit your store admin page, and navigate to the
69
+ `Advanced Settings` > `Legacy API Settings`. Once there, you can create a new legacy API account on which to authenticate.
64
70
 
65
71
  ```rb
66
72
  Bigcommerce.configure do |config|
@@ -71,9 +77,10 @@ Bigcommerce.configure do |config|
71
77
  end
72
78
  ```
73
79
 
74
- __SSL Configuration__
80
+ **SSL Configuration**
75
81
 
76
- If you are using your own, self-signed, certificate, you can pass SSL options to Faraday. This is not required, but might be useful in special edge cases.
82
+ If you are using your own, self-signed, certificate, you can pass SSL options to Faraday. This is not required, but
83
+ might be useful in special edge cases.
77
84
 
78
85
  ```rb
79
86
  Bigcommerce.configure do |config|
@@ -93,11 +100,13 @@ For more information about configuring SSL with Faraday, please see the followin
93
100
  - [Faraday: Setting up SSL certificates](https://github.com/lostisland/faraday/wiki/Setting-up-SSL-certificates)
94
101
 
95
102
  ### Customer Login API
96
- If you want to generate tokens for storefront login using the Customer Login API, you need to configure your app's client secret.
97
103
 
98
- - ```store_hash```: The store hash of the store you are operating against.
99
- - ```client_id```: Obtained from the on the BigCommerce [Developer Portal's](http://developer.bigcommerce.com) "My Apps" section.
100
- - ```client_secret```: Obtained from the on the BigCommerce [Developer Portal's](http://developer.bigcommerce.com) "My Apps" section.
104
+ If you want to generate tokens for storefront login using the Customer Login API, you need to configure your app's
105
+ client secret.
106
+
107
+ - `store_hash`: The store hash of the store you are operating against.
108
+ - `client_id`: Obtained from the on the BigCommerce [Developer Portal's](https://build.bigcommerce.com) Apps section.
109
+ - `client_secret`: Obtained from the on the BigCommerce [Developer Portal's](https://build.bigcommerce.com) Apps section.
101
110
 
102
111
  ```rb
103
112
  Bigcommerce.configure do |config|
@@ -108,7 +117,9 @@ end
108
117
  ```
109
118
 
110
119
  ## Usage
111
- For full examples of using the API client, please see the [examples folder](examples) and refer to BigCommerce's [developer documentation](https://developer.bigcommerce.com/api).
120
+
121
+ For full examples of using the API client, please see the [examples folder](examples) and refer to
122
+ BigCommerce's [developer documentation](https://docs.bigcommerce.com/).
112
123
 
113
124
  Example:
114
125
 
@@ -127,11 +138,16 @@ Bigcommerce::System.time
127
138
 
128
139
  ### Thread Safety
129
140
 
130
- The `Bigcommerce.configure` method is NOT thread-safe. This mechanism is designed for applications or CLI's (command-line interfaces) where thread safety is not a concern. If you need to guarantee thread safety, we support this alternative mechanism to make thread-safe API requests:
141
+ The `Bigcommerce.configure` method is NOT thread-safe. This mechanism is designed for applications or
142
+ CLIs (command-line interfaces) where thread safety is not a concern. If you need to guarantee thread safety, we support
143
+ this alternative mechanism to make thread-safe API requests:
131
144
 
132
- Rather then setting up a single `connection` for all API requests, you would construct a new connection for each thread. If you can ensure that each of these connections is stored in a thread-safe manner, you can pass the `connection` as you query the resource.
145
+ Rather then setting up a single `connection` for all API requests, construct a new connection for each thread.
146
+ If you can ensure that each of these connections is stored in a thread-safe manner, you can pass the `connection` as
147
+ you query the resource.
133
148
 
134
- This connection is nothing more than a `Faraday::Connection` – so if you want to write your own, or to use your own adapters, you can feel free. Please refer to this gem's [connection class](https://github.com/bigcommerce/bigcommerce-api-ruby/blob/master/lib/bigcommerce/connection.rb) for more details.
149
+ This connection is nothing more than a `Faraday::Connection` – so if you want to write your own, or to use your own
150
+ adapters, you can feel free. Please refer to this gem's [connection class](https://github.com/bigcommerce/bigcommerce-api-ruby/blob/master/lib/bigcommerce/connection.rb) for more details.
135
151
 
136
152
  ##### OAuth
137
153
 
@@ -173,4 +189,9 @@ Bigcommerce::System.raw_request(:get, 'time', connection: connection_legacy)
173
189
  ```
174
190
 
175
191
  ## Contributing
192
+
176
193
  See [CONTRIBUTING.md](CONTRIBUTING.md)
194
+
195
+ ## License
196
+
197
+ See [LICENSE.md](LICENSE.md)
data/bigcommerce.gemspec CHANGED
@@ -1,27 +1,26 @@
1
- lib = File.expand_path('../lib', __FILE__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.unshift(File.expand_path('lib', __dir__))
3
4
  require 'bigcommerce/version'
4
5
 
5
6
  Gem::Specification.new do |s|
6
7
  s.name = 'bigcommerce'
7
8
  s.version = Bigcommerce::VERSION
8
9
  s.platform = Gem::Platform::RUBY
9
- s.required_ruby_version = '>= 2.0.0'
10
+ s.required_ruby_version = '>= 2.7.5'
10
11
  s.license = 'MIT'
11
12
 
12
13
  s.authors = ['BigCommerce Engineering']
13
14
  s.homepage = 'https://github.com/bigcommerce/bigcommerce-api-ruby'
14
15
  s.summary = 'Ruby client library for the BigCommerce API'
15
16
  s.description = s.summary
17
+ s.metadata['rubygems_mfa_required'] = 'true'
16
18
 
17
19
  s.require_paths = ['lib']
18
20
  s.files = Dir['README.md', 'lib/**/*', 'bigcommerce.gemspec']
19
21
 
20
- s.add_development_dependency 'bundler'
21
- s.add_development_dependency 'rake'
22
-
23
- s.add_dependency 'faraday', '~> 0.11'
24
- s.add_dependency 'faraday_middleware', '~> 0.11'
25
- s.add_dependency 'hashie', '~> 3.4'
26
- s.add_dependency 'jwt', '~> 1.5.4'
22
+ s.add_dependency 'faraday', '>= 2.14', '< 3.0'
23
+ s.add_dependency 'faraday-gzip', '~> 3.0'
24
+ s.add_dependency 'hashie', '>= 3.4', '~> 4'
25
+ s.add_dependency 'jwt', '>= 1.5.4', '~> 2'
27
26
  end
@@ -1,14 +1,28 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Bigcommerce
2
4
  class Config < Hashie::Mash
5
+ BC_API_ENDPOINT_ENV_KEY = 'BC_API_ENDPOINT'
3
6
  DEFAULTS = {
4
7
  base_url: 'https://api.bigcommerce.com'
5
8
  }.freeze
6
9
 
10
+ ##
11
+ # @return [String]
12
+ #
7
13
  def api_url
8
14
  return url if auth == 'legacy'
9
15
 
10
- base = ENV['BC_API_ENDPOINT'].to_s.empty? ? DEFAULTS[:base_url] : ENV['BC_API_ENDPOINT']
11
- "#{base}/stores/#{store_hash}/v2"
16
+ "#{base_url}/stores/#{store_hash}/v2"
17
+ end
18
+
19
+ private
20
+
21
+ ##
22
+ # @return [String]
23
+ #
24
+ def base_url
25
+ ENV[BC_API_ENDPOINT_ENV_KEY].to_s.empty? ? DEFAULTS[:base_url] : ENV.fetch(BC_API_ENDPOINT_ENV_KEY, nil)
12
26
  end
13
27
  end
14
28
  end
@@ -1,5 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Bigcommerce
2
4
  module Connection
5
+ LEGACY_AUTH_MODE = 'legacy'
3
6
  HEADERS = {
4
7
  'accept' => 'application/json',
5
8
  'content-type' => 'application/json',
@@ -12,13 +15,13 @@ module Bigcommerce
12
15
  Faraday.new(url: config.api_url, ssl: ssl_options) do |conn|
13
16
  conn.request :json
14
17
  conn.headers = HEADERS
15
- if config.auth == 'legacy'
16
- conn.use Faraday::Request::BasicAuthentication, config.username, config.api_key
18
+ if config.auth == LEGACY_AUTH_MODE
19
+ conn.request :authorization, :basic, config.username, config.api_key
17
20
  else
18
21
  conn.use Bigcommerce::Middleware::Auth, config
19
22
  end
23
+ conn.request :gzip
20
24
  conn.use Bigcommerce::Middleware::HttpException
21
- conn.use FaradayMiddleware::Gzip
22
25
  conn.adapter Faraday.default_adapter
23
26
  end
24
27
  end
@@ -1,8 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Bigcommerce
2
4
  class HttpError < StandardError
3
5
  attr_accessor :response_headers
6
+
4
7
  def initialize(headers)
5
8
  @response_headers = headers
9
+ super()
6
10
  end
7
11
  end
8
12
 
@@ -39,19 +43,17 @@ module Bigcommerce
39
43
  509 => Bigcommerce::BandwidthLimitExceeded
40
44
  }.freeze
41
45
 
46
+ X_RETRY_AFTER_HEADER_KEY = 'x-retry-after'
47
+
42
48
  def throw_http_exception!(code, env)
43
- return unless ERRORS.keys.include? code
44
- response_headers = {}
45
- unless env.body.empty?
46
- response_headers = begin
47
- JSON.parse(env.body, symbolize_names: true)
48
- rescue StandardError
49
- {}
50
- end
51
- end
52
- unless env[:response_headers] && env[:response_headers]['X-Retry-After'].nil?
53
- response_headers[:retry_after] = env[:response_headers]['X-Retry-After'].to_i
49
+ return unless ERRORS.key?(code)
50
+
51
+ response_headers = Faraday::Utils::Headers.new(env.response_headers)
52
+
53
+ unless response_headers[X_RETRY_AFTER_HEADER_KEY].nil?
54
+ response_headers[:retry_after] = response_headers[X_RETRY_AFTER_HEADER_KEY].to_i
54
55
  end
56
+
55
57
  raise ERRORS[code].new(response_headers), env.body
56
58
  end
57
59
  end
@@ -1,16 +1,24 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Bigcommerce
2
4
  module Middleware
3
5
  class Auth < Faraday::Middleware
4
- def initialize(app, options = {})
5
- @app = app
6
- @options = options
7
- end
6
+ X_AUTH_CLIENT_HEADER = 'X-Auth-Client'
7
+ X_AUTH_TOKEN_HEADER = 'X-Auth-Token'
8
8
 
9
9
  def call(env)
10
- env[:request_headers]['X-Auth-Client'] = @options[:client_id]
11
- env[:request_headers]['X-Auth-Token'] = @options[:access_token]
10
+ env[:request_headers][X_AUTH_CLIENT_HEADER] = option_value(:client_id)
11
+ env[:request_headers][X_AUTH_TOKEN_HEADER] = option_value(:access_token)
12
12
  @app.call env
13
13
  end
14
+
15
+ private
16
+
17
+ def option_value(key)
18
+ return @options[key] if @options.key?(key)
19
+
20
+ @options[key.to_s]
21
+ end
14
22
  end
15
23
  end
16
24
  end
@@ -1,10 +1,18 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bigcommerce/exception'
2
4
 
3
5
  module Bigcommerce
4
6
  module Middleware
5
- class HttpException < Faraday::Response::Middleware
7
+ class HttpException < Faraday::Middleware
6
8
  include Bigcommerce::HttpErrors
7
9
 
10
+ def call(env)
11
+ @app.call(env).on_complete do |response_env|
12
+ on_complete(response_env)
13
+ end
14
+ end
15
+
8
16
  def on_complete(env)
9
17
  throw_http_exception! env[:status].to_i, env
10
18
  env
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Bigcommerce
4
+ class PathBuilder
5
+ # @!attribute [r] uri
6
+ # @return [String] The URI of the path to build
7
+ attr_reader :uri
8
+
9
+ ##
10
+ # @param [String] uri
11
+ #
12
+ def initialize(uri)
13
+ @uri = uri
14
+ end
15
+
16
+ ##
17
+ # This takes the @uri and inserts the keys to form a path.
18
+ # To start we make sure that for nil/numeric values, we wrap those into an
19
+ # array. We then scan the string for %d and %s to find the number of times
20
+ # we possibly need to insert keys into the URI. Next, we check the size of
21
+ # the keys array, if the keys size is less than the number of possible keys
22
+ # in the URI, we will remove the trailing %d or %s, then remove the
23
+ # trailing /. We then pass the keys into the uri to form the path.
24
+ # ex. foo/%d/bar/%d => foo/1/bar/2
25
+ #
26
+ # @param [Array] keys
27
+ # @return [String]
28
+ #
29
+ def build(keys = [])
30
+ keys = [] if keys.nil?
31
+ keys = [keys] if keys.is_a? Numeric
32
+ ids = uri.scan('%d').count + uri.scan('%s').count
33
+ str = ids > keys.size ? uri.chomp('%d').chomp('%s').chomp('/') : uri
34
+ (str % keys).chomp('/')
35
+ end
36
+
37
+ ##
38
+ # @return [String]
39
+ #
40
+ def to_s
41
+ @uri
42
+ end
43
+ end
44
+ end
@@ -1,42 +1,17 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
 
3
5
  module Bigcommerce
4
- class PathBuilder
5
- attr_reader :uri
6
-
7
- def initialize(uri)
8
- @uri = uri
9
- end
10
-
11
- # This takes the @uri and inserts the keys to form a path.
12
- # To start we make sure that for nil/numeric values, we wrap those into an
13
- # array. We then scan the string for %d and %s to find the number of times
14
- # we possibly need to insert keys into the URI. Next, we check the size of
15
- # the keys array, if the keys size is less than the number of possible keys
16
- # in the URI, we will remove the trailing %d or %s, then remove the
17
- # trailing /. We then pass the keys into the uri to form the path.
18
- # ex. foo/%d/bar/%d => foo/1/bar/2
19
- def build(keys = [])
20
- keys = [] if keys.nil?
21
- keys = [keys] if keys.is_a? Numeric
22
- ids = uri.scan('%d').count + uri.scan('%s').count
23
- str = ids > keys.size ? uri.chomp('%d').chomp('%s').chomp('/') : uri
24
- (str % keys).chomp('/')
25
- end
26
-
27
- def to_s
28
- @uri
29
- end
30
- end
31
-
32
6
  class Request < Module
33
7
  def initialize(uri)
34
8
  @uri = uri
9
+ super()
35
10
  end
36
11
 
37
12
  def included(base)
38
13
  base.extend ClassMethods
39
- path_builder = PathBuilder.new @uri
14
+ path_builder = ::Bigcommerce::PathBuilder.new(@uri)
40
15
  base.define_singleton_method :path do
41
16
  path_builder
42
17
  end
@@ -71,7 +46,7 @@ module Bigcommerce
71
46
  private
72
47
 
73
48
  def build_response_object(response)
74
- json = parse response.body
49
+ json = parse(response.body)
75
50
  if json.is_a? Array
76
51
  json.map { |obj| new obj }
77
52
  else
@@ -79,8 +54,13 @@ module Bigcommerce
79
54
  end
80
55
  end
81
56
 
57
+ ##
58
+ # @return [Hash]
59
+ # @return [Array]
60
+ #
82
61
  def parse(json)
83
62
  return [] if json.empty?
63
+
84
64
  JSON.parse(json, symbolize_names: true)
85
65
  end
86
66
  end
@@ -1,5 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Bigcommerce
2
4
  class ResourceActions < Module
5
+ # @!attribute [r] options
6
+ # @return [Hash] Options passed to this module
3
7
  attr_reader :options
4
8
 
5
9
  def initialize(options = {})
@@ -9,6 +13,7 @@ module Bigcommerce
9
13
  mod.options
10
14
  end
11
15
  end
16
+ super()
12
17
  end
13
18
 
14
19
  def included(base)
@@ -26,6 +31,7 @@ module Bigcommerce
26
31
 
27
32
  def find(resource_id, params = {})
28
33
  raise ArgumentError if resource_id.nil?
34
+
29
35
  get path.build(resource_id), params
30
36
  end
31
37
 
@@ -35,11 +41,13 @@ module Bigcommerce
35
41
 
36
42
  def update(resource_id, params = {})
37
43
  raise ArgumentError if resource_id.nil?
44
+
38
45
  put path.build(resource_id), params
39
46
  end
40
47
 
41
48
  def destroy(resource_id, params = {})
42
49
  raise ArgumentError if resource_id.nil?
50
+
43
51
  delete path.build(resource_id), params
44
52
  end
45
53
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Blog Post
2
4
  # Content entries in the store's blog.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/blog/posts
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Blog Tag
2
4
  # Index of tags used on the store's blog.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/blog/tags
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Redirect
2
4
  # Redirects are used to create custom URL paths that map to resources on the
3
5
  # storefront (such as products, categories, brands, etc.) or manually defined
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'jwt'
2
4
  require 'securerandom'
3
5
 
@@ -26,6 +28,7 @@ module Bigcommerce
26
28
  property :addresses
27
29
  property :tax_exempt_category
28
30
  property :accepts_marketing
31
+ property :form_fields
29
32
 
30
33
  def self.count(params = {})
31
34
  get 'customers/count', params
@@ -34,17 +37,18 @@ module Bigcommerce
34
37
  # Generate a token that can be used to log the customer into the storefront.
35
38
  # This requires your app to have the store_v2_customers_login scope and to
36
39
  # be installed in the store.
37
- def login_token(config: Bigcommerce.config)
40
+ def login_token(config: Bigcommerce.config, redirect_to: '/')
38
41
  payload = {
39
42
  'iss' => config.client_id,
40
43
  'iat' => Time.now.to_i,
41
44
  'jti' => SecureRandom.uuid,
42
45
  'operation' => 'customer_login',
43
46
  'store_hash' => config.store_hash,
44
- 'customer_id' => id
47
+ 'customer_id' => id,
48
+ 'redirect_to' => redirect_to
45
49
  }
46
50
 
47
- JWT.encode(payload, config.client_secret, 'HS256')
51
+ JWT.encode(payload, config.client_secret, 'HS256', { typ: 'JWT' })
48
52
  end
49
53
  end
50
54
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Customer Address
2
4
  # Postal addresses belonging to a customer.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/customers/addresses
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Customer Group
2
4
  # Groups of customers who share the same level of access and discounts
3
5
  # at a store.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Country
2
4
  # Countries and territories, identified by their ISO 3166 country codes.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/countries
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # State
2
4
  # States and subdivisions belonging to countries.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/countries/states
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Banner
2
4
  # HTML element on webpages to advertise discounts or other content relevant to shoppers.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/banners
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Coupon
2
4
  # Category or product discounts that can be applied to orders for customers
3
5
  # who enter a given code.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Gift Certificates
2
4
  # Code that can be applied by customers to their order to provide full or partial payment.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/gift_certificates
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Order
2
4
  # Purchases from a store.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/orders
@@ -67,6 +69,14 @@ module Bigcommerce
67
69
  property :shipping_cost_tax_class_id
68
70
  property :wrapping_cost_tax_class_id
69
71
  property :count
72
+ property :cart_id
73
+ property :channel_id
74
+ property :custom_status
75
+ property :external_id
76
+ property :external_merchant_id
77
+ property :store_default_currency_code
78
+ property :store_default_to_transactional_exchange_rate
79
+ property :tax_provider_id
70
80
 
71
81
  def self.count(params = {})
72
82
  get 'orders/count', params
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Order Coupon
2
4
  # Coupons applied to an order.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/orders/coupons
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Order Message
2
4
  # Messages associated with an order.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/orders/messages
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Order Product
2
4
  # Product line items associated with an order.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/orders/products
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Order Shipping Addresses
2
4
  # Shipping addresses associated with an order.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/orders/shipping_addresses
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Order Status
2
4
  # Statuses that can be assigned to orders. Each status represents a state in
3
5
  # the fulfilment workflow.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Order Shipping Addresses
2
4
  # Shipping addresses associated with an order.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/orders/shipping_addresses
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Order Shipment
2
4
  # Shipping package consignments tracked from an order.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/orders/shipments
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Payment Method
2
4
  # Enabled payment methods.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/payments/methods
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Brand
2
4
  # Brand facets for identifying and categorising products according
3
5
  # to their manufacturer or company metonym.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Bulk Pricing Rule
2
4
  # Bulk pricing rules applied to a product.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/products/discount_rules
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Category
2
4
  # Index of hierarchical categories used to organise and group products.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/categories
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Configurable Field
2
4
  # Configurable fields associated with a product.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/products/configurable_fields
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Custom Field
2
4
  # Custom fields associated with a product.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/products/custom_fields
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Google Product Search Mapping
2
4
  # Google Product Search mappings for a product.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/products/googleproductsearch
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Option
2
4
  # Shared attributes that control value facets on a product.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/options
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Option Set
2
4
  # A reusable set of option facets that can be applied to products.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/options_sets
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Option Set Option
2
4
  # Options belonging to an option set.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/option_sets/options
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Option Value
2
4
  # Values that can be selected for an option.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/options/values
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Product
2
4
  # Catalog of saleable items in the store.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/products
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Product Image
2
4
  # Images associated with a product.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/products/images
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Product Option
2
4
  # Options associated directly with a product.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/products/options
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Product Review
2
4
  # Options associated directly with a product.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/products/reviews
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Product Rule
2
4
  # Rules that modify the default behaviour of products.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/products/rules
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Product Video
2
4
  # Embedded videos displayed on product listings.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/products/videos
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # SKU
2
4
  # Stock Keeping Unit identifiers associated with products.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/products/skus
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bigcommerce/request'
2
4
  require 'bigcommerce/resource_actions'
3
5
  require 'bigcommerce/subresource_actions'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Shipping Method
2
4
  # List of enabled shipping methods.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/shipping/methods
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Store Information
2
4
  # Metadata that describes the store.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/store_information
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Time
2
4
  # Timestamp ping to check the system status.
3
5
  # https://developer.bigcommerce.com/api/stores/v2/time
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Tax Class
2
4
  # Tax classes are used to apply different tax rates for specific types
3
5
  # of products and orders.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Webhook
2
4
  # Register and manage webhooks that connect events from a store to
3
5
  # external URLs.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Bigcommerce
2
4
  class SubresourceActions < ResourceActions
3
5
  def included(base)
@@ -11,31 +13,37 @@ module Bigcommerce
11
13
  module ClassMethods
12
14
  def all(parent_id, params = {})
13
15
  raise ArgumentError if parent_id.nil?
16
+
14
17
  get path.build(parent_id), params
15
18
  end
16
19
 
17
20
  def find(parent_id, resource_id, params = {})
18
21
  raise ArgumentError if [parent_id, resource_id].any?(&:nil?)
22
+
19
23
  get path.build([parent_id, resource_id]), params
20
24
  end
21
25
 
22
26
  def create(parent_id, params = {})
23
27
  raise ArgumentError if parent_id.nil?
28
+
24
29
  post path.build(parent_id), params
25
30
  end
26
31
 
27
32
  def update(parent_id, resource_id, params = {})
28
33
  raise ArgumentError if [parent_id, resource_id].any?(&:nil?)
34
+
29
35
  put path.build([parent_id, resource_id]), params
30
36
  end
31
37
 
32
38
  def destroy(parent_id, resource_id, params = {})
33
39
  raise ArgumentError if [parent_id, resource_id].any?(&:nil?)
40
+
34
41
  delete path.build([parent_id, resource_id]), params
35
42
  end
36
43
 
37
44
  def destroy_all(parent_id, params = {})
38
45
  raise ArgumentError if parent_id.nil?
46
+
39
47
  delete path.build(parent_id), params
40
48
  end
41
49
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Bigcommerce
2
- VERSION = '1.0.1'.freeze
4
+ VERSION = '2.0.0'
3
5
  end
data/lib/bigcommerce.rb CHANGED
@@ -1,21 +1,30 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'hashie'
2
- require 'faraday_middleware'
3
- require 'bigcommerce/version'
4
- require 'bigcommerce/config'
5
- require 'bigcommerce/connection'
6
- require 'bigcommerce/middleware/auth'
7
- require 'bigcommerce/middleware/http_exception'
8
- require 'bigcommerce/resources/resource'
4
+ require 'faraday'
5
+ require 'faraday/gzip'
6
+ require_relative 'bigcommerce/version'
7
+ require_relative 'bigcommerce/config'
8
+ require_relative 'bigcommerce/connection'
9
+ require_relative 'bigcommerce/path_builder'
10
+ require_relative 'bigcommerce/middleware/auth'
11
+ require_relative 'bigcommerce/middleware/http_exception'
12
+ require_relative 'bigcommerce/resources/resource'
9
13
 
10
14
  module Bigcommerce
11
15
  resources = File.join(File.dirname(__FILE__), 'bigcommerce', 'resources', '**', '*.rb')
12
- Dir.glob(resources, &method(:require))
16
+ Dir.glob(resources).sort.each { |r| require r }
13
17
 
14
18
  class << self
15
- attr_reader :api, :config
19
+ # @!attribute [r] api
20
+ # @return [::Faraday::Connection]
21
+ attr_reader :api
22
+ # @!attribute [r] config
23
+ # @return [::Bigcommerce::Config]
24
+ attr_reader :config
16
25
 
17
- def configure
18
- @config = Bigcommerce::Config.new.tap { |h| yield(h) }
26
+ def configure(&block)
27
+ @config = Bigcommerce::Config.new.tap(&block)
19
28
  @api = Bigcommerce::Connection.build(@config)
20
29
  end
21
30
  end
metadata CHANGED
@@ -1,101 +1,89 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigcommerce
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BigCommerce Engineering
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2017-12-20 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
- name: bundler
13
+ name: faraday
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
18
+ version: '2.14'
19
+ - - "<"
32
20
  - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
21
+ version: '3.0'
22
+ type: :runtime
35
23
  prerelease: false
36
24
  version_requirements: !ruby/object:Gem::Requirement
37
25
  requirements:
38
26
  - - ">="
39
27
  - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: faraday
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '0.11'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
28
+ version: '2.14'
29
+ - - "<"
53
30
  - !ruby/object:Gem::Version
54
- version: '0.11'
31
+ version: '3.0'
55
32
  - !ruby/object:Gem::Dependency
56
- name: faraday_middleware
33
+ name: faraday-gzip
57
34
  requirement: !ruby/object:Gem::Requirement
58
35
  requirements:
59
36
  - - "~>"
60
37
  - !ruby/object:Gem::Version
61
- version: '0.11'
38
+ version: '3.0'
62
39
  type: :runtime
63
40
  prerelease: false
64
41
  version_requirements: !ruby/object:Gem::Requirement
65
42
  requirements:
66
43
  - - "~>"
67
44
  - !ruby/object:Gem::Version
68
- version: '0.11'
45
+ version: '3.0'
69
46
  - !ruby/object:Gem::Dependency
70
47
  name: hashie
71
48
  requirement: !ruby/object:Gem::Requirement
72
49
  requirements:
73
- - - "~>"
50
+ - - ">="
74
51
  - !ruby/object:Gem::Version
75
52
  version: '3.4'
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '4'
76
56
  type: :runtime
77
57
  prerelease: false
78
58
  version_requirements: !ruby/object:Gem::Requirement
79
59
  requirements:
80
- - - "~>"
60
+ - - ">="
81
61
  - !ruby/object:Gem::Version
82
62
  version: '3.4'
63
+ - - "~>"
64
+ - !ruby/object:Gem::Version
65
+ version: '4'
83
66
  - !ruby/object:Gem::Dependency
84
67
  name: jwt
85
68
  requirement: !ruby/object:Gem::Requirement
86
69
  requirements:
87
- - - "~>"
70
+ - - ">="
88
71
  - !ruby/object:Gem::Version
89
72
  version: 1.5.4
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '2'
90
76
  type: :runtime
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
- - - "~>"
80
+ - - ">="
95
81
  - !ruby/object:Gem::Version
96
82
  version: 1.5.4
83
+ - - "~>"
84
+ - !ruby/object:Gem::Version
85
+ version: '2'
97
86
  description: Ruby client library for the BigCommerce API
98
- email:
99
87
  executables: []
100
88
  extensions: []
101
89
  extra_rdoc_files: []
@@ -108,6 +96,7 @@ files:
108
96
  - lib/bigcommerce/exception.rb
109
97
  - lib/bigcommerce/middleware/auth.rb
110
98
  - lib/bigcommerce/middleware/http_exception.rb
99
+ - lib/bigcommerce/path_builder.rb
111
100
  - lib/bigcommerce/request.rb
112
101
  - lib/bigcommerce/resource_actions.rb
113
102
  - lib/bigcommerce/resources/content/blog_post.rb
@@ -158,8 +147,8 @@ files:
158
147
  homepage: https://github.com/bigcommerce/bigcommerce-api-ruby
159
148
  licenses:
160
149
  - MIT
161
- metadata: {}
162
- post_install_message:
150
+ metadata:
151
+ rubygems_mfa_required: 'true'
163
152
  rdoc_options: []
164
153
  require_paths:
165
154
  - lib
@@ -167,16 +156,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
167
156
  requirements:
168
157
  - - ">="
169
158
  - !ruby/object:Gem::Version
170
- version: 2.0.0
159
+ version: 2.7.5
171
160
  required_rubygems_version: !ruby/object:Gem::Requirement
172
161
  requirements:
173
162
  - - ">="
174
163
  - !ruby/object:Gem::Version
175
164
  version: '0'
176
165
  requirements: []
177
- rubyforge_project:
178
- rubygems_version: 2.6.14
179
- signing_key:
166
+ rubygems_version: 3.6.9
180
167
  specification_version: 4
181
168
  summary: Ruby client library for the BigCommerce API
182
169
  test_files: []