Class: Mogreet::Transaction

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

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Transaction

Returns a new instance of Transaction.



3
4
5
# File 'lib/mogreet/transaction.rb', line 3

def initialize(client)
  @client = client
end

Instance Method Details

#lookup(options) ⇒ Object

client_id Your client id. Log onto the Campaign Manager to access your client id. token Your token. Log onto the Campaign Manager to access your token. message_id A unique ID returned from a successful transaction.send request or from

user.transactions method. hash A hash returned from a successful transaction.send request or from a user.transactions method.



25
26
27
28
# File 'lib/mogreet/transaction.rb', line 25

def lookup(options)
  # q6z5e0on
  @client.get_request('/moms/transaction.lookup', options)      
end

#send(options) ⇒ Object

campaign_id: An ID connected to a specific campaign to: The mobile number (MSISDN) of the handset you would like to send to. from: The mobile number (MSISDN) of the handset you would like to send from. Or the shortcode associated with the campaign. (Optional – if not included, this parameter will default to the shortcode associated to the campaign). message: The message presented to the β€œto” user. content_id: An integer value associated to a piece of content ingested through the Campaign Manager or API. content_url: A publicly accessible URL of an image, audio or video. MOMS will automagically ingest the content and deliver it as specified by the campaign flow. (Optional, used for SMS and MMS delivering audio, image or video) callback: If provided with a valid URL, any errors with the transaction will be sent to this URL via XML over HTTP. See description below.



15
16
17
# File 'lib/mogreet/transaction.rb', line 15

def send(options)
  @client.get_request('/moms/transaction.send', options)      
end