Class: ServiceEndpoints

Inherits:
Object
  • Object
show all
Defined in:
lib/endpoints/ServiceEndpoints.rb

Instance Method Summary collapse

Constructor Details

#initialize(protocol = "http", server_root = "localhost:8080", server_path = "oneapiserver", api_version = "1", services = {}) ⇒ ServiceEndpoints

Returns a new instance of ServiceEndpoints.



4
5
6
7
8
9
10
11
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/endpoints/ServiceEndpoints.rb', line 4

def initialize(protocol = "http", server_root = "localhost:8080", server_path = "oneapiserver", api_version = "1", services = {})
  services = {
    "AmountChargeService"            =>"AmountChargeService",
    "AmountRefundService"            =>"AmountRefundService",
    "AmountReserveService"           =>"AmountReserveService",
    "AmountReserveAdditionalService" =>"AmountReserveAdditionalService",
    "AmountReserveChargeService"     =>"AmountReserveChargeService",
    "AmountReserveReleaseService"    =>"AmountReserveReleaseService",
    "LocationService"                =>"LocationService",
    "SendSMSService"                 =>"SendSMSService",
    "QuerySMSService"                =>"QuerySMSService",
    "SMSDeliveryService"             =>"SMSDeliveryService",
    "CancelSMSDeliveryService"       =>"CancelSMSDeliveryService",
    "RetrieveSMSService"             =>"RetrieveSMSService",
    "SMSReceiptService"              =>"SMSReceiptService",
    "CancelSMSReceiptService"        =>"CancelSMSReceiptService",
    "SendMMSService"                 =>"SendMMSService",
    "QueryMMSService"                =>"QueryMMSService",
    "MMSDeliveryService"             =>"MMSDeliveryService",
    "CancelMMSDeliveryService"       =>"CancelMMSDeliveryService",
    "RetrieveMMSService"             =>"RetrieveMMSService",
    "RetrieveMMSMessageService"      =>"RetrieveMMSMessageService",
    "MMSReceiptService"              =>"MMSReceiptService",
    "CancelMMSReceiptService"        =>"CancelMMSReceiptService"
  }.merge(services)

  base_path  = "#{protocol}://#{server_root}/#{server_path}"

  @AmountCharge                  ="#{base_path}/#{services["AmountChargeService"]}/#{api_version}/payment/{endUserId}/transactions/amount"
  @AmountRefund                  ="#{base_path}/#{services["AmountRefundService"]}/#{api_version}/payment/{endUserId}/transactions/amount"
  @AmountReserve                 ="#{base_path}/#{services["AmountReserveService"]}/#{api_version}/payment/{endUserId}/transactions/amountReservation"
  @AmountReserveAdditional       ="#{base_path}/#{services["AmountReserveAdditionalService"]}/#{api_version}/payment/{endUserId}/transactions/amountReservation/{transactionId}"
  @AmountReservationCharge       ="#{base_path}/#{services["AmountReserveChargeService"]}/#{api_version}/payment/{endUserId}/transactions/amountReservation/{transactionId}"
  @AmountReservationRelease      ="#{base_path}/#{services["AmountReserveReleaseService"]}/#{api_version}/payment/{endUserId}/transactions/amountReservation/{transactionId}"
  @Location                      ="#{base_path}/#{services["LocationService"]}/#{api_version}/location/queries/location"
  @SendSMS                       ="#{base_path}/#{services["SendSMSService"]}/#{api_version}/smsmessaging/outbound/{senderAddress}/requests"
  @QuerySMSDelivery              ="#{base_path}/#{services["QuerySMSService"]}/#{api_version}/smsmessaging/outbound/{senderAddress}/requests/{requestId}/deliveryInfos"
  @SMSDeliverySubscriptions      ="#{base_path}/#{services["SMSDeliveryService"]}/#{api_version}/smsmessaging/outbound/{senderAddress}/subscriptions"
  @CancelSMSDeliverySubscription ="#{base_path}/#{services["CancelSMSDeliveryService"]}/#{api_version}/smsmessaging/outbound/subscriptions/{subscriptionId}"
  @RetrieveSMS                   ="#{base_path}/#{services["RetrieveSMSService"]}/#{api_version}/smsmessaging/inbound/registrations/{registrationId}/messages/?maxBatchSize={maxBatchSize}"
  @SMSReceiptSubscriptions       ="#{base_path}/#{services["SMSReceiptService"]}/#{api_version}/smsmessaging/inbound/subscriptions"
  @CancelSMSReceiptSubscription  ="#{base_path}/#{services["CancelSMSReceiptService"]}/#{api_version}/smsmessaging/inbound/subscriptions/{subscriptionId}"
  @SendMMS                       ="#{base_path}/#{services["SendMMSService"]}/#{api_version}/messaging/outbound/{senderAddress}/requests"
  @QueryMMSDelivery              ="#{base_path}/#{services["QueryMMSService"]}/#{api_version}/messaging/outbound/{senderAddress}/requests/{requestId}/deliveryInfos"
  @MMSDeliverySubscriptions      ="#{base_path}/#{services["MMSDeliveryService"]}/#{api_version}/messaging/outbound/{senderAddress}/subscriptions"
  @CancelMMSDeliverySubscription ="#{base_path}/#{services["CancelMMSDeliveryService"]}/#{api_version}/messaging/outbound/subscriptions/{subscriptionId}"
  @RetrieveMMS                   ="#{base_path}/#{services["RetrieveMMSService"]}/#{api_version}/messaging/inbound/registrations/{registrationId}/messages/?maxBatchSize={maxBatchSize}"
  @RetrieveMMSMessage            ="#{base_path}/#{services["RetrieveMMSMessageService"]}/#{api_version}/messaging/inbound/registrations/{registrationId}/messages/{messageId}?resFormat={resFormat}"
  @MMSReceiptSubscriptions       ="#{base_path}/#{services["MMSReceiptService"]}/#{api_version}/messaging/inbound/subscriptions"
  @CancelMMSReceiptSubscription  ="#{base_path}/#{services["CancelMMSReceiptService"]}/#{api_version}/messaging/inbound/subscriptions/{subscriptionId}"
