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,41 @@
|
|
1
|
+
require "response/ServiceException"
|
2
|
+
require "response/PolicyException"
|
3
|
+
|
4
|
+
class RequestError
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
@serviceException=nil
|
8
|
+
@policyException=nil
|
9
|
+
end
|
10
|
+
|
11
|
+
def initializeJSON(jsondict)
|
12
|
+
@serviceException=nil
|
13
|
+
if (jsondict!=nil) && (jsondict.has_key?'serviceException') && (jsondict['serviceException']!=nil) then
|
14
|
+
@serviceException=ServiceException.new
|
15
|
+
@serviceException.initializeJSON(jsondict['serviceException'])
|
16
|
+
end
|
17
|
+
@policyException=nil
|
18
|
+
if (jsondict!=nil) && (jsondict.has_key?'policyException') && (jsondict['policyException']!=nil) then
|
19
|
+
@policyException=PolicyException.new
|
20
|
+
@policyException.initializeJSON(jsondict['policyException'])
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def getServiceException
|
25
|
+
@serviceException
|
26
|
+
end
|
27
|
+
|
28
|
+
def setServiceException(serviceException)
|
29
|
+
@serviceException=serviceException
|
30
|
+
end
|
31
|
+
|
32
|
+
def getPolicyException
|
33
|
+
@policyException
|
34
|
+
end
|
35
|
+
|
36
|
+
def setPolicyException(policyException)
|
37
|
+
@policyException=policyException
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
class ResourceReference
|
3
|
+
|
4
|
+
def initialize
|
5
|
+
@resourceURL=nil
|
6
|
+
end
|
7
|
+
|
8
|
+
def initializeJSON(jsondict)
|
9
|
+
@resourceURL=nil
|
10
|
+
if (jsondict!=nil) && (jsondict.has_key?'resourceURL') && (jsondict['resourceURL']!=nil)
|
11
|
+
@resourceURL=jsondict['resourceURL']
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def getResourceURL
|
16
|
+
@resourceURL
|
17
|
+
end
|
18
|
+
|
19
|
+
def setResourceURL(resourceURL)
|
20
|
+
@resourceURL=resourceURL
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
|
2
|
+
class ServiceException
|
3
|
+
|
4
|
+
def initialize
|
5
|
+
@messageId=nil
|
6
|
+
@text=nil
|
7
|
+
@variables=nil
|
8
|
+
end
|
9
|
+
|
10
|
+
def initializeJSON(jsondict)
|
11
|
+
@messageId=nil
|
12
|
+
if (jsondict!=nil) && (jsondict.has_key?'messageId') && (jsondict['messageId']!=nil)
|
13
|
+
@messageId=jsondict['messageId']
|
14
|
+
end
|
15
|
+
@text=nil
|
16
|
+
if (jsondict!=nil) && (jsondict.has_key?'text') && (jsondict['text']!=nil)
|
17
|
+
@text=jsondict['text']
|
18
|
+
end
|
19
|
+
@variables=nil
|
20
|
+
if (jsondict!=nil) && (jsondict.has_key?'variables') && (jsondict['variables']!=nil)
|
21
|
+
@variables=jsondict['variables']
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def getMessageId
|
26
|
+
@messageId
|
27
|
+
end
|
28
|
+
|
29
|
+
def setMessageId(messageId)
|
30
|
+
@messageId=messageId
|
31
|
+
end
|
32
|
+
|
33
|
+
def getText
|
34
|
+
@text
|
35
|
+
end
|
36
|
+
|
37
|
+
def setText(text)
|
38
|
+
@text=text
|
39
|
+
end
|
40
|
+
|
41
|
+
def getVariables
|
42
|
+
@variables
|
43
|
+
end
|
44
|
+
|
45
|
+
def setVariables(variables)
|
46
|
+
@variables=variables
|
47
|
+
end
|
48
|
+
|
49
|
+
|
50
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
|
2
|
+
class CurrentLocation
|
3
|
+
|
4
|
+
def initialize
|
5
|
+
@latitude=0.0
|
6
|
+
@longitude=0.0
|
7
|
+
@altitude=0.0
|
8
|
+
@accuracy=0.0
|
9
|
+
@timestamp=nil
|
10
|
+
end
|
11
|
+
|
12
|
+
def initializeJSON(jsondict)
|
13
|
+
@latitude=0.0
|
14
|
+
if (jsondict!=nil) && (jsondict.has_key?'latitude') && (jsondict['latitude']!=nil)
|
15
|
+
@latitude=jsondict['latitude'].to_f
|
16
|
+
end
|
17
|
+
@longitude=0.0
|
18
|
+
if (jsondict!=nil) && (jsondict.has_key?'longitude') && (jsondict['longitude']!=nil)
|
19
|
+
@longitude=jsondict['longitude'].to_f
|
20
|
+
end
|
21
|
+
@altitude=0.0
|
22
|
+
if (jsondict!=nil) && (jsondict.has_key?'altitude') && (jsondict['altitude']!=nil)
|
23
|
+
@altitude=jsondict['altitude'].to_f
|
24
|
+
end
|
25
|
+
@accuracy=0.0
|
26
|
+
if (jsondict!=nil) && (jsondict.has_key?'accuracy') && (jsondict['accuracy']!=nil)
|
27
|
+
@accuracy=jsondict['accuracy'].to_f
|
28
|
+
end
|
29
|
+
@timestamp=nil
|
30
|
+
if (jsondict!=nil) && (jsondict.has_key?'timestamp') && (jsondict['timestamp']!=nil)
|
31
|
+
@timestamp=jsondict['timestamp']
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def getLatitude
|
36
|
+
@latitude
|
37
|
+
end
|
38
|
+
|
39
|
+
def setLatitude(latitude)
|
40
|
+
@latitude=latitude
|
41
|
+
end
|
42
|
+
|
43
|
+
def getLongitude
|
44
|
+
@longitude
|
45
|
+
end
|
46
|
+
|
47
|
+
def setLongitude(longitude)
|
48
|
+
@longitude=longitude
|
49
|
+
end
|
50
|
+
|
51
|
+
def getAltitude
|
52
|
+
@altitude
|
53
|
+
end
|
54
|
+
|
55
|
+
def setAltitude(altitude)
|
56
|
+
@altitude=altitude
|
57
|
+
end
|
58
|
+
|
59
|
+
def getAccuracy
|
60
|
+
@accuracy
|
61
|
+
end
|
62
|
+
|
63
|
+
def setAccuracy(accuracy)
|
64
|
+
@accuracy=accuracy
|
65
|
+
end
|
66
|
+
|
67
|
+
def getTimestamp
|
68
|
+
@timestamp
|
69
|
+
end
|
70
|
+
|
71
|
+
def setTimestamp(timestamp)
|
72
|
+
@timestamp=timestamp
|
73
|
+
end
|
74
|
+
|
75
|
+
|
76
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require "response/ServiceException"
|
2
|
+
require "response/PolicyException"
|
3
|
+
|
4
|
+
class ErrorInformation
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
@serviceException=nil
|
8
|
+
@policyException=nil
|
9
|
+
end
|
10
|
+
|
11
|
+
def initializeJSON(jsondict)
|
12
|
+
@serviceException=nil
|
13
|
+
if (jsondict!=nil) && (jsondict.has_key?'serviceException') && (jsondict['serviceException']!=nil) then
|
14
|
+
@serviceException=ServiceException.new
|
15
|
+
@serviceException.initializeJSON(jsondict['serviceException'])
|
16
|
+
end
|
17
|
+
@policyException=nil
|
18
|
+
if (jsondict!=nil) && (jsondict.has_key?'policyException') && (jsondict['policyException']!=nil) then
|
19
|
+
@policyException=PolicyException.new
|
20
|
+
@policyException.initializeJSON(jsondict['policyException'])
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def getServiceException
|
25
|
+
@serviceException
|
26
|
+
end
|
27
|
+
|
28
|
+
def setServiceException(serviceException)
|
29
|
+
@serviceException=serviceException
|
30
|
+
end
|
31
|
+
|
32
|
+
def getPolicyException
|
33
|
+
@policyException
|
34
|
+
end
|
35
|
+
|
36
|
+
def setPolicyException(policyException)
|
37
|
+
@policyException=policyException
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require "response/location/TerminalLocationList"
|
2
|
+
|
3
|
+
class LocationResponse
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@httpResponseCode=0
|
7
|
+
@contentType=nil
|
8
|
+
@location=nil
|
9
|
+
@terminalLocationList=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 getTerminalLocationList
|
37
|
+
@terminalLocationList
|
38
|
+
end
|
39
|
+
|
40
|
+
def setTerminalLocationList(terminalLocationList)
|
41
|
+
@terminalLocationList=terminalLocationList
|
42
|
+
end
|
43
|
+
|
44
|
+
def setTerminalLocationListJSON(jsondata)
|
45
|
+
@terminalLocationList=TerminalLocationList.new
|
46
|
+
@terminalLocationList.initializeJSON(jsondata)
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
require "response/location/CurrentLocation"
|
2
|
+
require "response/location/ErrorInformation"
|
3
|
+
|
4
|
+
class TerminalLocation
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
@address=nil
|
8
|
+
@currentLocation=nil
|
9
|
+
@errorInformation=nil
|
10
|
+
@locationRetrievalStatus=nil
|
11
|
+
end
|
12
|
+
|
13
|
+
def initializeJSON(jsondict)
|
14
|
+
@address=nil
|
15
|
+
if (jsondict!=nil) && (jsondict.has_key?'address') && (jsondict['address']!=nil)
|
16
|
+
@address=jsondict['address']
|
17
|
+
end
|
18
|
+
@currentLocation=nil
|
19
|
+
if (jsondict!=nil) && (jsondict.has_key?'currentLocation') && (jsondict['currentLocation']!=nil) then
|
20
|
+
@currentLocation=CurrentLocation.new
|
21
|
+
@currentLocation.initializeJSON(jsondict['currentLocation'])
|
22
|
+
end
|
23
|
+
@errorInformation=nil
|
24
|
+
if (jsondict!=nil) && (jsondict.has_key?'errorInformation') && (jsondict['errorInformation']!=nil) then
|
25
|
+
@errorInformation=ErrorInformation.new
|
26
|
+
@errorInformation.initializeJSON(jsondict['errorInformation'])
|
27
|
+
end
|
28
|
+
@locationRetrievalStatus=nil
|
29
|
+
if (jsondict!=nil) && (jsondict.has_key?'locationRetrievalStatus') && (jsondict['locationRetrievalStatus']!=nil)
|
30
|
+
@locationRetrievalStatus=jsondict['locationRetrievalStatus']
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def getAddress
|
35
|
+
@address
|
36
|
+
end
|
37
|
+
|
38
|
+
def setAddress(address)
|
39
|
+
@address=address
|
40
|
+
end
|
41
|
+
|
42
|
+
def getCurrentLocation
|
43
|
+
@currentLocation
|
44
|
+
end
|
45
|
+
|
46
|
+
def setCurrentLocation(currentLocation)
|
47
|
+
@currentLocation=currentLocation
|
48
|
+
end
|
49
|
+
|
50
|
+
def getErrorInformation
|
51
|
+
@errorInformation
|
52
|
+
end
|
53
|
+
|
54
|
+
def setErrorInformation(errorInformation)
|
55
|
+
@errorInformation=errorInformation
|
56
|
+
end
|
57
|
+
|
58
|
+
def getLocationRetrievalStatus
|
59
|
+
@locationRetrievalStatus
|
60
|
+
end
|
61
|
+
|
62
|
+
def setLocationRetrievalStatus(locationRetrievalStatus)
|
63
|
+
@locationRetrievalStatus=locationRetrievalStatus
|
64
|
+
end
|
65
|
+
|
66
|
+
|
67
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require "response/location/TerminalLocation"
|
2
|
+
|
3
|
+
class TerminalLocationList
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@terminalLocation=nil
|
7
|
+
end
|
8
|
+
|
9
|
+
def initializeJSON(jsondict)
|
10
|
+
@terminalLocation=nil
|
11
|
+
if (jsondict!=nil) && (jsondict.has_key?'terminalLocation') && (jsondict['terminalLocation']!=nil)
|
12
|
+
@terminalLocation=Array.new()
|
13
|
+
fieldValue=jsondict['terminalLocation']
|
14
|
+
if fieldValue.kind_of?Array
|
15
|
+
for item in fieldValue
|
16
|
+
ai=@terminalLocation.length
|
17
|
+
@terminalLocation[ai]=TerminalLocation.new()
|
18
|
+
@terminalLocation[ai].initializeJSON(item)
|
19
|
+
end
|
20
|
+
else
|
21
|
+
@terminalLocation[0]=TerminalLocation.new()
|
22
|
+
@terminalLocation[0].initializeJSON(fieldValue)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def getTerminalLocation
|
28
|
+
@terminalLocation
|
29
|
+
end
|
30
|
+
|
31
|
+
def setTerminalLocation(terminalLocation)
|
32
|
+
@terminalLocation=terminalLocation
|
33
|
+
end
|
34
|
+
|
35
|
+
|
36
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
|
2
|
+
class CallbackReference
|
3
|
+
|
4
|
+
def initialize
|
5
|
+
@notifyURL=nil
|
6
|
+
@callbackData=nil
|
7
|
+
end
|
8
|
+
|
9
|
+
def initializeJSON(jsondict)
|
10
|
+
@notifyURL=nil
|
11
|
+
if (jsondict!=nil) && (jsondict.has_key?'notifyURL') && (jsondict['notifyURL']!=nil)
|
12
|
+
@notifyURL=jsondict['notifyURL']
|
13
|
+
end
|
14
|
+
@callbackData=nil
|
15
|
+
if (jsondict!=nil) && (jsondict.has_key?'callbackData') && (jsondict['callbackData']!=nil)
|
16
|
+
@callbackData=jsondict['callbackData']
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def getNotifyURL
|
21
|
+
@notifyURL
|
22
|
+
end
|
23
|
+
|
24
|
+
def setNotifyURL(notifyURL)
|
25
|
+
@notifyURL=notifyURL
|
26
|
+
end
|
27
|
+
|
28
|
+
def getCallbackData
|
29
|
+
@callbackData
|
30
|
+
end
|
31
|
+
|
32
|
+
def setCallbackData(callbackData)
|
33
|
+
@callbackData=callbackData
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
|
2
|
+
class DeliveryInfo
|
3
|
+
|
4
|
+
def initialize
|
5
|
+
@address=nil
|
6
|
+
@deliveryStatus=nil
|
7
|
+
end
|
8
|
+
|
9
|
+
def initializeJSON(jsondict)
|
10
|
+
@address=nil
|
11
|
+
if (jsondict!=nil) && (jsondict.has_key?'address') && (jsondict['address']!=nil)
|
12
|
+
@address=jsondict['address']
|
13
|
+
end
|
14
|
+
@deliveryStatus=nil
|
15
|
+
if (jsondict!=nil) && (jsondict.has_key?'deliveryStatus') && (jsondict['deliveryStatus']!=nil)
|
16
|
+
@deliveryStatus=jsondict['deliveryStatus']
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def getAddress
|
21
|
+
@address
|
22
|
+
end
|
23
|
+
|
24
|
+
def setAddress(address)
|
25
|
+
@address=address
|
26
|
+
end
|
27
|
+
|
28
|
+
def getDeliveryStatus
|
29
|
+
@deliveryStatus
|
30
|
+
end
|
31
|
+
|
32
|
+
def setDeliveryStatus(deliveryStatus)
|
33
|
+
@deliveryStatus=deliveryStatus
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
end
|