swagger_test 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +91 -0
- data/Rakefile +8 -0
- data/docs/KountRisAppApi.md +228 -0
- data/docs/ProductDetails.md +22 -0
- data/git_push.sh +55 -0
- data/kount.gemspec +45 -0
- data/lib/kount/api/kount_ris_app_api.rb +261 -0
- data/lib/kount/api_client.rb +388 -0
- data/lib/kount/api_error.rb +38 -0
- data/lib/kount/configuration.rb +202 -0
- data/lib/kount/models/product_details.rb +309 -0
- data/lib/kount/version.rb +15 -0
- data/lib/kount.rb +41 -0
- data/spec/api/kount_ris_app_api_spec.rb +85 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/product_details_spec.rb +125 -0
- data/spec/spec_helper.rb +111 -0
- metadata +248 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fef8e1eecfc5bd997d23454a5f7a91fa16298350fac1e3dadbea9fbe2b4c7d76
|
4
|
+
data.tar.gz: ea6e40370084833be5586ebf9c2e729b00aaa5bd118e2abe0ddc83a0bade97b2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5fe03e8ec624b79ea595b167b14713219dbcc98a4057cc282a9600cb34d853b32625cee4551d45395c52dbc1711dd8251b806de3943b12f0a7d61b298d7d8308
|
7
|
+
data.tar.gz: 0432a4d1aa63c181af6540782191ced6a4fcfe21b489cfa08d3abeedb77238e8838032e133fd4c8b743c275ece48be921678b49c2e87cb03420ad6a186262cc6
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
# kount
|
2
|
+
|
3
|
+
Kount - the Ruby gem for the A title for your API
|
4
|
+
|
5
|
+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
6
|
+
|
7
|
+
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
|
+
|
9
|
+
- API version: v1
|
10
|
+
- Package version: 1.0.0
|
11
|
+
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
### Build a gem
|
16
|
+
|
17
|
+
To build the Ruby code into a gem:
|
18
|
+
|
19
|
+
```shell
|
20
|
+
gem build kount.gemspec
|
21
|
+
```
|
22
|
+
|
23
|
+
Then either install the gem locally:
|
24
|
+
|
25
|
+
```shell
|
26
|
+
gem install ./kount-1.0.0.gem
|
27
|
+
```
|
28
|
+
(for development, run `gem install --dev ./kount-1.0.0.gem` to install the development dependencies)
|
29
|
+
|
30
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
|
+
|
32
|
+
Finally add this to the Gemfile:
|
33
|
+
|
34
|
+
gem 'kount', '~> 1.0.0'
|
35
|
+
|
36
|
+
### Install from Git
|
37
|
+
|
38
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
39
|
+
|
40
|
+
gem 'kount', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
41
|
+
|
42
|
+
### Include the Ruby code directly
|
43
|
+
|
44
|
+
Include the Ruby code directly using `-I` as follows:
|
45
|
+
|
46
|
+
```shell
|
47
|
+
ruby -Ilib script.rb
|
48
|
+
```
|
49
|
+
|
50
|
+
## Getting Started
|
51
|
+
|
52
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
53
|
+
```ruby
|
54
|
+
# Load the gem
|
55
|
+
require 'kount'
|
56
|
+
|
57
|
+
api_instance = Kount::KountRisAppApi.new
|
58
|
+
|
59
|
+
id = 56 # Integer |
|
60
|
+
|
61
|
+
|
62
|
+
begin
|
63
|
+
api_instance.kount_ris_app_delete(id)
|
64
|
+
rescue Kount::ApiError => e
|
65
|
+
puts "Exception when calling KountRisAppApi->kount_ris_app_delete: #{e}"
|
66
|
+
end
|
67
|
+
|
68
|
+
```
|
69
|
+
|
70
|
+
## Documentation for API Endpoints
|
71
|
+
|
72
|
+
All URIs are relative to *http://localhost:51122*
|
73
|
+
|
74
|
+
Class | Method | HTTP request | Description
|
75
|
+
------------ | ------------- | ------------- | -------------
|
76
|
+
*Kount::KountRisAppApi* | [**kount_ris_app_delete**](docs/KountRisAppApi.md#kount_ris_app_delete) | **DELETE** /api/KountRisApp/{id} |
|
77
|
+
*Kount::KountRisAppApi* | [**kount_ris_app_get**](docs/KountRisAppApi.md#kount_ris_app_get) | **GET** /api/KountRisApp |
|
78
|
+
*Kount::KountRisAppApi* | [**kount_ris_app_get_0**](docs/KountRisAppApi.md#kount_ris_app_get_0) | **GET** /api/KountRisApp/{id} |
|
79
|
+
*Kount::KountRisAppApi* | [**kount_ris_app_post**](docs/KountRisAppApi.md#kount_ris_app_post) | **POST** /api/KountRisApp |
|
80
|
+
*Kount::KountRisAppApi* | [**kount_ris_app_put**](docs/KountRisAppApi.md#kount_ris_app_put) | **PUT** /api/KountRisApp/{id} |
|
81
|
+
|
82
|
+
|
83
|
+
## Documentation for Models
|
84
|
+
|
85
|
+
- [Kount::ProductDetails](docs/ProductDetails.md)
|
86
|
+
|
87
|
+
|
88
|
+
## Documentation for Authorization
|
89
|
+
|
90
|
+
All endpoints do not require authorization.
|
91
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,228 @@
|
|
1
|
+
# Kount::KountRisAppApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost:51122*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**kount_ris_app_delete**](KountRisAppApi.md#kount_ris_app_delete) | **DELETE** /api/KountRisApp/{id} |
|
8
|
+
[**kount_ris_app_get**](KountRisAppApi.md#kount_ris_app_get) | **GET** /api/KountRisApp |
|
9
|
+
[**kount_ris_app_get_0**](KountRisAppApi.md#kount_ris_app_get_0) | **GET** /api/KountRisApp/{id} |
|
10
|
+
[**kount_ris_app_post**](KountRisAppApi.md#kount_ris_app_post) | **POST** /api/KountRisApp |
|
11
|
+
[**kount_ris_app_put**](KountRisAppApi.md#kount_ris_app_put) | **PUT** /api/KountRisApp/{id} |
|
12
|
+
|
13
|
+
|
14
|
+
# **kount_ris_app_delete**
|
15
|
+
> kount_ris_app_delete(id)
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
### Example
|
20
|
+
```ruby
|
21
|
+
# load the gem
|
22
|
+
require 'kount'
|
23
|
+
|
24
|
+
api_instance = Kount::KountRisAppApi.new
|
25
|
+
|
26
|
+
id = 56 # Integer |
|
27
|
+
|
28
|
+
|
29
|
+
begin
|
30
|
+
api_instance.kount_ris_app_delete(id)
|
31
|
+
rescue Kount::ApiError => e
|
32
|
+
puts "Exception when calling KountRisAppApi->kount_ris_app_delete: #{e}"
|
33
|
+
end
|
34
|
+
```
|
35
|
+
|
36
|
+
### Parameters
|
37
|
+
|
38
|
+
Name | Type | Description | Notes
|
39
|
+
------------- | ------------- | ------------- | -------------
|
40
|
+
**id** | **Integer**| |
|
41
|
+
|
42
|
+
### Return type
|
43
|
+
|
44
|
+
nil (empty response body)
|
45
|
+
|
46
|
+
### Authorization
|
47
|
+
|
48
|
+
No authorization required
|
49
|
+
|
50
|
+
### HTTP request headers
|
51
|
+
|
52
|
+
- **Content-Type**: Not defined
|
53
|
+
- **Accept**: Not defined
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
# **kount_ris_app_get**
|
58
|
+
> String kount_ris_app_get
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
### Example
|
63
|
+
```ruby
|
64
|
+
# load the gem
|
65
|
+
require 'kount'
|
66
|
+
|
67
|
+
api_instance = Kount::KountRisAppApi.new
|
68
|
+
|
69
|
+
begin
|
70
|
+
result = api_instance.kount_ris_app_get
|
71
|
+
p result
|
72
|
+
rescue Kount::ApiError => e
|
73
|
+
puts "Exception when calling KountRisAppApi->kount_ris_app_get: #{e}"
|
74
|
+
end
|
75
|
+
```
|
76
|
+
|
77
|
+
### Parameters
|
78
|
+
This endpoint does not need any parameter.
|
79
|
+
|
80
|
+
### Return type
|
81
|
+
|
82
|
+
**String**
|
83
|
+
|
84
|
+
### Authorization
|
85
|
+
|
86
|
+
No authorization required
|
87
|
+
|
88
|
+
### HTTP request headers
|
89
|
+
|
90
|
+
- **Content-Type**: Not defined
|
91
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
# **kount_ris_app_get_0**
|
96
|
+
> String kount_ris_app_get_0(id)
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
### Example
|
101
|
+
```ruby
|
102
|
+
# load the gem
|
103
|
+
require 'kount'
|
104
|
+
|
105
|
+
api_instance = Kount::KountRisAppApi.new
|
106
|
+
|
107
|
+
id = 56 # Integer |
|
108
|
+
|
109
|
+
|
110
|
+
begin
|
111
|
+
result = api_instance.kount_ris_app_get_0(id)
|
112
|
+
p result
|
113
|
+
rescue Kount::ApiError => e
|
114
|
+
puts "Exception when calling KountRisAppApi->kount_ris_app_get_0: #{e}"
|
115
|
+
end
|
116
|
+
```
|
117
|
+
|
118
|
+
### Parameters
|
119
|
+
|
120
|
+
Name | Type | Description | Notes
|
121
|
+
------------- | ------------- | ------------- | -------------
|
122
|
+
**id** | **Integer**| |
|
123
|
+
|
124
|
+
### Return type
|
125
|
+
|
126
|
+
**String**
|
127
|
+
|
128
|
+
### Authorization
|
129
|
+
|
130
|
+
No authorization required
|
131
|
+
|
132
|
+
### HTTP request headers
|
133
|
+
|
134
|
+
- **Content-Type**: Not defined
|
135
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
# **kount_ris_app_post**
|
140
|
+
> String kount_ris_app_post(_product_details)
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
### Example
|
145
|
+
```ruby
|
146
|
+
# load the gem
|
147
|
+
require 'kount'
|
148
|
+
|
149
|
+
api_instance = Kount::KountRisAppApi.new
|
150
|
+
|
151
|
+
_product_details = Kount::ProductDetails.new # ProductDetails |
|
152
|
+
|
153
|
+
|
154
|
+
begin
|
155
|
+
result = api_instance.kount_ris_app_post(_product_details)
|
156
|
+
p result
|
157
|
+
rescue Kount::ApiError => e
|
158
|
+
puts "Exception when calling KountRisAppApi->kount_ris_app_post: #{e}"
|
159
|
+
end
|
160
|
+
```
|
161
|
+
|
162
|
+
### Parameters
|
163
|
+
|
164
|
+
Name | Type | Description | Notes
|
165
|
+
------------- | ------------- | ------------- | -------------
|
166
|
+
**_product_details** | [**ProductDetails**](ProductDetails.md)| |
|
167
|
+
|
168
|
+
### Return type
|
169
|
+
|
170
|
+
**String**
|
171
|
+
|
172
|
+
### Authorization
|
173
|
+
|
174
|
+
No authorization required
|
175
|
+
|
176
|
+
### HTTP request headers
|
177
|
+
|
178
|
+
- **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
|
179
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
# **kount_ris_app_put**
|
184
|
+
> kount_ris_app_put(id, value)
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
### Example
|
189
|
+
```ruby
|
190
|
+
# load the gem
|
191
|
+
require 'kount'
|
192
|
+
|
193
|
+
api_instance = Kount::KountRisAppApi.new
|
194
|
+
|
195
|
+
id = 56 # Integer |
|
196
|
+
|
197
|
+
value = 'value_example' # String |
|
198
|
+
|
199
|
+
|
200
|
+
begin
|
201
|
+
api_instance.kount_ris_app_put(id, value)
|
202
|
+
rescue Kount::ApiError => e
|
203
|
+
puts "Exception when calling KountRisAppApi->kount_ris_app_put: #{e}"
|
204
|
+
end
|
205
|
+
```
|
206
|
+
|
207
|
+
### Parameters
|
208
|
+
|
209
|
+
Name | Type | Description | Notes
|
210
|
+
------------- | ------------- | ------------- | -------------
|
211
|
+
**id** | **Integer**| |
|
212
|
+
**value** | **String**| |
|
213
|
+
|
214
|
+
### Return type
|
215
|
+
|
216
|
+
nil (empty response body)
|
217
|
+
|
218
|
+
### Authorization
|
219
|
+
|
220
|
+
No authorization required
|
221
|
+
|
222
|
+
### HTTP request headers
|
223
|
+
|
224
|
+
- **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
|
225
|
+
- **Accept**: Not defined
|
226
|
+
|
227
|
+
|
228
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Kount::ProductDetails
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**merchant_id** | **Integer** | | [optional]
|
7
|
+
**api_key** | **String** | | [optional]
|
8
|
+
**url** | **String** | | [optional]
|
9
|
+
**version** | **String** | | [optional]
|
10
|
+
**card_no** | **String** | | [optional]
|
11
|
+
**total** | **Integer** | | [optional]
|
12
|
+
**ip_address** | **String** | | [optional]
|
13
|
+
**email** | **String** | | [optional]
|
14
|
+
**session_id** | **String** | | [optional]
|
15
|
+
**mack** | **String** | | [optional]
|
16
|
+
**product_type** | **String** | | [optional]
|
17
|
+
**product_item** | **String** | | [optional]
|
18
|
+
**product_description** | **String** | | [optional]
|
19
|
+
**product_quantity** | **Integer** | | [optional]
|
20
|
+
**product_price** | **Integer** | | [optional]
|
21
|
+
|
22
|
+
|
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="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="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="Minor update"
|
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
|
+
|
data/kount.gemspec
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
#A title for your API
|
5
|
+
|
6
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
7
|
+
|
8
|
+
OpenAPI spec version: v1
|
9
|
+
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
|
+
Swagger Codegen version: 2.4.6-SNAPSHOT
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "kount/version"
|
17
|
+
|
18
|
+
Gem::Specification.new do |s|
|
19
|
+
s.name = "swagger_test"
|
20
|
+
s.version = '1.0.0'
|
21
|
+
s.platform = Gem::Platform::RUBY
|
22
|
+
s.authors = ["Swagger-Codegen"]
|
23
|
+
s.email = [""]
|
24
|
+
s.homepage = "http://rubygems.org/gems/swagger_testruby"
|
25
|
+
s.summary = "A title for your API Ruby Gem"
|
26
|
+
s.description = "No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)"
|
27
|
+
s.license = "Unlicense"
|
28
|
+
s.required_ruby_version = ">= 1.9"
|
29
|
+
|
30
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
32
|
+
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
34
|
+
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
35
|
+
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
36
|
+
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
37
|
+
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
38
|
+
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
39
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
|
40
|
+
|
41
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
42
|
+
s.test_files = `find spec/*`.split("\n")
|
43
|
+
s.executables = []
|
44
|
+
s.require_paths = ["lib"]
|
45
|
+
end
|