pesamoni_ruby 1.0.4

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 10d77beef98ccb7f2886c48d481cb7adae69387d274baacbf2b3212db2620e2f
4
+ data.tar.gz: eb010b173c921fc96462e74a82e1abeb63b2ead7a405c3fdcc8b1f118156b57c
5
+ SHA512:
6
+ metadata.gz: 19337de5d9f1d44ae5557a828801dd1fa53198f73c7e7dd241ddeccfd859bf1c51a3ecff27d1b4061ebb7ac1d3b2ec52e4e45a8844b8b5dcd8b3e132de62baea
7
+ data.tar.gz: c55f0c1dc0861b5c672fa5cee88c9ace2a831b7b87d9822ac185fbf178d7a052684c9013f6eef07d0a5136b3fd4bc59471a7b8dc8b927cc27d2abae7b2a83585
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.0.0'
7
+ end
data/README.md ADDED
@@ -0,0 +1,304 @@
1
+ # Pesamoni Ruby library
2
+
3
+ The Pesamoni Pesaway gem provides integration access to Pesamoni services. You can view API features by clicking the link https://pesamoni.com/developers#features-intro.
4
+
5
+ ## Installation
6
+
7
+ ```ruby
8
+ gem install pesamoni_ruby
9
+ ```
10
+
11
+ Or add to your Gemfile:
12
+
13
+ ```ruby
14
+ gem 'pesamoni_ruby'
15
+ ```
16
+
17
+ And then execute:
18
+
19
+ $ bundle
20
+
21
+ ## Quick Start Example
22
+
23
+ The SDK needs to be instantiated using your API username and API password, which you can get from your [Pesamoni business account](https://pesamoni.com/business/dash).
24
+
25
+ You can register a new Pesamoni business account [Here](https://pesamoni.com/businesses/sign_up) or Sign in [Here](https://pesamoni.com/businesses/sign_in)
26
+
27
+ ```ruby
28
+ # Load the gem
29
+ require 'pesamoni_ruby'
30
+
31
+ # Setup authorization
32
+ Pesamoni.configure do |config|
33
+ # Configure API key authorization: apipassword
34
+ # Configure API key authorization: apiusername
35
+ config.api_key['apiusername'] = 'YOUR API KEY'
36
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
37
+ #config.api_key_prefix['apiusername'] = 'Bearer'
38
+ config.api_key['apipassword'] = 'YOUR API KEY'
39
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
40
+ #config.api_key_prefix['apipassword'] = 'Bearer'
41
+ end
42
+
43
+ api_instance = Pesamoni::DefaultApi.new
44
+
45
+ method = 'method_example' # String | Enter a request method. To check for request methods <a href=''>click here</a>
46
+
47
+ ```
48
+
49
+ ### Accepting funds from mobile subscriber
50
+ ```ruby
51
+ # you can either use method acreceive or acreceivekeac as explained below
52
+ # method acreceive
53
+ # This method enables you receive funds from a mobile subscriber in your registered native currency on the Pesamoni platform. If for instance your account is registered in currency UGX and you request money from a Kenyan number e.g 254712346789, a Pesamoni exchange rate will automatically be applied and money deposited into your Pesamoni wallet in your default currency
54
+ # method acreceivekeac
55
+ # You can have two native currencies on your Pesamoni account on request. If you would like to deposit funds from a mobile subscriber to your Kenyan Pesamoni wallet account then this is the method you use.
56
+ # example
57
+ method = 'acreceive'
58
+
59
+ opts = {
60
+ amount: 'amount_example', # String | Enter the amount you would like to request for. This method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, acsendbank, pesab2c, sendairtime, cardaccept
61
+ mobile: 'mobile_example', # String | Enter the mobile number you would like to execute the above method in format 256.... or 254...This method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, senderid, sendsms, sendairtime
62
+ reference: 'reference_example', # String | Enter your user generated transaction reference This method applies for request methodsacreceive, acreceivekeac, acsend, acsendkeac, sendsms, transactionstatus, sendairtime, pesab2c, sendsms, cardaccept
63
+ genericmsg: 'genericmsg_example', # String | Enter your user generated generic message for the requested transaction This method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept
64
+ token: 'token_example', # String | Enter your user generated token for the above mentioned method This method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept
65
+ }
66
+
67
+ begin
68
+ result = api_instance.transactions_post(method, opts)
69
+ p result
70
+ rescue Pesamoni::ApiError => e
71
+ puts "Exception when calling DefaultApi->transactions_post: #{e}"
72
+ end
73
+ ```
74
+
75
+ ### Sending funds to a mobile subscriber
76
+
77
+ ```ruby
78
+ # you can either use method acreceive or acreceivekeac as explained below
79
+ # acsend
80
+ # This method enables you send funds to a mobile subscriber in your registered native currency on the Pesamoni platform. If for instance your account is registered in currency UGX and you send money to a kenyan number e.g 254712346789, a Pesamoni exchange rate will automatically be applied and the equivalent exchange amount deducted from your Pesamoni wallet in your default currency
81
+ # acsendkeac
82
+ # You can have two native currencies on your Pesamoni account on request. If you would like to send funds from your Pesamoni wallet to a mobile subscriber from your Kenyan Pesamoni wallet account then this is the method you use.
83
+
84
+ method = 'acsend'
85
+
86
+ opts = {
87
+ amount: 'amount_example', # String | Enter the amount you would like to execute the above method for. This method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, acsendbank, pesab2c, sendairtime, cardaccept
88
+ mobile: 'mobile_example', # String | Enter the mobile number you would like to execute the above method in format 256.... or 254...This method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, senderid, sendsms, sendairtime
89
+ reference: 'reference_example', # String | Enter your user generated transaction referenceThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, transactionstatus, sendairtime, pesab2c, sendsms, cardaccept
90
+ genericmsg: 'genericmsg_example', # String | Enter your user generated generic message for the requested transactionThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept
91
+ token: 'token_example', # String | Enter your user generated token for the above mentioned method This method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept
92
+ }
93
+ ```
94
+
95
+ ### Accepting Card Payments e.g VISA/MASTERCARD
96
+
97
+ ```ruby
98
+
99
+ method = 'acsend'
100
+
101
+ opts = {
102
+ amount: 'amount_example', # String | Enter the amount you would like to request for. This method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, acsendbank, pesab2c, sendairtime, cardaccept
103
+ holdername: 'holdername_example', # String | Enter name of payer for Visa/MasterCard transactionsThis method applies for request method cardaccept
104
+ cardnumber: 'cardnumber_example', # String | Enter the Visa/MasterCard cardnumberThis method applies for request method cardaccept
105
+ cvv: 'cvv_example', # String | Enter the Visa/MasterCard cvvThis method applies for request method cardaccept
106
+ exp: 'exp_example', # String | Enter the Visa/MasterCard expiry date in the format MM/YYYY e.g 07/2030This method applies for request method cardaccept
107
+ currency: 'currency_example', # String | Enter the currency you intend to make the transaction for Visa/MasterCard based transactionsThis method applies for request method cardaccept
108
+ genericmsg: 'genericmsg_example', # String | Enter your user generated generic message for the requested transactionThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept
109
+ token: 'token_example', # String | Enter your user generated token for the above mentioned methodThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept
110
+ }
111
+
112
+ begin
113
+ result = api_instance.transactions_post(method, opts)
114
+ p result
115
+ rescue Pesamoni::ApiError => e
116
+ puts "Exception when calling DefaultApi->transactions_post: #{e}"
117
+ end
118
+
119
+
120
+ ```
121
+
122
+ ### Bank transfers
123
+
124
+ ```ruby
125
+ # you can either use method acsendbank or acsendbankeac as explained below
126
+ # acsendbank
127
+ # This method enables you send funds to a users bank account. A Pesamoni exchange rate will automatically be applied and the equivalent exchange amount deposited to your bank account dependent on your default currency.
128
+ # acsendbankeac
129
+ # You can have two native currencies on your Pesamoni account on request. If you would like to send funds from your Pesamoni wallet to a mobile subscriber from your Kenyan Pesamoni wallet account then this is the method you use.
130
+
131
+ method = 'acsendbank'
132
+
133
+ opts = {
134
+ amount: 'amount_example', # String | Enter the amount you would like to request for. This method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, acsendbank, pesab2c, sendairtime, cardaccept
135
+ currency: 'currency_example', # String | Enter the currency you intend to make the transaction for Visa/MasterCard based transactionsThis method applies for request method cardaccept
136
+ account: 'account_example', # String | Enter the Pesamoni account you would like to use for this transactionThis method applies for request method paybills
137
+ reference: 'reference_example', # String | Enter your user generated transaction referenceThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, transactionstatus, sendairtime, pesab2c, sendsms, cardaccept
138
+ genericmsg: 'genericmsg_example', # String | Enter your user generated generic message for the requested transactionThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept
139
+ token: 'token_example', # String | Enter your user generated token for the above mentioned methodThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept
140
+ }
141
+
142
+ begin
143
+ result = api_instance.transactions_post(method, opts)
144
+ p result
145
+ rescue Pesamoni::ApiError => e
146
+ puts "Exception when calling DefaultApi->transactions_post: #{e}"
147
+ end
148
+ ```
149
+
150
+ ### Sending Airtime to a mobile subsriber
151
+
152
+ ```ruby
153
+ method = 'sendairtime'
154
+
155
+ opts = {
156
+ amount: 'amount_example', # String | Enter the amount you would like to request for. This method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, acsendbank, pesab2c, sendairtime, cardaccept
157
+ mobile: 'mobile_example', # String | Enter the mobile number you would like to execute the above method in format 256.... or 254...This method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, senderid, sendsms, sendairtime
158
+ reference: 'reference_example', # String | Enter your user generated transaction referenceThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, transactionstatus, sendairtime, pesab2c, sendsms, cardaccept
159
+ genericmsg: 'genericmsg_example', # String | Enter your user generated generic message for the requested transactionThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept
160
+ token: 'token_example', # String | Enter your user generated token for the above mentioned methodThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept
161
+ }
162
+
163
+ begin
164
+ result = api_instance.transactions_post(method, opts)
165
+ p result
166
+ rescue Pesamoni::ApiError => e
167
+ puts "Exception when calling DefaultApi->transactions_post: #{e}"
168
+ end
169
+ ```
170
+ ### Sending to a Pesamoni users wallet
171
+
172
+ ```ruby
173
+ method = 'pesab2c'
174
+
175
+ opts = {
176
+ amount: 'amount_example', # String | Enter the amount you would like to request for. This method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, acsendbank, pesab2c, sendairtime, cardaccept
177
+ account: 'account_example', # String | Enter the Pesamoni account you would like to use for this transactionThis method applies for request method paybills
178
+ reference: 'reference_example', # String | Enter your user generated transaction referenceThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, transactionstatus, sendairtime, pesab2c, sendsms, cardaccept
179
+ genericmsg: 'genericmsg_example', # String | Enter your user generated generic message for the requested transactionThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept
180
+ token: 'token_example', # String | Enter your user generated token for the above mentioned methodThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept
181
+ }
182
+
183
+ begin
184
+ result = api_instance.transactions_post(method, opts)
185
+ p result
186
+ rescue Pesamoni::ApiError => e
187
+ puts "Exception when calling DefaultApi->transactions_post: #{e}"
188
+ end
189
+
190
+ ```
191
+
192
+ ### Accepting funds from a Pesamoni user
193
+
194
+ ```ruby
195
+ method = 'pesac2b'
196
+
197
+ opts = {
198
+ amount: 'amount_example', # String | Enter the amount you would like to request for. This method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, acsendbank, pesab2c, sendairtime, cardaccept
199
+ account: 'account_example', # String | Enter the Pesamoni account you would like to use for this transactionThis method applies for request method paybills
200
+ reference: 'reference_example', # String | Enter your user generated transaction referenceThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, transactionstatus, sendairtime, pesab2c, sendsms, cardaccept
201
+ genericmsg: 'genericmsg_example', # String | Enter your user generated generic message for the requested transactionThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept
202
+ token: 'token_example', # String | Enter your user generated token for the above mentioned methodThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept
203
+ }
204
+
205
+ begin
206
+ result = api_instance.transactions_post(method, opts)
207
+ p result
208
+ rescue Pesamoni::ApiError => e
209
+ puts "Exception when calling DefaultApi->transactions_post: #{e}"
210
+ end
211
+
212
+ ```
213
+
214
+ ### Paying Utility Bills
215
+
216
+ ```ruby
217
+ method = 'paybills'
218
+
219
+ opts = {
220
+ amount: 'amount_example', # String | Enter the amount you would like to request for. This method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, acsendbank, pesab2c, sendairtime, cardaccept
221
+ mobile: 'mobile_example', # String | Enter the mobile number you would like to execute the above method in format 256.... or 254...This method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, senderid, sendsms, sendairtime
222
+ currency: 'currency_example', # String | Enter the currency you intend to make the transaction for Visa/MasterCard based transactionsThis method applies for request method cardaccept
223
+ reference: 'reference_example', # String | Enter your user generated transaction referenceThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, transactionstatus, sendairtime, pesab2c, sendsms, cardaccept
224
+ genericmsg: 'genericmsg_example', # String | Enter your user generated generic message for the requested transactionThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept
225
+ token: 'token_example', # String | Enter your user generated token for the above mentioned methodThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept
226
+ bouquet: 'bouquet_example', # String | Enter the bouquet or package you would like to pay forThis method applies for request methods paybills
227
+ payoption: 'payoption_example', # String | Enter your prefered payment optionThis method applies for request methods paybills
228
+ meternumber: 'meternumber_example' # String | Enter the meter number for the intended paymentThis method applies for request methods paybills
229
+ }
230
+
231
+ begin
232
+ result = api_instance.transactions_post(method, opts)
233
+ p result
234
+ rescue Pesamoni::ApiError => e
235
+ puts "Exception when calling DefaultApi->transactions_post: #{e}"
236
+ end
237
+ ```
238
+
239
+ ### Checking transaction status
240
+
241
+ ```ruby
242
+ method = 'transactionstatus'
243
+
244
+ opts = {
245
+ reference: 'reference_example', # String | Enter your user generated transaction referenceThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, transactionstatus, sendairtime, pesab2c, sendsms, cardaccept
246
+ }
247
+
248
+ begin
249
+ result = api_instance.transactions_post(method, opts)
250
+ p result
251
+ rescue Pesamoni::ApiError => e
252
+ puts "Exception when calling DefaultApi->transactions_post: #{e}"
253
+ end
254
+ ```
255
+
256
+ ### Checking your Pesamoni Business Wallet Balance
257
+
258
+ ```ruby
259
+ method = 'acbalance'
260
+
261
+ opts = {
262
+ # No parameters are required here
263
+ }
264
+ ```
265
+
266
+ ### Sending SMS to a mobile subscriber
267
+
268
+ ```ruby
269
+
270
+ opts = {
271
+ mobile: 'mobile_example', # String | Enter the mobile number you would like to execute the above method in format 256.... or 254...This method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, senderid, sendsms, sendairtime
272
+ reference: 'reference_example', # String | Enter your user generated transaction referenceThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, transactionstatus, sendairtime, pesab2c, sendsms, cardaccept
273
+ genericmsg: 'genericmsg_example', # String | Enter your user generated generic message for the requested transactionThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept
274
+ token: 'token_example', # String | Enter your user generated token for the above mentioned methodThis method applies for request methods acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept
275
+ message: 'message_example'
276
+ # String | Enter your message This method applies for request methods sendsms
277
+ }
278
+
279
+ begin
280
+ result = api_instance.transactions_post(method, opts)
281
+ p result
282
+ rescue Pesamoni::ApiError => e
283
+ puts "Exception when calling DefaultApi->transactions_post: #{e}"
284
+ end
285
+ ```
286
+
287
+ ## Documentation for API Endpoints
288
+
289
+ All Endpoint URIs are relative to https://pesamoni.com/api/live/v1/transactions
290
+
291
+ ## Development
292
+
293
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
294
+
295
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
296
+
297
+ ## Contributing
298
+
299
+ Bug reports and pull requests are welcome on GitHub at https://github.com/Pesamoni.
300
+
301
+ ## License
302
+
303
+ The gem is available as open source under the terms of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
304
+
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ begin
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
6
+ rescue LoadError
7
+ # no rspec available
8
+ end
@@ -0,0 +1,98 @@
1
+ # Pesamoni::DefaultApi
2
+
3
+ All URIs are relative to *https://pesamoni.com/api/live/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**transactions_post**](DefaultApi.md#transactions_post) | **POST** /transactions |
8
+
9
+
10
+ # **transactions_post**
11
+ > InlineResponse200 transactions_post(method, amount, opts)
12
+
13
+
14
+
15
+ Below are parameters and their respective expected responses. In order to try out the service, simply click Try it out.
16
+
17
+ ### Example
18
+ ```ruby
19
+ # load the gem
20
+ require 'pesamoni_ruby'
21
+ # setup authorization
22
+ Pesamoni.configure do |config|
23
+ # Configure API key authorization: apipassword
24
+ config.api_key['apipassword'] = 'YOUR API KEY'
25
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
26
+ #config.api_key_prefix['apipassword'] = 'Bearer'
27
+
28
+ # Configure API key authorization: apiusername
29
+ config.api_key['apiusername'] = 'YOUR API KEY'
30
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
31
+ #config.api_key_prefix['apiusername'] = 'Bearer'
32
+ end
33
+
34
+ api_instance = Pesamoni::DefaultApi.new
35
+
36
+ method = 'method_example' # String | Enter a request method. To check for request methods <a href=''>click here</a>
37
+
38
+ amount = 'amount_example' # String | Enter the amount you would like to request for. <p style=\"color:red\">This method applies for request methods <b>acreceive, acreceivekeac, acsend, acsendkeac, acsendbank, pesab2c, sendairtime, cardaccept</b></p>
39
+
40
+ opts = {
41
+ mobile: 'mobile_example', # String | Enter the mobile number you would like to execute the above method in format 256.... or 254...<p style=\"color:red\">This method applies for request methods <b>acreceive, acreceivekeac, acsend, acsendkeac, senderid, sendsms, sendairtime</b></p>
42
+ holdername: 'holdername_example', # String | Enter name of payer for Visa/MasterCard transactions<p style=\"color:red\">This method applies for request method <b>cardaccept</b></p>
43
+ cardnumber: 'cardnumber_example', # String | Enter the Visa/MasterCard cardnumber<p style=\"color:red\">This method applies for request method <b>cardaccept</b></p>
44
+ cvv: 'cvv_example', # String | Enter the Visa/MasterCard cvv<p style=\"color:red\">This method applies for request method <b>cardaccept</b></p>
45
+ exp: 'exp_example', # String | Enter the Visa/MasterCard expiry date in the format MM/YYYY e.g 07/2030<p style=\"color:red\">This method applies for request method <b>cardaccept</b></p>
46
+ currency: 'currency_example', # String | Enter the currency you intend to make the transaction for Visa/MasterCard based transactions<p style=\"color:red\">This method applies for request method <b>cardaccept</b></p>
47
+ account: 'account_example', # String | Enter the Pesamoni account you would like to use for this transaction<p style=\"color:red\">This method applies for request method <b>paybills</b></p>
48
+ reference: 'reference_example', # String | Enter your user generated transaction reference<p style=\"color:red\">This method applies for request methods <b>acreceive, acreceivekeac, acsend, acsendkeac, sendsms, transactionstatus, sendairtime, pesab2c, sendsms, cardaccept</b></p>
49
+ genericmsg: 'genericmsg_example', # String | Enter your user generated generic message for the requested transaction<p style=\"color:red\">This method applies for request methods <b>acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept</b></p>
50
+ token: 'token_example', # String | Enter your user generated token for the above mentioned method<p style=\"color:red\">This method applies for request methods <b>acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept</b></p>
51
+ bouquet: 'bouquet_example', # String | Enter the bouquet or package you would like to pay for<p style=\"color:red\">This method applies for request methods <b>paybills</b></p>
52
+ payoption: 'payoption_example', # String | Enter your prefered payment option<p style=\"color:red\">This method applies for request methods <b>paybills</b></p>
53
+ meternumber: 'meternumber_example' # String | Enter the meter number for the intended payment<p style=\"color:red\">This method applies for request methods <b>paybills</b></p>
54
+ }
55
+
56
+ begin
57
+ result = api_instance.transactions_post(method, amount, opts)
58
+ p result
59
+ rescue Pesamoni::ApiError => e
60
+ puts "Exception when calling DefaultApi->transactions_post: #{e}"
61
+ end
62
+ ```
63
+
64
+ ### Parameters
65
+
66
+ Name | Type | Description | Notes
67
+ ------------- | ------------- | ------------- | -------------
68
+ **method** | **String**| Enter a request method. To check for request methods &lt;a href&#x3D;&#39;&#39;&gt;click here&lt;/a&gt; |
69
+ **amount** | **String**| Enter the amount you would like to request for. &lt;p style&#x3D;\&quot;color:red\&quot;&gt;This method applies for request methods &lt;b&gt;acreceive, acreceivekeac, acsend, acsendkeac, acsendbank, pesab2c, sendairtime, cardaccept&lt;/b&gt;&lt;/p&gt; |
70
+ **mobile** | **String**| Enter the mobile number you would like to execute the above method in format 256.... or 254...&lt;p style&#x3D;\&quot;color:red\&quot;&gt;This method applies for request methods &lt;b&gt;acreceive, acreceivekeac, acsend, acsendkeac, senderid, sendsms, sendairtime&lt;/b&gt;&lt;/p&gt; | [optional]
71
+ **holdername** | **String**| Enter name of payer for Visa/MasterCard transactions&lt;p style&#x3D;\&quot;color:red\&quot;&gt;This method applies for request method &lt;b&gt;cardaccept&lt;/b&gt;&lt;/p&gt; | [optional]
72
+ **cardnumber** | **String**| Enter the Visa/MasterCard cardnumber&lt;p style&#x3D;\&quot;color:red\&quot;&gt;This method applies for request method &lt;b&gt;cardaccept&lt;/b&gt;&lt;/p&gt; | [optional]
73
+ **cvv** | **String**| Enter the Visa/MasterCard cvv&lt;p style&#x3D;\&quot;color:red\&quot;&gt;This method applies for request method &lt;b&gt;cardaccept&lt;/b&gt;&lt;/p&gt; | [optional]
74
+ **exp** | **String**| Enter the Visa/MasterCard expiry date in the format MM/YYYY e.g 07/2030&lt;p style&#x3D;\&quot;color:red\&quot;&gt;This method applies for request method &lt;b&gt;cardaccept&lt;/b&gt;&lt;/p&gt; | [optional]
75
+ **currency** | **String**| Enter the currency you intend to make the transaction for Visa/MasterCard based transactions&lt;p style&#x3D;\&quot;color:red\&quot;&gt;This method applies for request method &lt;b&gt;cardaccept&lt;/b&gt;&lt;/p&gt; | [optional]
76
+ **account** | **String**| Enter the Pesamoni account you would like to use for this transaction&lt;p style&#x3D;\&quot;color:red\&quot;&gt;This method applies for request method &lt;b&gt;paybills&lt;/b&gt;&lt;/p&gt; | [optional]
77
+ **reference** | **String**| Enter your user generated transaction reference&lt;p style&#x3D;\&quot;color:red\&quot;&gt;This method applies for request methods &lt;b&gt;acreceive, acreceivekeac, acsend, acsendkeac, sendsms, transactionstatus, sendairtime, pesab2c, sendsms, cardaccept&lt;/b&gt;&lt;/p&gt; | [optional]
78
+ **genericmsg** | **String**| Enter your user generated generic message for the requested transaction&lt;p style&#x3D;\&quot;color:red\&quot;&gt;This method applies for request methods &lt;b&gt;acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept&lt;/b&gt;&lt;/p&gt; | [optional]
79
+ **token** | **String**| Enter your user generated token for the above mentioned method&lt;p style&#x3D;\&quot;color:red\&quot;&gt;This method applies for request methods &lt;b&gt;acreceive, acreceivekeac, acsend, acsendkeac, sendsms, sendairtime, pesab2c, sendsms, cardaccept&lt;/b&gt;&lt;/p&gt; | [optional]
80
+ **bouquet** | **String**| Enter the bouquet or package you would like to pay for&lt;p style&#x3D;\&quot;color:red\&quot;&gt;This method applies for request methods &lt;b&gt;paybills&lt;/b&gt;&lt;/p&gt; | [optional]
81
+ **payoption** | **String**| Enter your prefered payment option&lt;p style&#x3D;\&quot;color:red\&quot;&gt;This method applies for request methods &lt;b&gt;paybills&lt;/b&gt;&lt;/p&gt; | [optional]
82
+ **meternumber** | **String**| Enter the meter number for the intended payment&lt;p style&#x3D;\&quot;color:red\&quot;&gt;This method applies for request methods &lt;b&gt;paybills&lt;/b&gt;&lt;/p&gt; | [optional]
83
+
84
+ ### Return type
85
+
86
+ [**InlineResponse200**](InlineResponse200.md)
87
+
88
+ ### Authorization
89
+
90
+ [apipassword](../README.md#apipassword), [apiusername](../README.md#apiusername)
91
+
92
+ ### HTTP request headers
93
+
94
+ - **Content-Type**: Not defined
95
+ - **Accept**: Not defined
96
+
97
+
98
+
@@ -0,0 +1,13 @@
1
+ # Pesamoni::InlineResponse200
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **status** | **String** | | [optional]
7
+ **token** | **String** | | [optional]
8
+ **description** | **String** | | [optional]
9
+ **mobile** | **String** | | [optional]
10
+ **statuscode** | **String** | | [optional]
11
+ **transaction_type** | **String** | | [optional]
12
+
13
+
data/git_push.sh ADDED
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id=""
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id=""
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note=""
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+