Class: Esendex

Inherits:
Object
  • Object
show all
Defined in:
lib/xednese.rb,
lib/xednese/batch.rb,
lib/xednese/users.rb,
lib/xednese/client.rb,
lib/xednese/account.rb,
lib/xednese/batches.rb,
lib/xednese/version.rb,
lib/xednese/accounts.rb,
lib/xednese/messages.rb,
lib/xednese/requests/batch.rb,
lib/xednese/responses/batch.rb,
lib/xednese/account/messages.rb,
lib/xednese/requests/account.rb,
lib/xednese/responses/parser.rb,
lib/xednese/responses/status.rb,
lib/xednese/requests/messages.rb,
lib/xednese/responses/account.rb,
lib/xednese/responses/batches.rb,
lib/xednese/account/dispatcher.rb,
lib/xednese/responses/accounts.rb,
lib/xednese/responses/message_header.rb,
lib/xednese/responses/message_headers.rb,
lib/xednese/responses/message_dispatcher_headers.rb

Defined Under Namespace

Modules: Requests, Responses Classes: Account, Accounts, Batch, Batches, Client, Credentials, Messages, Users

Constant Summary collapse

VERSION =
'0.1.0'

Instance Method Summary collapse

Constructor Details

#initialize(username, password) ⇒ Esendex

Returns a new instance of Esendex.

Parameters:

  • username (String)
  • password (String)


40
41
42
# File 'lib/xednese.rb', line 40

def initialize(username, password)
  @credentials = Credentials.new(username, password)
end

Instance Method Details

#account(reference) ⇒ Account

Parameters:

  • reference (String)

Returns:

See Also:



47
48
49
# File 'lib/xednese.rb', line 47

def (reference)
  accounts.find {|a| a.reference == reference }
end

#accountsAccounts



53
54
55
# File 'lib/xednese.rb', line 53

def accounts
  Accounts.new(@credentials)
end

#batchesBatches



64
65
66
# File 'lib/xednese.rb', line 64

def batches
  Batches.new(@credentials)
end

#messagesMessages



70
71
72
# File 'lib/xednese.rb', line 70

def messages
  Messages.new(@credentials)
end

#usersUsers

Returns:



58
59
60
# File 'lib/xednese.rb', line 58

def users
  Users.new(@credentials)
end