Class: BigcommerceTest::Api
- Inherits:
-
Object
- Object
- BigcommerceTest::Api
- Defined in:
- lib/bigcommerce_test/api.rb
Instance Method Summary collapse
- #api_key=(api_key) ⇒ Object
- #ca_file=(path) ⇒ Object
- #connection ⇒ Object
- #create_brands(options = {}) ⇒ Object
- #create_categories(options = {}) ⇒ Object
- #create_coupons(options = {}) ⇒ Object
- #create_option(options = {}) ⇒ Object
- #create_options_values(options_id, options = {}) ⇒ Object
- #create_optionset(options = {}) ⇒ Object
- #create_optionset_option(id, options = {}) ⇒ Object
- #create_orders_shipments(id) ⇒ Object
- #create_product_images(product_id, options = {}) ⇒ Object
- #create_products(options = {}) ⇒ Object
- #create_products_images(options = {}) ⇒ Object
- #create_products_rules(options = {}) ⇒ Object
- #create_products_skus(options = {}) ⇒ Object
- #delete_brand(id) ⇒ Object
- #delete_brands ⇒ Object
- #delete_categories ⇒ Object
- #delete_category(id) ⇒ Object
- #delete_option(id) ⇒ Object
- #delete_optionset(id) ⇒ Object
- #delete_products ⇒ Object
- #get_brand(id) ⇒ Object
- #get_brands(options = {}) ⇒ Object
- #get_brands_count ⇒ Object
- #get_categories(options = {}) ⇒ Object
- #get_categories_count ⇒ Object
- #get_category(id) ⇒ Object
- #get_countries(options = {}) ⇒ Object
- #get_countries_state(id, options = {}) ⇒ Object
- #get_countries_states(options = {}) ⇒ Object
- #get_country(id) ⇒ Object
- #get_coupons(options = {}) ⇒ Object
- #get_customer(id) ⇒ Object
- #get_customer_address(customer_id, address_id) ⇒ Object
- #get_customer_addresses(id, options = {}) ⇒ Object
- #get_customers(options = {}) ⇒ Object
- #get_option(id) ⇒ Object
- #get_options(options = {}) ⇒ Object
- #get_options_count ⇒ Object
- #get_options_value(id) ⇒ Object
- #get_options_values(options = {}) ⇒ Object
- #get_optionset(id) ⇒ Object
- #get_optionset_options(id) ⇒ Object
- #get_optionsets(options = {}) ⇒ Object
- #get_optionsets_count ⇒ Object
- #get_optionsets_option(id) ⇒ Object
- #get_optionsets_options(options = {}) ⇒ Object
- #get_order(id) ⇒ Object
- #get_orders(options = {}) ⇒ Object
- #get_orders_by_date(date, options = {}) ⇒ Object
- #get_orders_coupon(order_id, coupon_id) ⇒ Object
- #get_orders_coupons(id) ⇒ Object
- #get_orders_modified_since(date) ⇒ Object
- #get_orders_product(order_id, product_id) ⇒ Object
- #get_orders_products(id) ⇒ Object
- #get_orders_shipment(order_id, shipment_id) ⇒ Object
- #get_orders_shipments(id) ⇒ Object
- #get_orders_shippingaddress(order_id, shippingaddress_id) ⇒ Object
- #get_orders_shippingaddresses(id) ⇒ Object
- #get_orderstatus(id) ⇒ Object
- #get_orderstatuses(options = {}) ⇒ Object
- #get_product(id) ⇒ Object
- #get_product_configurablefields(product_id, options = {}) ⇒ Object
- #get_product_customfields(product_id, options = {}) ⇒ Object
- #get_product_discountrules(product_id, options = {}) ⇒ Object
- #get_product_images(product_id, options = {}) ⇒ Object
- #get_product_options(product_id, options = {}) ⇒ Object
- #get_product_rules(product_id, options = {}) ⇒ Object
- #get_product_skus(product_id, options = {}) ⇒ Object
- #get_product_videos(product_id, options = {}) ⇒ Object
- #get_products(options = {}) ⇒ Object
- #get_products_configurablefield(product_id, configurable_field_id) ⇒ Object
- #get_products_configurablefields(options = {}) ⇒ Object
- #get_products_count ⇒ Object
- #get_products_customfield(product_id, custom_field_id) ⇒ Object
- #get_products_customfields(options = {}) ⇒ Object
- #get_products_discountrule(product_id, discountrule_id) ⇒ Object
- #get_products_discountrules(options = {}) ⇒ Object
- #get_products_image(product_id, image_id) ⇒ Object
- #get_products_images(options = {}) ⇒ Object
- #get_products_option(product_id, option_id) ⇒ Object
- #get_products_rule(product_id, rule_id) ⇒ Object
- #get_products_rules(options = {}) ⇒ Object
- #get_products_sku(product_id, sku_id) ⇒ Object
- #get_products_skus(options = {}) ⇒ Object
- #get_products_video(product_id, video_id) ⇒ Object
- #get_products_videos(options = {}) ⇒ Object
- #get_time ⇒ Object
-
#initialize(configuration = {}) ⇒ Api
constructor
A new instance of Api.
- #store_url=(store_url) ⇒ Object
- #to_rfc2822(datetime) ⇒ Object
- #update_brand(id, options = {}) ⇒ Object
- #update_category(id, options = {}) ⇒ Object
- #update_coupon(id, options = {}) ⇒ Object
- #update_option(id, options = {}) ⇒ Object
- #update_options_value(options_id, values_id, options = {}) ⇒ Object
- #update_optionset(id, options = {}) ⇒ Object
- #update_optionset_option(optionset_id, option_id, options = {}) ⇒ Object
- #update_order(id, options = {}) ⇒ Object
- #update_orders_shipment(order_id, shipment_id, options = {}) ⇒ Object
- #update_products(id, options = {}) ⇒ Object
- #update_products_image(product_id, image_id, options = {}) ⇒ Object
- #update_products_rule(product_id, rule_id, options = {}) ⇒ Object
- #update_products_sku(product_id, sku_id, options = {}) ⇒ Object
- #username=(username) ⇒ Object
- #verify_ssl=(verify) ⇒ Object
Constructor Details
#initialize(configuration = {}) ⇒ Api
Returns a new instance of Api.
4 5 6 |
# File 'lib/bigcommerce_test/api.rb', line 4 def initialize(configuration={}) @connection = Connection.new(configuration) end |
Instance Method Details
#api_key=(api_key) ⇒ Object
20 21 22 |
# File 'lib/bigcommerce_test/api.rb', line 20 def api_key=(api_key) @connection.api_key = api_key end |
#ca_file=(path) ⇒ Object
28 29 30 |
# File 'lib/bigcommerce_test/api.rb', line 28 def ca_file=(path) @connection.ca_file = path end |
#connection ⇒ Object
8 9 10 |
# File 'lib/bigcommerce_test/api.rb', line 8 def connection @connection end |
#create_brands(options = {}) ⇒ Object
52 53 54 |
# File 'lib/bigcommerce_test/api.rb', line 52 def create_brands(={}) @connection.post("/brands", ) end |
#create_categories(options = {}) ⇒ Object
92 93 94 |
# File 'lib/bigcommerce_test/api.rb', line 92 def create_categories(={}) @connection.post("/categories", ) end |
#create_coupons(options = {}) ⇒ Object
72 73 74 |
# File 'lib/bigcommerce_test/api.rb', line 72 def create_coupons(={}) @connection.post("/coupons", ) end |
#create_option(options = {}) ⇒ Object
152 153 154 |
# File 'lib/bigcommerce_test/api.rb', line 152 def create_option(={}) @connection.post("/options", ) end |
#create_options_values(options_id, options = {}) ⇒ Object
172 173 174 |
# File 'lib/bigcommerce_test/api.rb', line 172 def (, ={}) @connection.post("/options/#{}/values", ) end |
#create_optionset(options = {}) ⇒ Object
192 193 194 |
# File 'lib/bigcommerce_test/api.rb', line 192 def (={}) @connection.post("/optionsets", ) end |
#create_optionset_option(id, options = {}) ⇒ Object
216 217 218 |
# File 'lib/bigcommerce_test/api.rb', line 216 def (id, ={}) @connection.post("/optionsets/#{id}/options", ) end |
#create_orders_shipments(id) ⇒ Object
267 268 269 |
# File 'lib/bigcommerce_test/api.rb', line 267 def create_orders_shipments(id) @connection.post("/orders/#{id}/shipments", {}) end |
#create_product_images(product_id, options = {}) ⇒ Object
359 360 361 |
# File 'lib/bigcommerce_test/api.rb', line 359 def create_product_images(product_id, ={}) @connection.post("/products/#{product_id}/images", ) end |
#create_products(options = {}) ⇒ Object
307 308 309 |
# File 'lib/bigcommerce_test/api.rb', line 307 def create_products(={}) @connection.post('/products', ) end |
#create_products_images(options = {}) ⇒ Object
367 368 369 |
# File 'lib/bigcommerce_test/api.rb', line 367 def create_products_images(={}) @connection.post("/products/images", ) end |
#create_products_rules(options = {}) ⇒ Object
399 400 401 |
# File 'lib/bigcommerce_test/api.rb', line 399 def create_products_rules(={}) @connection.post("/products/rules", ) end |
#create_products_skus(options = {}) ⇒ Object
419 420 421 |
# File 'lib/bigcommerce_test/api.rb', line 419 def create_products_skus(={}) @connection.post("/products/skus", ) end |
#delete_brand(id) ⇒ Object
60 61 62 |
# File 'lib/bigcommerce_test/api.rb', line 60 def delete_brand(id) @connection.delete("/brands/#{id}") end |
#delete_brands ⇒ Object
64 65 66 |
# File 'lib/bigcommerce_test/api.rb', line 64 def delete_brands() @connection.delete("/brands") end |
#delete_categories ⇒ Object
104 105 106 |
# File 'lib/bigcommerce_test/api.rb', line 104 def delete_categories() @connection.delete("/categories") end |
#delete_category(id) ⇒ Object
100 101 102 |
# File 'lib/bigcommerce_test/api.rb', line 100 def delete_category(id) @connection.delete("/categories/#{id}") end |
#delete_option(id) ⇒ Object
160 161 162 |
# File 'lib/bigcommerce_test/api.rb', line 160 def delete_option(id) @connection.delete("/options/#{id}") end |
#delete_optionset(id) ⇒ Object
200 201 202 |
# File 'lib/bigcommerce_test/api.rb', line 200 def (id) @connection.delete("/optionsets/#{id}") end |
#delete_products ⇒ Object
315 316 317 |
# File 'lib/bigcommerce_test/api.rb', line 315 def delete_products() @connection.delete("/products") end |
#get_brand(id) ⇒ Object
48 49 50 |
# File 'lib/bigcommerce_test/api.rb', line 48 def get_brand(id) @connection.get("/brands/#{id}", {}) end |
#get_brands(options = {}) ⇒ Object
40 41 42 |
# File 'lib/bigcommerce_test/api.rb', line 40 def get_brands(={}) @connection.get("/brands", ) end |
#get_brands_count ⇒ Object
44 45 46 |
# File 'lib/bigcommerce_test/api.rb', line 44 def get_brands_count @connection.get '/brands/count' end |
#get_categories(options = {}) ⇒ Object
80 81 82 |
# File 'lib/bigcommerce_test/api.rb', line 80 def get_categories(={}) @connection.get("/categories", ) end |
#get_categories_count ⇒ Object
84 85 86 |
# File 'lib/bigcommerce_test/api.rb', line 84 def get_categories_count @connection.get '/categories/count' end |
#get_category(id) ⇒ Object
88 89 90 |
# File 'lib/bigcommerce_test/api.rb', line 88 def get_category(id) @connection.get("/categories/#{id}", {}) end |
#get_countries(options = {}) ⇒ Object
108 109 110 |
# File 'lib/bigcommerce_test/api.rb', line 108 def get_countries(={}) @connection.get("/countries", ) end |
#get_countries_state(id, options = {}) ⇒ Object
120 121 122 |
# File 'lib/bigcommerce_test/api.rb', line 120 def get_countries_state(id, ={}) @connection.get("/countries/#{id}/states", {}) end |
#get_countries_states(options = {}) ⇒ Object
116 117 118 |
# File 'lib/bigcommerce_test/api.rb', line 116 def get_countries_states(={}) @connection.get("/countries/states", ) end |
#get_country(id) ⇒ Object
112 113 114 |
# File 'lib/bigcommerce_test/api.rb', line 112 def get_country(id) @connection.get("/countries/#{id}", {}) end |
#get_coupons(options = {}) ⇒ Object
68 69 70 |
# File 'lib/bigcommerce_test/api.rb', line 68 def get_coupons(={}) @connection.get("/coupons", ) end |
#get_customer(id) ⇒ Object
128 129 130 |
# File 'lib/bigcommerce_test/api.rb', line 128 def get_customer(id) @connection.get('/customers/' + id.to_s, {}) end |
#get_customer_address(customer_id, address_id) ⇒ Object
136 137 138 |
# File 'lib/bigcommerce_test/api.rb', line 136 def get_customer_address(customer_id, address_id) @connection.get("/customers/#{customer_id}/addresses/#{address_id}",{}) end |
#get_customer_addresses(id, options = {}) ⇒ Object
132 133 134 |
# File 'lib/bigcommerce_test/api.rb', line 132 def get_customer_addresses(id, = {}) @connection.get("/customers/#{id}/addresses", ) end |
#get_customers(options = {}) ⇒ Object
124 125 126 |
# File 'lib/bigcommerce_test/api.rb', line 124 def get_customers( = {}) @connection.get("/customers", ) end |
#get_option(id) ⇒ Object
148 149 150 |
# File 'lib/bigcommerce_test/api.rb', line 148 def get_option(id) @connection.get("/options/#{id}",{}) end |
#get_options(options = {}) ⇒ Object
140 141 142 |
# File 'lib/bigcommerce_test/api.rb', line 140 def (={}) @connection.get("/options", ) end |
#get_options_count ⇒ Object
144 145 146 |
# File 'lib/bigcommerce_test/api.rb', line 144 def @connection.get '/options/count' end |
#get_options_value(id) ⇒ Object
168 169 170 |
# File 'lib/bigcommerce_test/api.rb', line 168 def (id) @connection.get("/options/#{id}/values",{}) end |
#get_options_values(options = {}) ⇒ Object
164 165 166 |
# File 'lib/bigcommerce_test/api.rb', line 164 def (={}) @connection.get("/options/values", ) end |
#get_optionset(id) ⇒ Object
188 189 190 |
# File 'lib/bigcommerce_test/api.rb', line 188 def (id) @connection.get("/optionsets/#{id}", {}) end |
#get_optionset_options(id) ⇒ Object
208 209 210 |
# File 'lib/bigcommerce_test/api.rb', line 208 def (id) @connection.get("/optionsets/#{id}/options", {}) end |
#get_optionsets(options = {}) ⇒ Object
180 181 182 |
# File 'lib/bigcommerce_test/api.rb', line 180 def (={}) @connection.get("/optionsets", ) end |
#get_optionsets_count ⇒ Object
184 185 186 |
# File 'lib/bigcommerce_test/api.rb', line 184 def @connection.get '/optionsets/count' end |
#get_optionsets_option(id) ⇒ Object
212 213 214 |
# File 'lib/bigcommerce_test/api.rb', line 212 def (id) @connection.get("/optionsets/options/#{id}", {}) end |
#get_optionsets_options(options = {}) ⇒ Object
204 205 206 |
# File 'lib/bigcommerce_test/api.rb', line 204 def (={}) @connection.get("/optionsets/options", ) end |
#get_order(id) ⇒ Object
239 240 241 |
# File 'lib/bigcommerce_test/api.rb', line 239 def get_order(id) @connection.get("/orders/#{id}", {}) end |
#get_orders(options = {}) ⇒ Object
224 225 226 |
# File 'lib/bigcommerce_test/api.rb', line 224 def get_orders(={}) @connection.get("/orders", ) end |
#get_orders_by_date(date, options = {}) ⇒ Object
228 229 230 231 232 233 |
# File 'lib/bigcommerce_test/api.rb', line 228 def get_orders_by_date(date, ={}) if date.is_a?(String) date = DateTime.parse(date) end @connection.get('/orders', .merge!(:min_date_created => to_rfc2822(date))) end |
#get_orders_coupon(order_id, coupon_id) ⇒ Object
251 252 253 |
# File 'lib/bigcommerce_test/api.rb', line 251 def get_orders_coupon(order_id,coupon_id) @connection.get("/orders/#{order_id}/coupons/#{coupon_id}", {}) end |
#get_orders_coupons(id) ⇒ Object
247 248 249 |
# File 'lib/bigcommerce_test/api.rb', line 247 def get_orders_coupons(id) @connection.get("/orders/#{id}/coupons", {}) end |
#get_orders_modified_since(date) ⇒ Object
235 236 237 |
# File 'lib/bigcommerce_test/api.rb', line 235 def get_orders_modified_since(date) @connection.get('/orders', {}, {'If-Modified-Since' => to_rfc2822(date)}) end |
#get_orders_product(order_id, product_id) ⇒ Object
259 260 261 |
# File 'lib/bigcommerce_test/api.rb', line 259 def get_orders_product(order_id,product_id) @connection.get("/orders/#{order_id}/products/#{product_id}", {}) end |
#get_orders_products(id) ⇒ Object
255 256 257 |
# File 'lib/bigcommerce_test/api.rb', line 255 def get_orders_products(id) @connection.get("/orders/#{id}/products", {}) end |
#get_orders_shipment(order_id, shipment_id) ⇒ Object
271 272 273 |
# File 'lib/bigcommerce_test/api.rb', line 271 def get_orders_shipment(order_id,shipment_id) @connection.get("/orders/#{order_id}/shipments/#{shipment_id}", {}) end |
#get_orders_shipments(id) ⇒ Object
263 264 265 |
# File 'lib/bigcommerce_test/api.rb', line 263 def get_orders_shipments(id) @connection.get("/orders/#{id}/shipments", {}) end |
#get_orders_shippingaddress(order_id, shippingaddress_id) ⇒ Object
283 284 285 |
# File 'lib/bigcommerce_test/api.rb', line 283 def get_orders_shippingaddress(order_id,shippingaddress_id) @connection.get("/orders/#{order_id}/shippingaddresses/#{shippingaddress_id}", {}) end |
#get_orders_shippingaddresses(id) ⇒ Object
279 280 281 |
# File 'lib/bigcommerce_test/api.rb', line 279 def get_orders_shippingaddresses(id) @connection.get("/orders/#{id}/shippingaddresses", {}) end |
#get_orderstatus(id) ⇒ Object
291 292 293 |
# File 'lib/bigcommerce_test/api.rb', line 291 def get_orderstatus(id) @connection.get("/orderstatuses/#{id}", {}) end |
#get_orderstatuses(options = {}) ⇒ Object
287 288 289 |
# File 'lib/bigcommerce_test/api.rb', line 287 def get_orderstatuses(={}) @connection.get("/orderstatuses", ) end |
#get_product(id) ⇒ Object
303 304 305 |
# File 'lib/bigcommerce_test/api.rb', line 303 def get_product(id) @connection.get("/products/#{id}", {}) end |
#get_product_configurablefields(product_id, options = {}) ⇒ Object
335 336 337 |
# File 'lib/bigcommerce_test/api.rb', line 335 def get_product_configurablefields(product_id, ={}) @connection.get("/products/#{product_id}/configurablefields", ) end |
#get_product_customfields(product_id, options = {}) ⇒ Object
347 348 349 |
# File 'lib/bigcommerce_test/api.rb', line 347 def get_product_customfields(product_id, ={}) @connection.get("/products/#{product_id}/customfields", ) end |
#get_product_discountrules(product_id, options = {}) ⇒ Object
323 324 325 |
# File 'lib/bigcommerce_test/api.rb', line 323 def get_product_discountrules(product_id, ={}) @connection.get("/products/#{product_id}/discountrules", ) end |
#get_product_images(product_id, options = {}) ⇒ Object
355 356 357 |
# File 'lib/bigcommerce_test/api.rb', line 355 def get_product_images(product_id, ={}) @connection.get("/products/#{product_id}/images", ) end |
#get_product_options(product_id, options = {}) ⇒ Object
383 384 385 |
# File 'lib/bigcommerce_test/api.rb', line 383 def (product_id, ={}) @connection.get("/products/#{product_id}/options", ) end |
#get_product_rules(product_id, options = {}) ⇒ Object
395 396 397 |
# File 'lib/bigcommerce_test/api.rb', line 395 def get_product_rules(product_id, ={}) @connection.get("/products/#{product_id}/rules", ) end |
#get_product_skus(product_id, options = {}) ⇒ Object
415 416 417 |
# File 'lib/bigcommerce_test/api.rb', line 415 def get_product_skus(product_id, ={}) @connection.get("/products/#{product_id}/skus", ) end |
#get_product_videos(product_id, options = {}) ⇒ Object
435 436 437 |
# File 'lib/bigcommerce_test/api.rb', line 435 def get_product_videos(product_id, ={}) @connection.get("/products/#{product_id}/videos", ) end |
#get_products(options = {}) ⇒ Object
295 296 297 |
# File 'lib/bigcommerce_test/api.rb', line 295 def get_products(={}) @connection.get("/products", ) end |
#get_products_configurablefield(product_id, configurable_field_id) ⇒ Object
339 340 341 |
# File 'lib/bigcommerce_test/api.rb', line 339 def get_products_configurablefield(product_id, configurable_field_id) @connection.get("/products/#{product_id}/configurablefields/#{configurable_field_id}", {}) end |
#get_products_configurablefields(options = {}) ⇒ Object
331 332 333 |
# File 'lib/bigcommerce_test/api.rb', line 331 def get_products_configurablefields(={}) @connection.get("/products/configurablefields", ) end |
#get_products_count ⇒ Object
299 300 301 |
# File 'lib/bigcommerce_test/api.rb', line 299 def get_products_count @connection.get '/products/count' end |
#get_products_customfield(product_id, custom_field_id) ⇒ Object
351 352 353 |
# File 'lib/bigcommerce_test/api.rb', line 351 def get_products_customfield(product_id, custom_field_id) @connection.get("/products/#{product_id}/customfields/#{custom_field_id}", {}) end |
#get_products_customfields(options = {}) ⇒ Object
343 344 345 |
# File 'lib/bigcommerce_test/api.rb', line 343 def get_products_customfields(={}) @connection.get("/products/customfields", ) end |
#get_products_discountrule(product_id, discountrule_id) ⇒ Object
327 328 329 |
# File 'lib/bigcommerce_test/api.rb', line 327 def get_products_discountrule(product_id, discountrule_id) @connection.get("/products/#{product_id}/discountrules/#{discountrule_id}", {}) end |
#get_products_discountrules(options = {}) ⇒ Object
319 320 321 |
# File 'lib/bigcommerce_test/api.rb', line 319 def get_products_discountrules(={}) @connection.get("/products/discountrules", ) end |
#get_products_image(product_id, image_id) ⇒ Object
371 372 373 |
# File 'lib/bigcommerce_test/api.rb', line 371 def get_products_image(product_id, image_id) @connection.get("/products/#{product_id}/images/#{image_id}", {}) end |
#get_products_images(options = {}) ⇒ Object
363 364 365 |
# File 'lib/bigcommerce_test/api.rb', line 363 def get_products_images(={}) @connection.get("/products/images", ) end |
#get_products_option(product_id, option_id) ⇒ Object
387 388 389 |
# File 'lib/bigcommerce_test/api.rb', line 387 def get_products_option(product_id,option_id) @connection.get("/products/#{product_id}/options/#{option_id}", {}) end |
#get_products_rule(product_id, rule_id) ⇒ Object
403 404 405 |
# File 'lib/bigcommerce_test/api.rb', line 403 def get_products_rule(product_id,rule_id) @connection.get("/products/#{product_id}/rules/#{rule_id}", {}) end |
#get_products_rules(options = {}) ⇒ Object
391 392 393 |
# File 'lib/bigcommerce_test/api.rb', line 391 def get_products_rules(={}) @connection.get("/products/rules", ) end |
#get_products_sku(product_id, sku_id) ⇒ Object
423 424 425 |
# File 'lib/bigcommerce_test/api.rb', line 423 def get_products_sku(product_id, sku_id) @connection.get("/products/#{product_id}/skus/#{sku_id}", {}) end |
#get_products_skus(options = {}) ⇒ Object
411 412 413 |
# File 'lib/bigcommerce_test/api.rb', line 411 def get_products_skus(={}) @connection.get("/products/skus", ) end |
#get_products_video(product_id, video_id) ⇒ Object
439 440 441 |
# File 'lib/bigcommerce_test/api.rb', line 439 def get_products_video(product_id, video_id) @connection.get("/products/#{product_id}/videos/#{video_id}", {}) end |
#get_products_videos(options = {}) ⇒ Object
431 432 433 |
# File 'lib/bigcommerce_test/api.rb', line 431 def get_products_videos(={}) @connection.get("/products/videos", ) end |
#get_time ⇒ Object
36 37 38 |
# File 'lib/bigcommerce_test/api.rb', line 36 def get_time @connection.get '/time' end |
#store_url=(store_url) ⇒ Object
12 13 14 |
# File 'lib/bigcommerce_test/api.rb', line 12 def store_url=(store_url) @connection.store_url = store_url end |
#to_rfc2822(datetime) ⇒ Object
32 33 34 |
# File 'lib/bigcommerce_test/api.rb', line 32 def to_rfc2822(datetime) datetime.strftime("%a, %d %b %Y %H:%M:%S %z") end |
#update_brand(id, options = {}) ⇒ Object
56 57 58 |
# File 'lib/bigcommerce_test/api.rb', line 56 def update_brand(id, ={}) @connection.put("/brands/#{id}", ) end |
#update_category(id, options = {}) ⇒ Object
96 97 98 |
# File 'lib/bigcommerce_test/api.rb', line 96 def update_category(id, ={}) @connection.put("/categories/#{id}", ) end |
#update_coupon(id, options = {}) ⇒ Object
76 77 78 |
# File 'lib/bigcommerce_test/api.rb', line 76 def update_coupon(id, ={}) @connection.put("/coupons/#{id}", ) end |
#update_option(id, options = {}) ⇒ Object
156 157 158 |
# File 'lib/bigcommerce_test/api.rb', line 156 def update_option(id, ={}) @connection.put("/options/#{id}", ) end |
#update_options_value(options_id, values_id, options = {}) ⇒ Object
176 177 178 |
# File 'lib/bigcommerce_test/api.rb', line 176 def (, values_id, ={}) @connection.put("/options/#{}/values/#{values_id}", ) end |
#update_optionset(id, options = {}) ⇒ Object
196 197 198 |
# File 'lib/bigcommerce_test/api.rb', line 196 def (id, ={}) @connection.put("/optionsets/#{id}", ) end |
#update_optionset_option(optionset_id, option_id, options = {}) ⇒ Object
220 221 222 |
# File 'lib/bigcommerce_test/api.rb', line 220 def (, option_id, ={}) @connection.put("/optionsets/#{}/options/#{option_id}", ) end |
#update_order(id, options = {}) ⇒ Object
243 244 245 |
# File 'lib/bigcommerce_test/api.rb', line 243 def update_order(id,={}) @connection.put("/orders/#{id}", ) end |
#update_orders_shipment(order_id, shipment_id, options = {}) ⇒ Object
275 276 277 |
# File 'lib/bigcommerce_test/api.rb', line 275 def update_orders_shipment(order_id,shipment_id,={}) @connection.put("/orders/#{order_id}/shipments/#{shipment_id}", ) end |
#update_products(id, options = {}) ⇒ Object
311 312 313 |
# File 'lib/bigcommerce_test/api.rb', line 311 def update_products(id, ={}) @connection.put("/products/#{id}", ) end |
#update_products_image(product_id, image_id, options = {}) ⇒ Object
375 376 377 |
# File 'lib/bigcommerce_test/api.rb', line 375 def update_products_image(product_id,image_id,={}) @connection.put("/products/#{product_id}/images/#{image_id}", ) end |
#update_products_rule(product_id, rule_id, options = {}) ⇒ Object
407 408 409 |
# File 'lib/bigcommerce_test/api.rb', line 407 def update_products_rule(product_id, rule_id, ={}) @connection.put("/products/#{product_id}/rules/#{rule_id}", ) end |
#update_products_sku(product_id, sku_id, options = {}) ⇒ Object
427 428 429 |
# File 'lib/bigcommerce_test/api.rb', line 427 def update_products_sku(product_id, sku_id, ={}) @connection.put("/products/#{product_id}/skus/#{sku_id}", ) end |
#username=(username) ⇒ Object
16 17 18 |
# File 'lib/bigcommerce_test/api.rb', line 16 def username=(username) @connection.username = username end |
#verify_ssl=(verify) ⇒ Object
24 25 26 |
# File 'lib/bigcommerce_test/api.rb', line 24 def verify_ssl=(verify) @connection.verify_ssl = verify end |