Class: Perpetto::API

Inherits:
Object
  • Object
show all
Defined in:
lib/perpetto/api.rb

Instance Method Summary collapse

Constructor Details

#initialize(account_id, secret) ⇒ API

Returns a new instance of API.



8
9
10
11
# File 'lib/perpetto/api.rb', line 8

def initialize(, secret)
  @account_id = 
  @secret = secret
end

Instance Method Details

#cart_paid(cart_id) ⇒ Object



25
26
27
# File 'lib/perpetto/api.rb', line 25

def cart_paid(cart_id)
  post('backend_track/cart_paid', {cart_id: cart_id})
end

#delete_profile_data(email) ⇒ Object



45
46
47
# File 'lib/perpetto/api.rb', line 45

def delete_profile_data(email)
  post('backend_action/delete_profile', {email: email})
end

#delete_store_dataObject



41
42
43
# File 'lib/perpetto/api.rb', line 41

def delete_store_data
  post('backend_action/delete_domain')
end

#get_campaignsObject



21
22
23
# File 'lib/perpetto/api.rb', line 21

def get_campaigns
  get('info/campaigns')
end

#get_containersObject



17
18
19
# File 'lib/perpetto/api.rb', line 17

def get_containers
  get('info/containers')
end

#get_shop_infoObject



13
14
15
# File 'lib/perpetto/api.rb', line 13

def get_shop_info
  get('')
end

#item_updated(item_id, item_hash) ⇒ Object



33
34
35
# File 'lib/perpetto/api.rb', line 33

def item_updated(item_id, item_hash)
  post('backend_track/items_updated', {items: {item_id => item_hash}})
end

#order_voided(cart_id) ⇒ Object



29
30
31
# File 'lib/perpetto/api.rb', line 29

def order_voided(cart_id)
  post('backend_track/order_voided', {cart_id: cart_id})
end

#profile_info(email) ⇒ Object



37
38
39
# File 'lib/perpetto/api.rb', line 37

def profile_info(email)
  get("info/profile", {email: email})
end