mtn_open_api 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.
@@ -0,0 +1,187 @@
1
+ openapi: 3.0.1
2
+ info:
3
+ title: Sandbox User Provisioning
4
+ description: 'Sandbox User Provisioning '
5
+ version: '1.0'
6
+ servers:
7
+ - url: https://sandbox.momodeveloper.mtn.com
8
+ paths:
9
+ /v1_0/apiuser:
10
+ post:
11
+ summary: /apiuser - POST
12
+ description: Used to create an API user in the sandbox target environment.
13
+ operationId: post-v1_0-apiuser
14
+ parameters:
15
+ - name: X-Reference-Id
16
+ in: header
17
+ description: Format - UUID. Recource ID for the API user to be created. UUID version 4 is required.
18
+ required: true
19
+ schema:
20
+ type: string
21
+ requestBody:
22
+ content:
23
+ application/json:
24
+ schema:
25
+ $ref: '#/components/schemas/ApiUser'
26
+ example:
27
+ providerCallbackHost: string
28
+ responses:
29
+ '201':
30
+ description: Created
31
+ content:
32
+ application/json: { }
33
+ '400':
34
+ description: 'Bad request, e.g. invalid data was sent in the request.'
35
+ content:
36
+ application/json: { }
37
+ '409':
38
+ description: 'Conflict, duplicated reference id'
39
+ content:
40
+ ReferenceId already in use:
41
+ schema:
42
+ $ref: '#/components/schemas/ErrorReason'
43
+ example:
44
+ code: RESOURCE_ALREADY_EXIST
45
+ message: Duplicated reference id. Creation of resource failed.
46
+ application/json:
47
+ schema:
48
+ $ref: '#/components/schemas/ErrorReason'
49
+ example:
50
+ code: RESOURCE_NOT_FOUND
51
+ message: string
52
+ '500':
53
+ description: Internal error. Check log for information.
54
+ content:
55
+ application/json: { }
56
+ '/v1_0/apiuser/{X-Reference-Id}/apikey':
57
+ post:
58
+ summary: '/v1_0/apiuser/{X-Reference-Id}/apikey - POST'
59
+ description: Used to create an API key for an API user in the sandbox target environment.
60
+ operationId: post-v1_0-apiuser-apikey
61
+ parameters:
62
+ - name: X-Reference-Id
63
+ in: path
64
+ description: Format - UUID. Recource ID for the API user to be created. UUID version 4 is required.
65
+ required: true
66
+ schema:
67
+ type: string
68
+ responses:
69
+ '201':
70
+ description: Created
71
+ content:
72
+ application/json:
73
+ schema:
74
+ $ref: '#/components/schemas/ApiUserKeyResult'
75
+ example:
76
+ apiKey: string
77
+ '400':
78
+ description: 'Bad request, e.g. invalid data was sent in the request.'
79
+ content:
80
+ application/json: { }
81
+ '404':
82
+ description: 'Not found, reference id not found or closed in sandbox'
83
+ content:
84
+ Requested resource was not found:
85
+ schema:
86
+ $ref: '#/components/schemas/ErrorReason'
87
+ example:
88
+ code: RESOURCE_NOT_FOUND
89
+ message: Requested resource was not found.
90
+ application/json:
91
+ schema:
92
+ $ref: '#/components/schemas/ErrorReason'
93
+ example:
94
+ code: RESOURCE_NOT_FOUND
95
+ message: string
96
+ '500':
97
+ description: Internal error. Check log for information.
98
+ content:
99
+ application/json: { }
100
+ '/v1_0/apiuser/{X-Reference-Id}':
101
+ get:
102
+ summary: '/v1_0/apiuser/{X-Reference-Id} - GET'
103
+ description: Used to get API user information.
104
+ operationId: get-v1_0-apiuser
105
+ parameters:
106
+ - name: X-Reference-Id
107
+ in: path
108
+ description: Format - UUID. Recource ID for the API user to be created. UUID version 4 is required.
109
+ required: true
110
+ schema:
111
+ type: string
112
+ responses:
113
+ '200':
114
+ description: Ok
115
+ '400':
116
+ description: 'Bad request, e.g. invalid data was sent in the request.'
117
+ '404':
118
+ description: 'Not found, reference id not found or closed in sandbox'
119
+ content:
120
+ Requested resource was not found:
121
+ schema:
122
+ $ref: '#/components/schemas/ErrorReason'
123
+ example:
124
+ code: RESOURCE_NOT_FOUND
125
+ message: Requested resource was not found.
126
+ '500':
127
+ description: Internal error. Check log for information.
128
+ components:
129
+ schemas:
130
+ ApiUser:
131
+ type: object
132
+ properties:
133
+ providerCallbackHost:
134
+ type: string
135
+ description: The provider callback host
136
+ description: The create API user information
137
+ ApiUserResult:
138
+ type: object
139
+ properties:
140
+ providerCallbackHost:
141
+ type: string
142
+ description: The provider callback host
143
+ paymentServerUrl:
144
+ $ref: '#/components/schemas/PaymentServerUrl'
145
+ targetEnvironment:
146
+ $ref: '#/components/schemas/TargetEnvironment'
147
+ description: The API user information
148
+ ApiUserKeyResult:
149
+ type: object
150
+ properties:
151
+ apiKey:
152
+ type: string
153
+ description: The created API user key
154
+ PaymentServerUrl:
155
+ type: object
156
+ properties:
157
+ apiKey:
158
+ type: string
159
+ description: The payment server URL
160
+ TargetEnvironment:
161
+ type: object
162
+ properties:
163
+ apiKey:
164
+ type: string
165
+ description: The target environment
166
+ ErrorReason:
167
+ type: object
168
+ properties:
169
+ code:
170
+ enum:
171
+ - RESOURCE_NOT_FOUND
172
+ - RESOURCE_ALREADY_EXIST
173
+ type: string
174
+ message:
175
+ type: string
176
+ securitySchemes:
177
+ apiKeyHeader:
178
+ type: apiKey
179
+ name: Ocp-Apim-Subscription-Key
180
+ in: header
181
+ apiKeyQuery:
182
+ type: apiKey
183
+ name: subscription-key
184
+ in: query
185
+ security:
186
+ - apiKeyHeader: [ ]
187
+ - apiKeyQuery: [ ]
@@ -0,0 +1,4 @@
1
+ module MtnOpenApi
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,128 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mtn_open_api
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Paul Jeremiah Mugaya
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2024-01-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: yaml
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: json
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: json-schema
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.2'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.2'
69
+ - !ruby/object:Gem::Dependency
70
+ name: activesupport
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '6.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '6.0'
83
+ description: A Ruby gem for interacting with MTN Open API.
84
+ email:
85
+ - paulgrammer@koodeyo.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - CHANGELOG.md
91
+ - README.md
92
+ - Rakefile
93
+ - generate_readme.rb
94
+ - lib/mtn_open_api.rb
95
+ - lib/mtn_open_api/version.rb
96
+ - mtn_open_api.gemspec
97
+ - readme-template
98
+ - schemas/collection.yaml
99
+ - schemas/disbursement.yaml
100
+ - schemas/remittance.yaml
101
+ - schemas/sandbox-provisioning-api.yaml
102
+ - sig/mtn_open_api.rbs
103
+ homepage: https://github.com/koodeyo/mtn_open_api
104
+ licenses: []
105
+ metadata:
106
+ homepage_uri: https://github.com/koodeyo/mtn_open_api
107
+ source_code_uri: https://github.com/koodeyo/mtn_open_api.git
108
+ changelog_uri: https://github.com/koodeyo/mtn_open_api/CHANGELOG.md
109
+ post_install_message:
110
+ rdoc_options: []
111
+ require_paths:
112
+ - lib
113
+ required_ruby_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: 2.6.0
118
+ required_rubygems_version: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
123
+ requirements: []
124
+ rubygems_version: 3.3.7
125
+ signing_key:
126
+ specification_version: 4
127
+ summary: MTN Open API Ruby Gem
128
+ test_files: []