Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 0 additions & 56 deletions lib/veeqo/resources/allocation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,61 +5,5 @@
module Veeqo
class Allocation < Resource
include Veeqo::SubresourceActions.new(uri: 'orders/%d/allocations/%d', disable: %i[destroy_all all find])

property :id
property :additional_order_level_taxless_discount
property :allocated_completely
property :allocations
property :allocated_by_id
property :buyer_user_id
property :cancel_reason
property :cancelled_at
property :cancelled_by
property :channel
property :created_at
property :created_by
property :customer
property :customer_note
property :customer_viewable_notes
property :deliver_to
property :delivery_cost
property :delivery_method
property :due_date
property :employee_notes
property :fulfilled_by_amazon
property :fulfillment_channel_order
property :international
property :is_amazon_premium_order
property :is_amazon_prime
property :line_items
property :matched_parcel_properties_criteria
property :notes
property :number
property :order_id
property :packed_completely
property :payment
property :picked_completely
property :receipt_printed
property :recommended_shipping_options
property :refund_amount
property :restock_shipped_items
property :returns
property :send_notification_email
property :send_refund_email
property :shipment
property :shipped_at
property :status
property :subtotal_price
property :tags
property :till_id
property :total_discounts
property :total_fees
property :total_price
property :total_tax
property :total_weight
property :updated_at
property :updated_by
property :weight_unit
property :warehouse
end
end
62 changes: 0 additions & 62 deletions lib/veeqo/resources/channel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,67 +5,5 @@
module Veeqo
class Channel < Resource
include Veeqo::ResourceActions.new(uri: 'channels/%d', disable: [:destroy_all])

property :id
property :type_code
property :created_by_id
property :name
property :currency_code
property :state
property :url
property :shopify_url
property :ebay_url
property :ebay_site_code_id
property :country
property :region
property :city
property :address_line_1
property :address_line_2
property :post_code
property :pulled_products_at
property :pulled_orders_at
property :pending_setup
property :seller_id
property :marketplace_id
property :mws_auth_token
property :deleted_at
property :deleted_by_id
property :api2cart_store_key
property :bridge_url
property :bridge_verified
property :pull_pending_orders
property :default_send_shipment_email
property :automatic_product_linking_disabled
property :update_remote_order
property :successfully_fetched_stock_levels_at
property :create_product_if_unmatched
property :skip_title_matching
property :email
property :skip_fba_orders_and_products
property :pull_stock_level_required
property :pull_historical_orders
property :adjust_orders_tax_rate
property :send_notification_emails_to_customers
property :end_ebay_listing_on_out_of_stock
property :update_product_attributes
property :max_qty_to_advert
property :min_threshold_qty
property :percent_of_qty
property :always_set_qty
property :veeqo_dictates_stock_level
property :with_fba
property :first_sync_finish_notice_marked_as_read
property :pull_unpaid_shopify_orders
property :create_product_on_ended_listings
property :channel_warehouses
property :warehouses
property :stock_level_update_requests
property :channel_specific
property :time_since_product_sync
property :time_since_order_sync
property :time_since_tried_fetch_stock_level
property :time_since_successfully_fetch_stock_level
property :default_warehouse
property :remote
end
end
20 changes: 0 additions & 20 deletions lib/veeqo/resources/company.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,6 @@ module Veeqo
class Company < Resource
include Veeqo::Request.new 'current_company'

property :id
property :name
property :created_at
property :updated_at
property :card_valid
property :stripe_customer_id
property :has_right_to_use_veeqo
property :subscription_status
property :billing_period_started
property :chargify_product_handle
property :chargify_current_plan
property :trial_end_date
property :can_change_subscription_plan
property :has_ever_created_remote_channel
property :owner
property :subscription_plan
property :employees
property :guide_progress
property :settings

def self.info(params = {})
get path.build, params
end
Expand Down
8 changes: 0 additions & 8 deletions lib/veeqo/resources/customer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,5 @@
module Veeqo
class Customer < Resource
include Veeqo::ResourceActions.new(uri: 'customers/%d', disable: %i[destroy destroy_all])

property :id
property :email
property :phone
property :mobile
property :created_by_id
property :billing_address
property :shipping_addresses
end
end
7 changes: 0 additions & 7 deletions lib/veeqo/resources/delivery_method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,5 @@
module Veeqo
class DeliveryMethod < Resource
include Veeqo::ResourceActions.new(uri: 'delivery_methods/%d', disable: %i[destroy_all count])

property :id
property :cost
property :name
property :user_id
property :created_at
property :updated_at
end
end
42 changes: 0 additions & 42 deletions lib/veeqo/resources/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,6 @@ module Veeqo
class Order < Resource
include Veeqo::ResourceActions.new(uri: 'orders/%d', disable: %i[destroy destroy_all])

