Module: Vendasta::RI::Accounts

Defined in:
lib/vendasta/ri.rb

Overview

Accounts

Class Method Summary collapse

Class Method Details

.getAccount(customerIdentifier) ⇒ Object

Get Accounts by ID



33
34
35
36
37
38
39
40
41
# File 'lib/vendasta/ri.rb', line 33

def self.getAccount(customerIdentifier) # Get Accounts by ID
  response = HTTParty.get("#{OPTIONS[:endpoint]}/account/get/", :query => {:apiUser => ENV["VENDASTA_RI_APIUSER"], :apiKey => ENV["VENDASTA_RI_APIKEY"], :customerIdentifier => customerIdentifier})

  if response.success?
    response = JSON.parse(response.body)
  else
    response = JSON.parse(response.body)
  end
end

.ipsumObject



17
18
19
20
21
# File 'lib/vendasta/ri.rb', line 17

def self.ipsum
puts "hi"
puts ENV["VENDASTA_RI_APIUSER"]
puts ENV["VENDASTA_RI_APIKEY"]
end

.lookupAccountsObject

Lookup Accounts



23
24
25
26
27
28
29
30
31
# File 'lib/vendasta/ri.rb', line 23

def self.lookupAccounts # Lookup Accounts
  response = HTTParty.get("#{OPTIONS[:endpoint]}/account/lookup/", :query => {:apiUser => ENV["VENDASTA_RI_APIUSER"], :apiKey => ENV["VENDASTA_RI_APIKEY"]})

  if response.success?
    response = JSON.parse(response.body)
  else
    response = JSON.parse(response.body)
  end
end