bigcommerce 1.0.0.beta → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +98 -36
- data/bigcommerce.gemspec +11 -13
- data/lib/bigcommerce.rb +4 -33
- data/lib/bigcommerce/config.rb +14 -0
- data/lib/bigcommerce/connection.rb +24 -0
- data/lib/bigcommerce/exception.rb +25 -18
- data/lib/bigcommerce/request.rb +8 -9
- data/lib/bigcommerce/resource_actions.rb +11 -11
- data/lib/bigcommerce/resources/content/blog_post.rb +3 -5
- data/lib/bigcommerce/resources/content/blog_tag.rb +2 -3
- data/lib/bigcommerce/resources/content/redirect.rb +2 -2
- data/lib/bigcommerce/resources/customers/customer.rb +2 -2
- data/lib/bigcommerce/resources/customers/customer_address.rb +5 -5
- data/lib/bigcommerce/resources/customers/customer_group.rb +2 -2
- data/lib/bigcommerce/resources/geography/country.rb +4 -3
- data/lib/bigcommerce/resources/geography/state.rb +6 -5
- data/lib/bigcommerce/resources/marketing/banner.rb +21 -0
- data/lib/bigcommerce/resources/marketing/coupon.rb +2 -2
- data/lib/bigcommerce/resources/marketing/gift_certificates.rb +25 -0
- data/lib/bigcommerce/resources/orders/order.rb +46 -44
- data/lib/bigcommerce/resources/orders/order_coupon.rb +5 -5
- data/lib/bigcommerce/resources/orders/order_message.rb +8 -7
- data/lib/bigcommerce/resources/orders/order_product.rb +37 -36
- data/lib/bigcommerce/resources/orders/order_shipping_address.rb +24 -23
- data/lib/bigcommerce/resources/orders/order_status.rb +2 -1
- data/lib/bigcommerce/resources/orders/order_tax.rb +8 -7
- data/lib/bigcommerce/resources/orders/shipment.rb +11 -10
- data/lib/bigcommerce/resources/products/brand.rb +2 -2
- data/lib/bigcommerce/resources/products/bulk_pricing_rule.rb +6 -5
- data/lib/bigcommerce/resources/products/category.rb +2 -2
- data/lib/bigcommerce/resources/products/configurable_field.rb +6 -5
- data/lib/bigcommerce/resources/products/custom_field.rb +6 -5
- data/lib/bigcommerce/resources/products/google_product_search_mapping.rb +9 -8
- data/lib/bigcommerce/resources/products/option.rb +2 -2
- data/lib/bigcommerce/resources/products/option_set.rb +2 -2
- data/lib/bigcommerce/resources/products/option_set_option.rb +2 -1
- data/lib/bigcommerce/resources/products/option_value.rb +1 -0
- data/lib/bigcommerce/resources/products/product.rb +61 -61
- data/lib/bigcommerce/resources/products/product_image.rb +4 -4
- data/lib/bigcommerce/resources/products/product_option.rb +2 -1
- data/lib/bigcommerce/resources/products/product_review.rb +1 -5
- data/lib/bigcommerce/resources/products/product_rule.rb +4 -4
- data/lib/bigcommerce/resources/products/product_video.rb +4 -4
- data/lib/bigcommerce/resources/products/sku.rb +15 -9
- data/lib/bigcommerce/resources/shipping/shipping_method.rb +2 -1
- data/lib/bigcommerce/resources/store/store_information.rb +18 -14
- data/lib/bigcommerce/resources/system/time.rb +2 -2
- data/lib/bigcommerce/resources/tax/tax_class.rb +2 -1
- data/lib/bigcommerce/resources/webhooks/webhook.rb +2 -1
- data/lib/bigcommerce/subresource_actions.rb +14 -14
- data/lib/bigcommerce/version.rb +1 -1
- metadata +32 -165
- data/.gitignore +0 -17
- data/.rspec +0 -2
- data/.rubocop.yml +0 -620
- data/.travis.yml +0 -15
- data/CHANGELOG.md +0 -11
- data/CONTRIBUTING.md +0 -119
- data/DEPENDENCIES.md +0 -7
- data/Gemfile +0 -15
- data/Guardfile +0 -22
- data/LICENSE +0 -20
- data/RELEASING.md +0 -64
- data/Rakefile +0 -13
- data/examples/README.md +0 -148
- data/examples/configuration/legacy_auth.rb +0 -12
- data/examples/configuration/oauth.rb +0 -9
- data/examples/content/blog_post.rb +0 -39
- data/examples/content/blog_tag.rb +0 -10
- data/examples/content/redirect.rb +0 -43
- data/examples/customers/customer.rb +0 -36
- data/examples/customers/customer_address.rb +0 -50
- data/examples/customers/customer_group.rb +0 -35
- data/examples/exception_handling.rb +0 -50
- data/examples/geography/country.rb +0 -16
- data/examples/geography/state.rb +0 -19
- data/examples/marketing/coupon.rb +0 -44
- data/examples/orders/order.rb +0 -53
- data/examples/orders/order_coupon.rb +0 -17
- data/examples/orders/order_message.rb +0 -17
- data/examples/orders/order_product.rb +0 -23
- data/examples/orders/order_shipping_address.rb +0 -23
- data/examples/orders/order_status.rb +0 -15
- data/examples/orders/order_tax.rb +0 -17
- data/examples/orders/shipment.rb +0 -57
- data/examples/payments/payment_method.rb +0 -10
- data/examples/products/brand.rb +0 -36
- data/examples/products/bulk_pricing_rule.rb +0 -47
- data/examples/products/category.rb +0 -37
- data/examples/products/configurable_field.rb +0 -29
- data/examples/products/custom_field.rb +0 -44
- data/examples/products/google_product_search_mapping.rb +0 -12
- data/examples/products/option.rb +0 -37
- data/examples/products/option_set.rb +0 -35
- data/examples/products/option_set_option.rb +0 -50
- data/examples/products/option_value.rb +0 -43
- data/examples/products/product.rb +0 -44
- data/examples/products/product_image.rb +0 -42
- data/examples/products/product_option.rb +0 -17
- data/examples/products/product_review.rb +0 -12
- data/examples/products/product_rule.rb +0 -54
- data/examples/products/product_video.rb +0 -45
- data/examples/products/sku.rb +0 -48
- data/examples/shipping/shipping_method.rb +0 -13
- data/examples/store/store_info.rb +0 -10
- data/examples/system/time.rb +0 -10
- data/examples/tax/tax_class.rb +0 -13
- data/examples/webhooks/webhook.rb +0 -29
- data/spec/bigcommerce/bigcommerce_spec.rb +0 -76
- data/spec/bigcommerce/unit/actions_spec.rb +0 -151
- data/spec/bigcommerce/unit/exception_spec.rb +0 -53
- data/spec/bigcommerce/unit/middleware/auth_spec.rb +0 -18
- data/spec/bigcommerce/unit/middleware/http_exception_spec.rb +0 -40
- data/spec/bigcommerce/unit/request_spec.rb +0 -180
- data/spec/bigcommerce/unit/resources/content/blog_post_spec.rb +0 -12
- data/spec/bigcommerce/unit/resources/content/blog_tag_spec.rb +0 -12
- data/spec/bigcommerce/unit/resources/content/redirect_spec.rb +0 -12
- data/spec/bigcommerce/unit/resources/customers/customer_address_spec.rb +0 -21
- data/spec/bigcommerce/unit/resources/customers/customer_group_spec.rb +0 -12
- data/spec/bigcommerce/unit/resources/customers/customer_spec.rb +0 -12
- data/spec/bigcommerce/unit/resources/geography/country_spec.rb +0 -12
- data/spec/bigcommerce/unit/resources/geography/state_spec.rb +0 -21
- data/spec/bigcommerce/unit/resources/marketing/coupon_spec.rb +0 -12
- data/spec/bigcommerce/unit/resources/orders/order_product_spec.rb +0 -21
- data/spec/bigcommerce/unit/resources/orders/order_shipping_address_spec.rb +0 -21
- data/spec/bigcommerce/unit/resources/orders/order_spec.rb +0 -13
- data/spec/bigcommerce/unit/resources/orders/shipment_spec.rb +0 -21
- data/spec/bigcommerce/unit/resources/payments/payment_method_spec.rb +0 -23
- data/spec/bigcommerce/unit/resources/products/brand_spec.rb +0 -12
- data/spec/bigcommerce/unit/resources/products/bulk_pricing_rule_spec.rb +0 -21
- data/spec/bigcommerce/unit/resources/products/category_spec.rb +0 -12
- data/spec/bigcommerce/unit/resources/products/configurable_field_spec.rb +0 -21
- data/spec/bigcommerce/unit/resources/products/custom_field_spec.rb +0 -21
- data/spec/bigcommerce/unit/resources/products/google_product_search_mapping_spec.rb +0 -14
- data/spec/bigcommerce/unit/resources/products/option_set_spec.rb +0 -12
- data/spec/bigcommerce/unit/resources/products/option_spec.rb +0 -12
- data/spec/bigcommerce/unit/resources/products/product_image_spec.rb +0 -21
- data/spec/bigcommerce/unit/resources/products/product_review_spec.rb +0 -14
- data/spec/bigcommerce/unit/resources/products/product_rule_spec.rb +0 -21
- data/spec/bigcommerce/unit/resources/products/product_spec.rb +0 -13
- data/spec/bigcommerce/unit/resources/products/product_video_spec.rb +0 -21
- data/spec/bigcommerce/unit/resources/products/sku_spec.rb +0 -21
- data/spec/bigcommerce/unit/resources/resource_spec.rb +0 -4
- data/spec/bigcommerce/unit/resources/store_info/store_information_spec.rb +0 -12
- data/spec/bigcommerce/unit/resources/system/time_spec.rb +0 -12
- data/spec/bigcommerce/unit/version_spec.rb +0 -7
- data/spec/spec_helper.rb +0 -11
@@ -1,13 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Bigcommerce::Product do
|
4
|
-
before(:each) { @product = Bigcommerce::Product }
|
5
|
-
|
6
|
-
describe '.count' do
|
7
|
-
it 'should hit the correct path with params' do
|
8
|
-
params = { page: 1 }
|
9
|
-
expect(@product).to receive(:get).with('products/count', params)
|
10
|
-
@product.count params
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Bigcommerce::ProductVideo do
|
4
|
-
before(:each) { @video = Bigcommerce::ProductVideo }
|
5
|
-
|
6
|
-
let(:params) { 1 }
|
7
|
-
|
8
|
-
describe '.count' do
|
9
|
-
it '.count should hit the correct path' do
|
10
|
-
expect(@video).to receive(:get).with('products/1/videos/count')
|
11
|
-
@video.count params
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
describe '.count_all' do
|
16
|
-
it '.count should hit the correct path' do
|
17
|
-
expect(@video).to receive(:get).with('products/videos/count')
|
18
|
-
@video.count_all
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Bigcommerce::Sku do
|
4
|
-
before(:each) { @sku = Bigcommerce::Sku }
|
5
|
-
|
6
|
-
let(:params) { 1 }
|
7
|
-
|
8
|
-
describe '.count' do
|
9
|
-
it 'should hit the correct path' do
|
10
|
-
expect(@sku).to receive(:get).with('products/1/skus/count')
|
11
|
-
@sku.count params
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
describe '.count_all' do
|
16
|
-
it 'should hit the correct path' do
|
17
|
-
expect(@sku).to receive(:get).with('products/skus/count')
|
18
|
-
@sku.count_all
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Bigcommerce::StoreInfo do
|
4
|
-
before(:each) { @store_info = Bigcommerce::StoreInfo }
|
5
|
-
|
6
|
-
describe '.info' do
|
7
|
-
it 'should hit the correct path' do
|
8
|
-
expect(@store_info).to receive(:get).with(@store_info.path.build)
|
9
|
-
@store_info.info
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Bigcommerce::System do
|
4
|
-
before(:each) { @system = Bigcommerce::System }
|
5
|
-
|
6
|
-
describe '.time' do
|
7
|
-
it 'should hit the correct path' do
|
8
|
-
expect(@system).to receive(:get).with(@system.path.build)
|
9
|
-
@system.time
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
data/spec/spec_helper.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
require 'coveralls'
|
2
|
-
Coveralls.wear!
|
3
|
-
|
4
|
-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
5
|
-
Coveralls::SimpleCov::Formatter,
|
6
|
-
SimpleCov::Formatter::HTMLFormatter
|
7
|
-
]
|
8
|
-
SimpleCov.start { add_filter '/spec/' }
|
9
|
-
|
10
|
-
require 'rspec'
|
11
|
-
require 'bigcommerce'
|