Class: Gangway::Subscriber

Inherits:
Object
  • Object
show all
Extended by:
Call
Defined in:
lib/gangway/subscriber.rb

Constant Summary

Constants included from Session

Gangway::Session::ENDPOINTS

Class Method Summary collapse

Methods included from Call

call, new_session_id, session, session_id

Class Method Details

.add(params) ⇒ Object



7
8
9
# File 'lib/gangway/subscriber.rb', line 7

def self.add(params)
  call(:add_subscriber, params)
end

.change_email(params) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/gangway/subscriber.rb', line 19

def self.change_email(params)
  begin
    call(:change_email, params)
  rescue Savon::SOAPFault => e
    if e.message =~ /invalid email address/
      # ignore
      false
    else
      raise e
    end
  end

end

.get(params) ⇒ Object



11
12
13
# File 'lib/gangway/subscriber.rb', line 11

def self.get(params)
  call(:get_subscriber, params)
end

.subscription_status(params) ⇒ Object



15
16
17
# File 'lib/gangway/subscriber.rb', line 15

def self.subscription_status(params)
  call(:get_subscription_status, params)
end