property :id
property :allocated_completely
property :allocations
property :buyer_user_id
property :cancel_reason
property :cancelled_at
property :cancelled_by
property :channel
property :created_at
property :created_by
property :customer
property :customer_note
property :customer_viewable_notes
property :deliver_to
property :delivery_cost
property :delivery_method
property :due_date
property :employee_notes
property :fulfilled_by_amazon
property :international
property :line_items
property :notes
property :number
property :packed_completely
property :payment
property :picked_completely
property :receipt_printed
property :refund_amount
property :returns
property :send_notification_email
property :send_refund_email
property :shipped_at
property :status
property :subtotal_price
property :tags
property :till_id
property :total_discounts
property :total_price
property :total_tax
property :updated_at
property :updated_by

def self.bulk_tagging(resource_ids, tag_ids, params = {})
raise ArgumentError if resource_ids.empty? || tag_ids.empty?
post 'https://app.veeqo.com/bulk_tagging', { order_ids: [*resource_ids], tag_ids: [*tag_ids] }.merge(params)
Expand Down
37 changes: 0 additions & 37 deletions lib/veeqo/resources/product.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,6 @@ module Veeqo
class Product < Resource
include Veeqo::ResourceActions.new uri: 'products/%d'

property :id
property :active_channels
property :brand
property :channel_products
property :created_at
property :created_by_id
property :deleted_at
property :deleted_by_id
property :description
property :estimated_delivery
property :hs_tariff_number
property :image
property :inventory
property :main_image
property :main_image_src
property :notes
property :on_hand_value
property :origin_country
property :product_tax_rate_id
property :sellables
property :stock_level_sync_status
property :tags
property :tax_rate
property :title
property :total_allocated_stock_level
property :total_available_stock_level
property :total_quantity_sold
property :total_stock_level
property :updated_at
property :updated_by_id
property :web_meta_description
property :web_meta_keywords
property :web_meta_title
property :web_page_title
property :web_page_url
property :weight

def self.update_suppliers(resource_id, params = {})
include Veeqo::ResourceActions.new uri: 'supplier_product_variants'
raise ArgumentError if resource_id.nil?
Expand Down
25 changes: 0 additions & 25 deletions lib/veeqo/resources/purchase_order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,6 @@ module Veeqo
class PurchaseOrder < Resource
include Veeqo::ResourceActions.new(uri: 'purchase_orders/%d', disable: %i[update destroy destroy_all])

property :id
property :number
property :user_id
property :supplier_id
property :destination_warehouse_id
property :state
property :estimated_delivery_days
property :actual_delivery_days
property :estimated_return_days
property :actual_return_days
property :started_at
property :received_at
property :returned_at
property :completed_at
property :started_or_returned_at_calc
property :arrival_at_calc
property :total_calc
property :created_by_id
property :updated_by_id
property :created_at
property :updated_at
property :send_to_supplier
property :line_items
property :supplier

def self.create(params = {})
post path.build, params
rescue Oj::ParseError
Expand Down
5 changes: 2 additions & 3 deletions lib/veeqo/resources/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
require 'veeqo/subresource_actions'

module Veeqo
class Resource < Hashie::Trash
include Hashie::Extensions::MethodAccess
include Hashie::Extensions::IgnoreUndeclared
class Resource < Hashie::Mash
disable_warnings
end
end
12 changes: 0 additions & 12 deletions lib/veeqo/resources/shipment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,5 @@
module Veeqo
class Shipment < Resource
include Veeqo::ResourceActions.new(uri: 'shipments/%d', disable: %i[find all count destroy_all])

property :allocation_id
property :carrier
property :carrier_id
property :created_at
property :id
property :notify_customer
property :order_id
property :shipped_by_id
property :tracking_number
property :update_remote_order
property :weight
end
end
13 changes: 0 additions & 13 deletions lib/veeqo/resources/stock_entry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,5 @@
module Veeqo
class StockEntry < Resource
include Veeqo::SubresourceActions.new(uri: 'sellables/%d/warehouses/%d/stock_entry', disable: %i[destroy destroy_all all create])
property :allocated_stock_level
property :available_stock_level
property :id
property :incoming_stock_level
property :infinite
property :location
property :physical_stock_level
property :sellable_id
property :sellable_on_hand_value
property :stock_running_low
property :updated_at
property :warehouse
property :warehouse_id
end
end
26 changes: 0 additions & 26 deletions lib/veeqo/resources/supplier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,6 @@ module Veeqo
class Supplier < Resource
include Veeqo::ResourceActions.new(uri: 'suppliers/%d', disable: %i[find create destroy destroy_all])

property :id
property :name
property :address_line_1
property :address_line_2
property :city
property :region
property :country
property :post_code
property :sales_contact_name
property :sales_contact_email
property :accounting_contact_name
property :accounting_contact_email
property :credit_limit
property :currency_code
property :created_by_id
property :updated_by_id
property :deleted_at
property :deleted_by_id
property :created_at
property :updated_at
property :sales_phone_number
property :accounting_phone_number
property :bank_account_number
property :bank_sort_code
property :bank_name

def self.create(params = {})
post path.build, params
rescue Veeqo::NotAccepted
Expand Down
Loading