oneapi 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +37 -0
- data/Rakefile +2 -0
- data/lib/endpoints/ServiceEndpoints.rb +144 -0
- data/lib/foundation/FormParameter.rb +25 -0
- data/lib/foundation/FormParameters.rb +39 -0
- data/lib/foundation/JSONRequest.rb +109 -0
- data/lib/location/Locate.rb +100 -0
- data/lib/mms/MMSRetrieve.rb +198 -0
- data/lib/mms/MMSSend.rb +205 -0
- data/lib/oneapi.rb +6 -0
- data/lib/oneapi/version.rb +3 -0
- data/lib/payment/Charge.rb +166 -0
- data/lib/payment/Reservation.rb +295 -0
- data/lib/response/Attachment.rb +50 -0
- data/lib/response/HTTPResponse.rb +63 -0
- data/lib/response/PolicyException.rb +58 -0
- data/lib/response/RequestError.rb +41 -0
- data/lib/response/ResourceReference.rb +24 -0
- data/lib/response/ServiceException.rb +50 -0
- data/lib/response/location/CurrentLocation.rb +76 -0
- data/lib/response/location/ErrorInformation.rb +41 -0
- data/lib/response/location/LocationResponse.rb +49 -0
- data/lib/response/location/TerminalLocation.rb +67 -0
- data/lib/response/location/TerminalLocationList.rb +36 -0
- data/lib/response/mms/CallbackReference.rb +37 -0
- data/lib/response/mms/DeliveryInfo.rb +37 -0
- data/lib/response/mms/DeliveryInfoList.rb +49 -0
- data/lib/response/mms/DeliveryInfoNotification.rb +39 -0
- data/lib/response/mms/DeliveryReceiptSubscription.rb +39 -0
- data/lib/response/mms/HTTPResponse.rb +35 -0
- data/lib/response/mms/InboundMMSMessage.rb +37 -0
- data/lib/response/mms/InboundMessage.rb +91 -0
- data/lib/response/mms/InboundMessageList.rb +75 -0
- data/lib/response/mms/InboundMessageNotification.rb +39 -0
- data/lib/response/mms/MMSDeliveryReceiptSubscriptionResponse.rb +49 -0
- data/lib/response/mms/MMSMessageReceiptSubscriptionResponse.rb +49 -0
- data/lib/response/mms/MMSSendDeliveryStatusResponse.rb +49 -0
- data/lib/response/mms/RetrieveMMSMessageResponse.rb +57 -0
- data/lib/response/mms/RetrieveMMSResponse.rb +49 -0
- data/lib/response/mms/SendMMSResponse.rb +49 -0
- data/lib/response/payment/AmountReservationResponse.rb +49 -0
- data/lib/response/payment/AmountReservationTransaction.rb +116 -0
- data/lib/response/payment/AmountResponse.rb +49 -0
- data/lib/response/payment/AmountTransaction.rb +103 -0
- data/lib/response/payment/ChargingInformation.rb +50 -0
- data/lib/response/payment/PaymentAmount.rb +51 -0
- data/lib/response/sms/CallbackReference.rb +37 -0
- data/lib/response/sms/DeliveryInfo.rb +37 -0
- data/lib/response/sms/DeliveryInfoList.rb +49 -0
- data/lib/response/sms/DeliveryInfoNotification.rb +39 -0
- data/lib/response/sms/DeliveryReceiptSubscription.rb +39 -0
- data/lib/response/sms/HTTPResponse.rb +35 -0
- data/lib/response/sms/InboundSMSMessage.rb +89 -0
- data/lib/response/sms/InboundSMSMessageList.rb +75 -0
- data/lib/response/sms/InboundSMSMessageNotification.rb +39 -0
- data/lib/response/sms/RetrieveSMSResponse.rb +49 -0
- data/lib/response/sms/SMSDeliveryReceiptSubscriptionResponse.rb +49 -0
- data/lib/response/sms/SMSMessageReceiptSubscriptionResponse.rb +49 -0
- data/lib/response/sms/SMSSendDeliveryStatusResponse.rb +49 -0
- data/lib/response/sms/SendSMSResponse.rb +49 -0
- data/lib/sms/SMSRetrieve.rb +125 -0
- data/lib/sms/SMSSend.rb +168 -0
- data/oneapi.gemspec +23 -0
- metadata +138 -0
@@ -0,0 +1,49 @@
|
|
1
|
+
require "response/mms/DeliveryInfo"
|
2
|
+
|
3
|
+
class DeliveryInfoList
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@deliveryInfo=nil
|
7
|
+
@resourceURL=nil
|
8
|
+
end
|
9
|
+
|
10
|
+
def initializeJSON(jsondict)
|
11
|
+
@deliveryInfo=nil
|
12
|
+
if (jsondict!=nil) && (jsondict.has_key?'deliveryInfo') && (jsondict['deliveryInfo']!=nil)
|
13
|
+
@deliveryInfo=Array.new()
|
14
|
+
fieldValue=jsondict['deliveryInfo']
|
15
|
+
if fieldValue.kind_of?Array
|
16
|
+
for item in fieldValue
|
17
|
+
ai=@deliveryInfo.length
|
18
|
+
@deliveryInfo[ai]=DeliveryInfo.new()
|
19
|
+
@deliveryInfo[ai].initializeJSON(item)
|
20
|
+
end
|
21
|
+
else
|
22
|
+
@deliveryInfo[0]=DeliveryInfo.new()
|
23
|
+
@deliveryInfo[0].initializeJSON(fieldValue)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
@resourceURL=nil
|
27
|
+
if (jsondict!=nil) && (jsondict.has_key?'resourceURL') && (jsondict['resourceURL']!=nil)
|
28
|
+
@resourceURL=jsondict['resourceURL']
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def getDeliveryInfo
|
33
|
+
@deliveryInfo
|
34
|
+
end
|
35
|
+
|
36
|
+
def setDeliveryInfo(deliveryInfo)
|
37
|
+
@deliveryInfo=deliveryInfo
|
38
|
+
end
|
39
|
+
|
40
|
+
def getResourceURL
|
41
|
+
@resourceURL
|
42
|
+
end
|
43
|
+
|
44
|
+
def setResourceURL(resourceURL)
|
45
|
+
@resourceURL=resourceURL
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require "response/mms/DeliveryInfo"
|
2
|
+
|
3
|
+
class DeliveryInfoNotification
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@callbackData=nil
|
7
|
+
@deliveryInfo=nil
|
8
|
+
end
|
9
|
+
|
10
|
+
def initializeJSON(jsondict)
|
11
|
+
@callbackData=nil
|
12
|
+
if (jsondict!=nil) && (jsondict.has_key?'callbackData') && (jsondict['callbackData']!=nil)
|
13
|
+
@callbackData=jsondict['callbackData']
|
14
|
+
end
|
15
|
+
@deliveryInfo=nil
|
16
|
+
if (jsondict!=nil) && (jsondict.has_key?'deliveryInfo') && (jsondict['deliveryInfo']!=nil) then
|
17
|
+
@deliveryInfo=DeliveryInfo.new
|
18
|
+
@deliveryInfo.initializeJSON(jsondict['deliveryInfo'])
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def getCallbackData
|
23
|
+
@callbackData
|
24
|
+
end
|
25
|
+
|
26
|
+
def setCallbackData(callbackData)
|
27
|
+
@callbackData=callbackData
|
28
|
+
end
|
29
|
+
|
30
|
+
def getDeliveryInfo
|
31
|
+
@deliveryInfo
|
32
|
+
end
|
33
|
+
|
34
|
+
def setDeliveryInfo(deliveryInfo)
|
35
|
+
@deliveryInfo=deliveryInfo
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require "response/mms/CallbackReference"
|
2
|
+
|
3
|
+
class DeliveryReceiptSubscription
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@callbackReference=nil
|
7
|
+
@resourceURL=nil
|
8
|
+
end
|
9
|
+
|
10
|
+
def initializeJSON(jsondict)
|
11
|
+
@callbackReference=nil
|
12
|
+
if (jsondict!=nil) && (jsondict.has_key?'callbackReference') && (jsondict['callbackReference']!=nil) then
|
13
|
+
@callbackReference=CallbackReference.new
|
14
|
+
@callbackReference.initializeJSON(jsondict['callbackReference'])
|
15
|
+
end
|
16
|
+
@resourceURL=nil
|
17
|
+
if (jsondict!=nil) && (jsondict.has_key?'resourceURL') && (jsondict['resourceURL']!=nil)
|
18
|
+
@resourceURL=jsondict['resourceURL']
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def getCallbackReference
|
23
|
+
@callbackReference
|
24
|
+
end
|
25
|
+
|
26
|
+
def setCallbackReference(callbackReference)
|
27
|
+
@callbackReference=callbackReference
|
28
|
+
end
|
29
|
+
|
30
|
+
def getResourceURL
|
31
|
+
@resourceURL
|
32
|
+
end
|
33
|
+
|
34
|
+
def setResourceURL(resourceURL)
|
35
|
+
@resourceURL=resourceURL
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
|
2
|
+
class HTTPResponse
|
3
|
+
|
4
|
+
def initialize
|
5
|
+
@httpResponseCode=0
|
6
|
+
@contentType=nil
|
7
|
+
@location=nil
|
8
|
+
end
|
9
|
+
|
10
|
+
def getHTTPResponseCode
|
11
|
+
@httpResponseCode
|
12
|
+
end
|
13
|
+
|
14
|
+
def setHTTPResponseCode(httpResponseCode)
|
15
|
+
@httpResponseCode=httpResponseCode
|
16
|
+
end
|
17
|
+
|
18
|
+
def getContentType
|
19
|
+
@contentType
|
20
|
+
end
|
21
|
+
|
22
|
+
def setContentType(contentType)
|
23
|
+
@contentType=contentType
|
24
|
+
end
|
25
|
+
|
26
|
+
def getLocation
|
27
|
+
@location
|
28
|
+
end
|
29
|
+
|
30
|
+
def setLocation(location)
|
31
|
+
@location=location
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
|
2
|
+
class InboundMMSMessage
|
3
|
+
|
4
|
+
def initialize
|
5
|
+
@subject=nil
|
6
|
+
@message=nil
|
7
|
+
end
|
8
|
+
|
9
|
+
def initializeJSON(jsondict)
|
10
|
+
@subject=nil
|
11
|
+
if (jsondict!=nil) && (jsondict.has_key?'subject') && (jsondict['subject']!=nil)
|
12
|
+
@subject=jsondict['subject']
|
13
|
+
end
|
14
|
+
@message=nil
|
15
|
+
if (jsondict!=nil) && (jsondict.has_key?'message') && (jsondict['message']!=nil)
|
16
|
+
@message=jsondict['message']
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def getSubject
|
21
|
+
@subject
|
22
|
+
end
|
23
|
+
|
24
|
+
def setSubject(subject)
|
25
|
+
@subject=subject
|
26
|
+
end
|
27
|
+
|
28
|
+
def getMessage
|
29
|
+
@message
|
30
|
+
end
|
31
|
+
|
32
|
+
def setMessage(message)
|
33
|
+
@message=message
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
end
|
@@ -0,0 +1,91 @@
|
|
1
|
+
require "response/mms/InboundMMSMessage"
|
2
|
+
|
3
|
+
class InboundMessage
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@dateTime=nil
|
7
|
+
@destinationAddress=nil
|
8
|
+
@senderAddress=nil
|
9
|
+
@inboundMMSMessage=nil
|
10
|
+
@messageId=nil
|
11
|
+
@resourceURL=nil
|
12
|
+
end
|
13
|
+
|
14
|
+
def initializeJSON(jsondict)
|
15
|
+
@dateTime=nil
|
16
|
+
if (jsondict!=nil) && (jsondict.has_key?'dateTime') && (jsondict['dateTime']!=nil)
|
17
|
+
@dateTime=jsondict['dateTime']
|
18
|
+
end
|
19
|
+
@destinationAddress=nil
|
20
|
+
if (jsondict!=nil) && (jsondict.has_key?'destinationAddress') && (jsondict['destinationAddress']!=nil)
|
21
|
+
@destinationAddress=jsondict['destinationAddress']
|
22
|
+
end
|
23
|
+
@senderAddress=nil
|
24
|
+
if (jsondict!=nil) && (jsondict.has_key?'senderAddress') && (jsondict['senderAddress']!=nil)
|
25
|
+
@senderAddress=jsondict['senderAddress']
|
26
|
+
end
|
27
|
+
@inboundMMSMessage=nil
|
28
|
+
if (jsondict!=nil) && (jsondict.has_key?'inboundMMSMessage') && (jsondict['inboundMMSMessage']!=nil) then
|
29
|
+
@inboundMMSMessage=InboundMMSMessage.new
|
30
|
+
@inboundMMSMessage.initializeJSON(jsondict['inboundMMSMessage'])
|
31
|
+
end
|
32
|
+
@messageId=nil
|
33
|
+
if (jsondict!=nil) && (jsondict.has_key?'messageId') && (jsondict['messageId']!=nil)
|
34
|
+
@messageId=jsondict['messageId']
|
35
|
+
end
|
36
|
+
@resourceURL=nil
|
37
|
+
if (jsondict!=nil) && (jsondict.has_key?'resourceURL') && (jsondict['resourceURL']!=nil)
|
38
|
+
@resourceURL=jsondict['resourceURL']
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def getDateTime
|
43
|
+
@dateTime
|
44
|
+
end
|
45
|
+
|
46
|
+
def setDateTime(dateTime)
|
47
|
+
@dateTime=dateTime
|
48
|
+
end
|
49
|
+
|
50
|
+
def getDestinationAddress
|
51
|
+
@destinationAddress
|
52
|
+
end
|
53
|
+
|
54
|
+
def setDestinationAddress(destinationAddress)
|
55
|
+
@destinationAddress=destinationAddress
|
56
|
+
end
|
57
|
+
|
58
|
+
def getSenderAddress
|
59
|
+
@senderAddress
|
60
|
+
end
|
61
|
+
|
62
|
+
def setSenderAddress(senderAddress)
|
63
|
+
@senderAddress=senderAddress
|
64
|
+
end
|
65
|
+
|
66
|
+
def getInboundMMSMessage
|
67
|
+
@inboundMMSMessage
|
68
|
+
end
|
69
|
+
|
70
|
+
def setInboundMMSMessage(inboundMMSMessage)
|
71
|
+
@inboundMMSMessage=inboundMMSMessage
|
72
|
+
end
|
73
|
+
|
74
|
+
def getMessageId
|
75
|
+
@messageId
|
76
|
+
end
|
77
|
+
|
78
|
+
def setMessageId(messageId)
|
79
|
+
@messageId=messageId
|
80
|
+
end
|
81
|
+
|
82
|
+
def getResourceURL
|
83
|
+
@resourceURL
|
84
|
+
end
|
85
|
+
|
86
|
+
def setResourceURL(resourceURL)
|
87
|
+
@resourceURL=resourceURL
|
88
|
+
end
|
89
|
+
|
90
|
+
|
91
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require "response/mms/InboundMMSMessage"
|
2
|
+
|
3
|
+
class InboundMessageList
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@inboundMessage=nil
|
7
|
+
@numberOfMessagesInThisBatch=0
|
8
|
+
@resourceURL=nil
|
9
|
+
@totalNumberOfPendingMessages=0
|
10
|
+
end
|
11
|
+
|
12
|
+
def initializeJSON(jsondict)
|
13
|
+
@inboundMessage=nil
|
14
|
+
if (jsondict!=nil) && (jsondict.has_key?'inboundMessage') && (jsondict['inboundMessage']!=nil)
|
15
|
+
@inboundMessage=Array.new()
|
16
|
+
fieldValue=jsondict['inboundMessage']
|
17
|
+
if fieldValue.kind_of?Array
|
18
|
+
for item in fieldValue
|
19
|
+
ai=@inboundMessage.length
|
20
|
+
@inboundMessage[ai]=InboundMMSMessage.new()
|
21
|
+
@inboundMessage[ai].initializeJSON(item)
|
22
|
+
end
|
23
|
+
else
|
24
|
+
@inboundMessage[0]=InboundMMSMessage.new()
|
25
|
+
@inboundMessage[0].initializeJSON(fieldValue)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
@numberOfMessagesInThisBatch=0
|
29
|
+
if (jsondict!=nil) && (jsondict.has_key?'numberOfMessagesInThisBatch') && (jsondict['numberOfMessagesInThisBatch']!=nil)
|
30
|
+
@numberOfMessagesInThisBatch=jsondict['numberOfMessagesInThisBatch'].to_i
|
31
|
+
end
|
32
|
+
@resourceURL=nil
|
33
|
+
if (jsondict!=nil) && (jsondict.has_key?'resourceURL') && (jsondict['resourceURL']!=nil)
|
34
|
+
@resourceURL=jsondict['resourceURL']
|
35
|
+
end
|
36
|
+
@totalNumberOfPendingMessages=0
|
37
|
+
if (jsondict!=nil) && (jsondict.has_key?'totalNumberOfPendingMessages') && (jsondict['totalNumberOfPendingMessages']!=nil)
|
38
|
+
@totalNumberOfPendingMessages=jsondict['totalNumberOfPendingMessages'].to_i
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def getInboundMessage
|
43
|
+
@inboundMessage
|
44
|
+
end
|
45
|
+
|
46
|
+
def setInboundMessage(inboundMessage)
|
47
|
+
@inboundMessage=inboundMessage
|
48
|
+
end
|
49
|
+
|
50
|
+
def getNumberOfMessagesInThisBatch
|
51
|
+
@numberOfMessagesInThisBatch
|
52
|
+
end
|
53
|
+
|
54
|
+
def setNumberOfMessagesInThisBatch(numberOfMessagesInThisBatch)
|
55
|
+
@numberOfMessagesInThisBatch=numberOfMessagesInThisBatch
|
56
|
+
end
|
57
|
+
|
58
|
+
def getResourceURL
|
59
|
+
@resourceURL
|
60
|
+
end
|
61
|
+
|
62
|
+
def setResourceURL(resourceURL)
|
63
|
+
@resourceURL=resourceURL
|
64
|
+
end
|
65
|
+
|
66
|
+
def getTotalNumberOfPendingMessages
|
67
|
+
@totalNumberOfPendingMessages
|
68
|
+
end
|
69
|
+
|
70
|
+
def setTotalNumberOfPendingMessages(totalNumberOfPendingMessages)
|
71
|
+
@totalNumberOfPendingMessages=totalNumberOfPendingMessages
|
72
|
+
end
|
73
|
+
|
74
|
+
|
75
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require "response/mms/InboundMessage"
|
2
|
+
|
3
|
+
class InboundMessageNotification
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@callbackData=nil
|
7
|
+
@inboundMessage=nil
|
8
|
+
end
|
9
|
+
|
10
|
+
def initializeJSON(jsondict)
|
11
|
+
@callbackData=nil
|
12
|
+
if (jsondict!=nil) && (jsondict.has_key?'callbackData') && (jsondict['callbackData']!=nil)
|
13
|
+
@callbackData=jsondict['callbackData']
|
14
|
+
end
|
15
|
+
@inboundMessage=nil
|
16
|
+
if (jsondict!=nil) && (jsondict.has_key?'inboundMessage') && (jsondict['inboundMessage']!=nil) then
|
17
|
+
@inboundMessage=InboundMessage.new
|
18
|
+
@inboundMessage.initializeJSON(jsondict['inboundMessage'])
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def getCallbackData
|
23
|
+
@callbackData
|
24
|
+
end
|
25
|
+
|
26
|
+
def setCallbackData(callbackData)
|
27
|
+
@callbackData=callbackData
|
28
|
+
end
|
29
|
+
|
30
|
+
def getInboundMessage
|
31
|
+
@inboundMessage
|
32
|
+
end
|
33
|
+
|
34
|
+
def setInboundMessage(inboundMessage)
|
35
|
+
@inboundMessage=inboundMessage
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require "response/mms/DeliveryReceiptSubscription"
|
2
|
+
|
3
|
+
class MMSDeliveryReceiptSubscriptionResponse
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@httpResponseCode=0
|
7
|
+
@contentType=nil
|
8
|
+
@location=nil
|
9
|
+
@deliveryReceiptSubscription=nil
|
10
|
+
end
|
11
|
+
|
12
|
+
def getHTTPResponseCode
|
13
|
+
@httpResponseCode
|
14
|
+
end
|
15
|
+
|
16
|
+
def setHTTPResponseCode(httpResponseCode)
|
17
|
+
@httpResponseCode=httpResponseCode
|
18
|
+
end
|
19
|
+
|
20
|
+
def getContentType
|
21
|
+
@contentType
|
22
|
+
end
|
23
|
+
|
24
|
+
def setContentType(contentType)
|
25
|
+
@contentType=contentType
|
26
|
+
end
|
27
|
+
|
28
|
+
def getLocation
|
29
|
+
@location
|
30
|
+
end
|
31
|
+
|
32
|
+
def setLocation(location)
|
33
|
+
@location=location
|
34
|
+
end
|
35
|
+
|
36
|
+
def getDeliveryReceiptSubscription
|
37
|
+
@deliveryReceiptSubscription
|
38
|
+
end
|
39
|
+
|
40
|
+
def setDeliveryReceiptSubscription(deliveryReceiptSubscription)
|
41
|
+
@deliveryReceiptSubscription=deliveryReceiptSubscription
|
42
|
+
end
|
43
|
+
|
44
|
+
def setDeliveryReceiptSubscriptionJSON(jsondata)
|
45
|
+
@deliveryReceiptSubscription=DeliveryReceiptSubscription.new
|
46
|
+
@deliveryReceiptSubscription.initializeJSON(jsondata)
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|