Class: Mogreet::Transaction
- Inherits:
-
Object
- Object
- Mogreet::Transaction
- Defined in:
- lib/mogreet/transaction.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ Transaction
constructor
A new instance of Transaction.
-
#lookup(options) ⇒ Object
client_id Your client id.
-
#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.
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() # q6z5e0on @client.get_request('/moms/transaction.lookup', ) 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() @client.get_request('/moms/transaction.send', ) end |