Class: InboundMessageList
- Inherits:
-
Object
- Object
- InboundMessageList
- Defined in:
- lib/response/mms/InboundMessageList.rb
Instance Method Summary collapse
- #getInboundMessage ⇒ Object
- #getNumberOfMessagesInThisBatch ⇒ Object
- #getResourceURL ⇒ Object
- #getTotalNumberOfPendingMessages ⇒ Object
-
#initialize ⇒ InboundMessageList
constructor
A new instance of InboundMessageList.
- #initializeJSON(jsondict) ⇒ Object
- #setInboundMessage(inboundMessage) ⇒ Object
- #setNumberOfMessagesInThisBatch(numberOfMessagesInThisBatch) ⇒ Object
- #setResourceURL(resourceURL) ⇒ Object
- #setTotalNumberOfPendingMessages(totalNumberOfPendingMessages) ⇒ Object
Constructor Details
#initialize ⇒ InboundMessageList
Returns a new instance of InboundMessageList.
5 6 7 8 9 10 |
# File 'lib/response/mms/InboundMessageList.rb', line 5 def initialize @inboundMessage=nil @numberOfMessagesInThisBatch=0 @resourceURL=nil @totalNumberOfPendingMessages=0 end |
Instance Method Details
#getInboundMessage ⇒ Object
42 43 44 |
# File 'lib/response/mms/InboundMessageList.rb', line 42 def getInboundMessage @inboundMessage end |
#getNumberOfMessagesInThisBatch ⇒ Object
50 51 52 |
# File 'lib/response/mms/InboundMessageList.rb', line 50 def getNumberOfMessagesInThisBatch @numberOfMessagesInThisBatch end |
#getResourceURL ⇒ Object
58 59 60 |
# File 'lib/response/mms/InboundMessageList.rb', line 58 def getResourceURL @resourceURL end |
#getTotalNumberOfPendingMessages ⇒ Object
66 67 68 |
# File 'lib/response/mms/InboundMessageList.rb', line 66 def getTotalNumberOfPendingMessages @totalNumberOfPendingMessages end |
#initializeJSON(jsondict) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/response/mms/InboundMessageList.rb', line 12 def initializeJSON(jsondict) @inboundMessage=nil if (jsondict!=nil) && (jsondict.has_key?'inboundMessage') && (jsondict['inboundMessage']!=nil) @inboundMessage=Array.new() fieldValue=jsondict['inboundMessage'] if fieldValue.kind_of?Array for item in fieldValue ai=@inboundMessage.length @inboundMessage[ai]=InboundMMSMessage.new() @inboundMessage[ai].initializeJSON(item) end else @inboundMessage[0]=InboundMMSMessage.new() @inboundMessage[0].initializeJSON(fieldValue) end end @numberOfMessagesInThisBatch=0 if (jsondict!=nil) && (jsondict.has_key?'numberOfMessagesInThisBatch') && (jsondict['numberOfMessagesInThisBatch']!=nil) @numberOfMessagesInThisBatch=jsondict['numberOfMessagesInThisBatch'].to_i end @resourceURL=nil if (jsondict!=nil) && (jsondict.has_key?'resourceURL') && (jsondict['resourceURL']!=nil) @resourceURL=jsondict['resourceURL'] end @totalNumberOfPendingMessages=0 if (jsondict!=nil) && (jsondict.has_key?'totalNumberOfPendingMessages') && (jsondict['totalNumberOfPendingMessages']!=nil) @totalNumberOfPendingMessages=jsondict['totalNumberOfPendingMessages'].to_i end end |
#setInboundMessage(inboundMessage) ⇒ Object
46 47 48 |
# File 'lib/response/mms/InboundMessageList.rb', line 46 def setInboundMessage(inboundMessage) @inboundMessage=inboundMessage end |
#setNumberOfMessagesInThisBatch(numberOfMessagesInThisBatch) ⇒ Object
54 55 56 |
# File 'lib/response/mms/InboundMessageList.rb', line 54 def setNumberOfMessagesInThisBatch(numberOfMessagesInThisBatch) @numberOfMessagesInThisBatch=numberOfMessagesInThisBatch end |
#setResourceURL(resourceURL) ⇒ Object
62 63 64 |
# File 'lib/response/mms/InboundMessageList.rb', line 62 def setResourceURL(resourceURL) @resourceURL=resourceURL end |
#setTotalNumberOfPendingMessages(totalNumberOfPendingMessages) ⇒ Object
70 71 72 |
# File 'lib/response/mms/InboundMessageList.rb', line 70 def setTotalNumberOfPendingMessages(totalNumberOfPendingMessages) @totalNumberOfPendingMessages=totalNumberOfPendingMessages end |