0.0
No commit activity in last 3 years
No release in over 3 years
A ruby wrapper for the Lazada API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 10.0

Runtime

 Project Readme

Lazada

A Ruby API for http://www.lazada.com.my

Installation

Add this line to your application's Gemfile:

gem 'lazada'

And then execute:

$ bundle

Or install it yourself as:

$ gem install lazada

Lazada::Client

The client is the base for all communication with the API.

client = Lazada::Client.new(api_key, user_id)

Default timezone is 'UTC'. Can be specified otherwise. Refer to lib/lazada/client.

Lazada::Client methods

Lazada::Client#get_products

Get all or a range of products.

client.get_products(filter)

Possible filter values are all, live, inactive, deleted, image-missing, pending, rejected, sold-out.

Lazada::Client#create_product

Create a new product.

client.create_product({ 'SellerSku' => 'lz001A', ... })

Lazada::Client#update_product

Update the attributes of one or more existing products.

client.update_product({ 'SellerSku' => 'lz001A', 'Price' => 12  })

Lazada::Client#remove_product

Removes one or more products

client.remove_product(seller_sku)

Lazada::Client#get_categories

Get the list of all product categories.

client.get_categories

Lazada::Client#get_category_attributes

Returns a list of attributes with options for a given category.

cleint.get_category_attributes(primary_category_id)

Lazada::Client#get_orders

Get the customer details for a range of orders.

client.get_orders({ status: status })

Possible status values are pending, canceled, ready_to_ship, delivered, returned, shipped and failed.

Lazada::Client#get_order

Get the order items for a single order.

client.get_order(order_id)

Lazada::Client#get_order_items

Returns the items for one order.

client.get_order_items(order_id)

Lazada::Client#set_images

Set the Images for a Product, by associating one or more URLs with it.

client.set_images({ 'ProductImage' => { 'SellerSku' => 'lz001A', 'images' => { ... } } })

Lazada::Client#feed_status

Returns detailed information about a specified feed.

client.feed_status(feed_id)

Lazada::Client#feed_list

Returns all feeds created in the last 30 days.

client.feed_list

Development

After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/yoolk/lazada. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.