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.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +37 -0
  6. data/Rakefile +2 -0
  7. data/lib/endpoints/ServiceEndpoints.rb +144 -0
  8. data/lib/foundation/FormParameter.rb +25 -0
  9. data/lib/foundation/FormParameters.rb +39 -0
  10. data/lib/foundation/JSONRequest.rb +109 -0
  11. data/lib/location/Locate.rb +100 -0
  12. data/lib/mms/MMSRetrieve.rb +198 -0
  13. data/lib/mms/MMSSend.rb +205 -0
  14. data/lib/oneapi.rb +6 -0
  15. data/lib/oneapi/version.rb +3 -0
  16. data/lib/payment/Charge.rb +166 -0
  17. data/lib/payment/Reservation.rb +295 -0
  18. data/lib/response/Attachment.rb +50 -0
  19. data/lib/response/HTTPResponse.rb +63 -0
  20. data/lib/response/PolicyException.rb +58 -0
  21. data/lib/response/RequestError.rb +41 -0
  22. data/lib/response/ResourceReference.rb +24 -0
  23. data/lib/response/ServiceException.rb +50 -0
  24. data/lib/response/location/CurrentLocation.rb +76 -0
  25. data/lib/response/location/ErrorInformation.rb +41 -0
  26. data/lib/response/location/LocationResponse.rb +49 -0
  27. data/lib/response/location/TerminalLocation.rb +67 -0
  28. data/lib/response/location/TerminalLocationList.rb +36 -0
  29. data/lib/response/mms/CallbackReference.rb +37 -0
  30. data/lib/response/mms/DeliveryInfo.rb +37 -0
  31. data/lib/response/mms/DeliveryInfoList.rb +49 -0
  32. data/lib/response/mms/DeliveryInfoNotification.rb +39 -0
  33. data/lib/response/mms/DeliveryReceiptSubscription.rb +39 -0
  34. data/lib/response/mms/HTTPResponse.rb +35 -0
  35. data/lib/response/mms/InboundMMSMessage.rb +37 -0
  36. data/lib/response/mms/InboundMessage.rb +91 -0
  37. data/lib/response/mms/InboundMessageList.rb +75 -0
  38. data/lib/response/mms/InboundMessageNotification.rb +39 -0
  39. data/lib/response/mms/MMSDeliveryReceiptSubscriptionResponse.rb +49 -0
  40. data/lib/response/mms/MMSMessageReceiptSubscriptionResponse.rb +49 -0
  41. data/lib/response/mms/MMSSendDeliveryStatusResponse.rb +49 -0
  42. data/lib/response/mms/RetrieveMMSMessageResponse.rb +57 -0
  43. data/lib/response/mms/RetrieveMMSResponse.rb +49 -0
  44. data/lib/response/mms/SendMMSResponse.rb +49 -0
  45. data/lib/response/payment/AmountReservationResponse.rb +49 -0
  46. data/lib/response/payment/AmountReservationTransaction.rb +116 -0
  47. data/lib/response/payment/AmountResponse.rb +49 -0
  48. data/lib/response/payment/AmountTransaction.rb +103 -0
  49. data/lib/response/payment/ChargingInformation.rb +50 -0
  50. data/lib/response/payment/PaymentAmount.rb +51 -0
  51. data/lib/response/sms/CallbackReference.rb +37 -0
  52. data/lib/response/sms/DeliveryInfo.rb +37 -0
  53. data/lib/response/sms/DeliveryInfoList.rb +49 -0
  54. data/lib/response/sms/DeliveryInfoNotification.rb +39 -0
  55. data/lib/response/sms/DeliveryReceiptSubscription.rb +39 -0
  56. data/lib/response/sms/HTTPResponse.rb +35 -0
  57. data/lib/response/sms/InboundSMSMessage.rb +89 -0
  58. data/lib/response/sms/InboundSMSMessageList.rb +75 -0
  59. data/lib/response/sms/InboundSMSMessageNotification.rb +39 -0
  60. data/lib/response/sms/RetrieveSMSResponse.rb +49 -0
  61. data/lib/response/sms/SMSDeliveryReceiptSubscriptionResponse.rb +49 -0
  62. data/lib/response/sms/SMSMessageReceiptSubscriptionResponse.rb +49 -0
  63. data/lib/response/sms/SMSSendDeliveryStatusResponse.rb +49 -0
  64. data/lib/response/sms/SendSMSResponse.rb +49 -0
  65. data/lib/sms/SMSRetrieve.rb +125 -0
  66. data/lib/sms/SMSSend.rb +168 -0
  67. data/oneapi.gemspec +23 -0
  68. metadata +138 -0