end

Instance Method Details

#getAmountChargeEndpointObject



56
57
58
# File 'lib/endpoints/ServiceEndpoints.rb', line 56

def getAmountChargeEndpoint
  @AmountCharge
end

#getAmountRefundEndpointObject



60
61
62
# File 'lib/endpoints/ServiceEndpoints.rb', line 60

def getAmountRefundEndpoint
  @AmountRefund
end

#getAmountReservationChargeEndpointObject



72
73
74
# File 'lib/endpoints/ServiceEndpoints.rb', line 72

def getAmountReservationChargeEndpoint
  @AmountReservationCharge
end

#getAmountReservationReleaseEndpointObject



76
77
78
# File 'lib/endpoints/ServiceEndpoints.rb', line 76

def getAmountReservationReleaseEndpoint
  @AmountReservationRelease
end

#getAmountReserveAdditionalEndpointObject



68
69
70
# File 'lib/endpoints/ServiceEndpoints.rb', line 68

def getAmountReserveAdditionalEndpoint
  @AmountReserveAdditional
end

#getAmountReserveEndpointObject



64
65
66
# File 'lib/endpoints/ServiceEndpoints.rb', line 64

def getAmountReserveEndpoint
  @AmountReserve
end

#getCancelMMSDeliverySubscriptionEndpointObject



124
125
126
# File 'lib/endpoints/ServiceEndpoints.rb', line 124

def getCancelMMSDeliverySubscriptionEndpoint
  @CancelMMSDeliverySubscription
end

#getCancelMMSReceiptSubscriptionEndpointObject



140
141
142
# File 'lib/endpoints/ServiceEndpoints.rb', line 140

def getCancelMMSReceiptSubscriptionEndpoint
  @CancelMMSReceiptSubscription
end

#getCancelSMSDeliverySubscriptionEndpointObject



96
97
98
# File 'lib/endpoints/ServiceEndpoints.rb', line 96

def getCancelSMSDeliverySubscriptionEndpoint
  @CancelSMSDeliverySubscription
end

#getCancelSMSReceiptSubscriptionEndpointObject



108
109
110
# File 'lib/endpoints/ServiceEndpoints.rb', line 108

def getCancelSMSReceiptSubscriptionEndpoint
  @CancelSMSReceiptSubscription
end

#getLocationEndpointObject



80
81
82
# File 'lib/endpoints/ServiceEndpoints.rb', line 80

def getLocationEndpoint
  @Location;
end

#getMMSDeliverySubscriptionsEndpointObject



120
121
122
# File 'lib/endpoints/ServiceEndpoints.rb', line 120

def getMMSDeliverySubscriptionsEndpoint
  @MMSDeliverySubscriptions
end

#getMMSReceiptSubscriptionsEndpointObject



136
137
138
# File 'lib/endpoints/ServiceEndpoints.rb', line 136

def getMMSReceiptSubscriptionsEndpoint
  @MMSReceiptSubscriptions
end

#getQueryMMSDeliveryEndpointObject



116
117
118
# File 'lib/endpoints/ServiceEndpoints.rb', line 116

def getQueryMMSDeliveryEndpoint
  @QueryMMSDelivery
end

#getQuerySMSDeliveryEndpointObject



88
89
90
# File 'lib/endpoints/ServiceEndpoints.rb', line 88

def getQuerySMSDeliveryEndpoint
  @QuerySMSDelivery
end

#getRetrieveMMSEndpointObject



128
129
130
# File 'lib/endpoints/ServiceEndpoints.rb', line 128

def getRetrieveMMSEndpoint
  @RetrieveMMS
end

#getRetrieveMMSMessageEndpointObject



132
133
134
# File 'lib/endpoints/ServiceEndpoints.rb', line 132

def getRetrieveMMSMessageEndpoint
  @RetrieveMMSMessage
end

#getRetrieveSMSEndpointObject



100
101
102
# File 'lib/endpoints/ServiceEndpoints.rb', line 100

def getRetrieveSMSEndpoint
  @RetrieveSMS
end

#getSendMMSEndpointObject



112
113
114
# File 'lib/endpoints/ServiceEndpoints.rb', line 112

def getSendMMSEndpoint
  @SendMMS
end

#getSendSMSEndpointObject



84
85
86
# File 'lib/endpoints/ServiceEndpoints.rb', line 84

def getSendSMSEndpoint
  @SendSMS
end

#getSMSDeliverySubscriptionsEndpointObject



92
93
94
# File 'lib/endpoints/ServiceEndpoints.rb', line 92

def getSMSDeliverySubscriptionsEndpoint
  @SMSDeliverySubscriptions
end

#getSMSReceiptSubscriptionsEndpointObject



104
105
106
# File 'lib/endpoints/ServiceEndpoints.rb', line 104

def getSMSReceiptSubscriptionsEndpoint
  @SMSReceiptSubscriptions
end