Class: Avangate::SOAP

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

Class Method Summary collapse

Class Method Details

.add_product(options = {}) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/avangate.rb', line 22

def self.add_product(options={})
  @options = options
  require_session_id
  require_product_id
  response = client.call :add_product, message: add_product_params
  return response.body[:add_product_response][:add_product_return]
end

.get_product_by_code(options = {}) ⇒ Object



38
39
40
41
42
43
44
# File 'lib/avangate.rb', line 38

def self.get_product_by_code(options={})
  @options = options
  require_session_id
  require_product_code
  response = client.call :get_product_by_code, message: get_product_by_code_params
  return response.body[:get_product_by_code_response][:get_product_by_code_return]
end

.loginObject



13
14
15
16
17
18
19
20
# File 'lib/avangate.rb', line 13

def self.
  begin
    response = client.call :login, message: 
    return response.body[:login_response][:login_return]
  rescue Savon::SOAPFault => e
    return false
  end
end

.set_billing_details(options = {}) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/avangate.rb', line 30

def self.set_billing_details(options={})
  @options = options
  require_session_id
  require_set_billing_details_params
  response = client.call :set_billing_details, message: set_billing_details_params
  return response.body[:set_billing_details_response][:set_billing_details_return]
end