<commit_before># MessageMedia Ruby SDK

This library provides a simple interface for sending and receiving messages using the [MessageMedia SOAP API](http://files.message-media.com.au/docs/MessageMedia_Messaging_Web_Service.pdf).

The following actions have been implemented:

  * sendMessages
  * checkUser
  * checkReplies
  * checkReports
  * confirmReplies
  * confirmReports

## Installation

The messagemedia-soap Gem can be installed from Rubygems:

    gem install messagemedia-soap

## Usage

### Initialise the client

Initialise the client using your MessageMedia username and password:

    require 'messagemedia-soap'

    client = Messagemedia::SOAP::Client.new(YOUR_USERNAME, YOUR_PASSWORD)

### Send Messages

To send a single message:

    client.send_message(<TO_NUMBER>, <MESSAGE>, <MESSSAGE_ID>)

To send multiple messages:

    # Construct the first Message object
    message1 = Messagemedia::SOAP::Message.new
    message1.content = "Content of Message"
    message1.delivery_report = true
    message1.origin = "My Company"
    message1.add_recipient(FIRST_MESSAGE_ID, TO_NUMBER)

    # Construct the second Message object
    message2 = Messagemedia::SOAP::Message.new<commit_msg>SUPPORTANZ-1103: Consolidate README.md across MessageMedia SOAP repositories<commit_after># MessageMedia Ruby SDK

This library provides a simple interface for sending and receiving messages using the [MessageMedia SOAP API](http://www.messagemedia.com.au/wp-content/uploads/2013/05/MessageMedia_Messaging_Web_Service.pdf?eacfbb).

If you have any issue using this sample code, or would like to report a defect, you could [create a new Issue](https://github.com/messagemedia/messagemedia-ruby/issues/new) in Github or [Contact us](http://www.messagemedia.com.au/contact-us).

## Installation

The messagemedia-soap Gem can be installed from Rubygems:

    gem install messagemedia-soap

## Usage

The following actions have been implemented:

  * sendMessages
  * checkUser
  * checkReplies
  * checkReports
  * confirmReplies
  * confirmReports

### Initialise the client

Initialise the client using your MessageMedia username and password:

    require 'messagemedia-soap'

    client = Messagemedia::SOAP::Client.new(YOUR_USERNAME, YOUR_PASSWORD)

### Send Messages

To send a single message:

    client.send_message(<TO_NUMBER>, <MESSAGE>, <MESSSAGE_ID>)

To send multiple messages:

    # Construct the first Message object
    message1 = Messagemedia::SOAP::Message.new
    message1.content = "Content of Message"
    message1.delivery_report = true
    message1.origin = "My Company"
    message1.add_recipient(FIRST_MESSAGE_ID, TO_NUMBER)

    # Construct the second Message object
    message2 = Messagemedia::SOAP::Message.new
{'fraction_non_alphanumeric': 0.08056872037914692, 'fraction_numerical': 0.008020415603353991, 'mean_word_length': 4.622950819672131, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5571818', 'n_tokens_mistral': 827, 'n_tokens_neox': 787, 'n_words': 234}