@@ -0,0 +1,103 @@
1
+
2
+ class AmountTransaction
3
+
4
+ def initialize
5
+ @clientCorrelator=nil
6
+ @endUserId=nil
7
+ @paymentAmount=nil
8
+ @referenceCode=nil
9
+ @resourceURL=nil
10
+ @serverReferenceCode=nil
11
+ @transactionStatus=nil
12
+ end
13
+
14
+ def initializeJSON(jsondict)
15
+ @clientCorrelator=nil
16
+ if (jsondict!=nil) && (jsondict.has_key?'clientCorrelator') && (jsondict['clientCorrelator']!=nil)
17
+ @clientCorrelator=jsondict['clientCorrelator']
18
+ end
19
+ @endUserId=nil
20
+ if (jsondict!=nil) && (jsondict.has_key?'endUserId') && (jsondict['endUserId']!=nil)
21
+ @endUserId=jsondict['endUserId']
22
+ end
23
+ @paymentAmount=nil
24
+ if (jsondict!=nil) && (jsondict.has_key?'paymentAmount') && (jsondict['paymentAmount']!=nil) then
25
+ @paymentAmount=PaymentAmount.new
26
+ @paymentAmount.initializeJSON(jsondict['paymentAmount'])
27
+ end
28
+ @referenceCode=nil
29
+ if (jsondict!=nil) && (jsondict.has_key?'referenceCode') && (jsondict['referenceCode']!=nil)
30
+ @referenceCode=jsondict['referenceCode']
31
+ end
32
+ @resourceURL=nil
33
+ if (jsondict!=nil) && (jsondict.has_key?'resourceURL') && (jsondict['resourceURL']!=nil)
34
+ @resourceURL=jsondict['resourceURL']
35
+ end
36
+ @serverReferenceCode=nil
37
+ if (jsondict!=nil) && (jsondict.has_key?'serverReferenceCode') && (jsondict['serverReferenceCode']!=nil)
38
+ @serverReferenceCode=jsondict['serverReferenceCode']
39
+ end
40
+ @transactionStatus=nil
41
+ if (jsondict!=nil) && (jsondict.has_key?'transactionStatus') && (jsondict['transactionStatus']!=nil)
42
+ @transactionStatus=jsondict['transactionStatus']
43
+ end
44
+ end
45
+
46
+ def getClientCorrelator
47
+ @clientCorrelator
48
+ end
49
+
50
+ def setClientCorrelator(clientCorrelator)
51
+ @clientCorrelator=clientCorrelator
52
+ end
53
+
54
+ def getEndUserId
55
+ @endUserId
56
+ end
57
+
58
+ def setEndUserId(endUserId)
59
+ @endUserId=endUserId
60
+ end
61
+
62
+ def getPaymentAmount
63
+ @paymentAmount
64
+ end
65
+
66
+ def setPaymentAmount(paymentAmount)
67
+ @paymentAmount=paymentAmount
68
+ end
69
+
70
+ def getReferenceCode
71
+ @referenceCode
72
+ end
73
+
74
+ def setReferenceCode(referenceCode)
75
+ @referenceCode=referenceCode
76
+ end
77
+
78
+ def getResourceURL
79
+ @resourceURL
80
+ end
81
+
82
+ def setResourceURL(resourceURL)
83
+ @resourceURL=resourceURL
84
+ end
85
+
86
+ def getServerReferenceCode
87
+ @serverReferenceCode
88
+ end
89
+
90
+ def setServerReferenceCode(serverReferenceCode)
91
+ @serverReferenceCode=serverReferenceCode
92
+ end
93
+
94
+ def getTransactionStatus
95
+ @transactionStatus
96
+ end
97
+
98
+ def setTransactionStatus(transactionStatus)
99
+ @transactionStatus=transactionStatus
100
+ end
101
+
102
+
103
+ end
@@ -0,0 +1,50 @@
1
+
2
+ class ChargingInformation
3
+
4
+ def initialize
5
+ @amount=0.0
6
+ @currency=nil
7
+ @description=nil
8
+ end
9
+
10
+ def initializeJSON(jsondict)
11
+ @amount=0.0
12
+ if (jsondict!=nil) && (jsondict.has_key?'amount') && (jsondict['amount']!=nil)
13
+ @amount=jsondict['amount'].to_f
14
+ end
15
+ @currency=nil
16
+ if (jsondict!=nil) && (jsondict.has_key?'currency') && (jsondict['currency']!=nil)
17
+ @currency=jsondict['currency']
18
+ end
19
+ @description=nil
20
+ if (jsondict!=nil) && (jsondict.has_key?'description') && (jsondict['description']!=nil)
21
+ @description=jsondict['description']
22
+ end
23
+ end
24
+
25
+ def getAmount
26
+ @amount
27
+ end
28
+
29
+ def setAmount(amount)
30
+ @amount=amount
31
+ end
32
+
33
+ def getCurrency
34
+ @currency
35
+ end
36
+
37
+ def setCurrency(currency)
38
+ @currency=currency
39
+ end
40
+
41
+ def getDescription
42
+ @description
43
+ end
44
+
45
+ def setDescription(description)
46
+ @description=description
47
+ end
48
+
49
+
50
+ end
@@ -0,0 +1,51 @@
1
+
2
+ class PaymentAmount
3
+
4
+ def initialize
5
+ @amountReserved=0.0
6
+ @chargingInformation=nil
7
+ @totalAmountCharged=0.0
8
+ end
9
+
10
+ def initializeJSON(jsondict)
11
+ @amountReserved=0.0
12
+ if (jsondict!=nil) && (jsondict.has_key?'amountReserved') && (jsondict['amountReserved']!=nil)
13
+ @amountReserved=jsondict['amountReserved'].to_f
14
+ end
15
+ @chargingInformation=nil
16
+ if (jsondict!=nil) && (jsondict.has_key?'chargingInformation') && (jsondict['chargingInformation']!=nil) then
17
+ @chargingInformation=ChargingInformation.new
18
+ @chargingInformation.initializeJSON(jsondict['chargingInformation'])
19
+ end
20
+ @totalAmountCharged=0.0
21
+ if (jsondict!=nil) && (jsondict.has_key?'totalAmountCharged') && (jsondict['totalAmountCharged']!=nil)
22
+ @totalAmountCharged=jsondict['totalAmountCharged'].to_f
23
+ end
24
+ end
25
+
26
+ def getAmountReserved
27
+ @amountReserved
28
+ end
29
+
30
+ def setAmountReserved(amountReserved)
31
+ @amountReserved=amountReserved
32
+ end
33
+
34
+ def getChargingInformation
35
+ @chargingInformation
36
+ end
37
+
38
+ def setChargingInformation(chargingInformation)
39
+ @chargingInformation=chargingInformation
40
+ end
41
+
42
+ def getTotalAmountCharged
43
+ @totalAmountCharged
44
+ end
45
+
46
+ def setTotalAmountCharged(totalAmountCharged)
47
+ @totalAmountCharged=totalAmountCharged
48
+ end
49
+
50
+
51
+ 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
@@ -0,0 +1,49 @@
1
+ require "response/sms/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/sms/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/sms/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