Class: Stosp::Client

Inherits:
Object
  • Object
show all
Includes:
HTTParty, AvailableDistributors, Calculate, CheckOrders, Connection, Create, ExportFullReport, ExportPurchasesList, Import, ProcessOrders, PurchaseExport, PurchaseExportMeta, StickerPrint
Defined in:
lib/stosp/client.rb,
lib/stosp/client/create.rb,
lib/stosp/client/import.rb,
lib/stosp/client/calculate.rb,
lib/stosp/client/connection.rb,
lib/stosp/client/check_orders.rb,
lib/stosp/client/sticker_print.rb,
lib/stosp/client/process_orders.rb,
lib/stosp/client/purchase_export.rb,
lib/stosp/client/export_full_report.rb,
lib/stosp/client/purchase_export_meta.rb,
lib/stosp/client/export_purchases_list.rb,
lib/stosp/client/available_distributors.rb

Defined Under Namespace

Modules: AvailableDistributors, Calculate, CheckOrders, Connection, Create, ExportFullReport, ExportPurchasesList, Import, ProcessOrders, PurchaseExport, PurchaseExportMeta, StickerPrint

Instance Method Summary collapse

Methods included from StickerPrint

#sticker_print

Methods included from PurchaseExportMeta

#purchase_export_meta

Methods included from PurchaseExport

#purchase_export

Methods included from ProcessOrders

#process_orders

Methods included from Import

#import

Methods included from ExportPurchasesList

#export_purchases_list

Methods included from ExportFullReport

#export_full_report

Methods included from Create

#create

Methods included from CheckOrders

#check_orders

Methods included from Calculate

#calculate

Methods included from AvailableDistributors

#available_distributors

Methods included from Connection

#delete, #get, #post, #put

Constructor Details

#initialize(access_token:) ⇒ Client

Returns a new instance of Client.



32
33
34
35
36
# File 'lib/stosp/client.rb', line 32

def initialize(access_token:)
  @access_token = access_token
  self.class.base_uri 'https://www.100sp.ru'
  self.class.headers 'x-api-key' => @access_token
end