subtledata 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/subtledata.rb +26 -0
- data/lib/swagger/configuration.rb +2 -1
- data/lib/swagger/request.rb +4 -2
- data/models/authresponse.rb +52 -0
- data/models/authuserrequest.rb +57 -0
- data/models/card.rb +62 -0
- data/models/cardstatus.rb +47 -0
- data/models/category.rb +74 -0
- data/models/categoryimage.rb +37 -0
- data/models/connecteduser.rb +72 -0
- data/models/connectstatus.rb +42 -0
- data/models/country.rb +37 -0
- data/models/deleteuserstatus.rb +42 -0
- data/models/discountinfo.rb +42 -0
- data/models/discounttype.rb +42 -0
- data/models/employee.rb +132 -0
- data/models/externalpayment.rb +82 -0
- data/models/externalpaymentstatus.rb +42 -0
- data/models/item.rb +63 -0
- data/models/itemimage.rb +37 -0
- data/models/itemtoadd.rb +42 -0
- data/models/location.rb +211 -0
- data/models/newcard.rb +72 -0
- data/models/newconnection.rb +52 -0
- data/models/newexternalpayment.rb +77 -0
- data/models/newpayment.rb +62 -0
- data/models/newticket.rb +62 -0
- data/models/newuser.rb +42 -0
- data/models/newuserdetails.rb +82 -0
- data/models/openticket.rb +108 -0
- data/models/orderresults.rb +47 -0
- data/models/payment.rb +82 -0
- data/models/paymentstatus.rb +42 -0
- data/models/preauthcard.rb +72 -0
- data/models/preauthpayment.rb +82 -0
- data/models/revenuecenter.rb +42 -0
- data/models/state.rb +42 -0
- data/models/status.rb +42 -0
- data/models/tab.rb +92 -0
- data/models/tabledetails.rb +63 -0
- data/models/tableminimal.rb +52 -0
- data/models/tendertype.rb +42 -0
- data/models/terminal.rb +57 -0
- data/models/ticket.rb +188 -0
- data/models/ticketstatus.rb +47 -0
- data/models/user.rb +77 -0
- metadata +79 -3
data/lib/subtledata.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
models = File.join(File.dirname(__FILE__), '..', 'models', '*.rb')
|
3
|
+
Dir[models].each {|file| require file }
|
4
|
+
|
5
|
+
require_relative './general_api.rb'
|
6
|
+
require_relative './locations_api.rb'
|
7
|
+
require_relative './monkey.rb'
|
8
|
+
require_relative './swagger.rb'
|
9
|
+
require_relative './users_api.rb'
|
10
|
+
|
11
|
+
Swagger.configure do |config|
|
12
|
+
config.format = 'json'
|
13
|
+
config.scheme = 'https'
|
14
|
+
config.host = 'api.subtledata.com'
|
15
|
+
config.base_path = '/v1'
|
16
|
+
config.inject_format = false
|
17
|
+
end
|
18
|
+
|
19
|
+
module SubtleData
|
20
|
+
module Standard
|
21
|
+
Locations = ::Locations_api
|
22
|
+
Users = ::Users_api
|
23
|
+
General = ::General_api
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
@@ -3,7 +3,7 @@ module Swagger
|
|
3
3
|
class Configuration
|
4
4
|
require 'swagger/version'
|
5
5
|
|
6
|
-
attr_accessor :format, :api_key, :username, :password, :auth_token, :scheme, :host, :base_path, :user_agent, :logger
|
6
|
+
attr_accessor :format, :api_key, :username, :password, :auth_token, :scheme, :host, :base_path, :user_agent, :logger, :inject_format
|
7
7
|
|
8
8
|
# Defaults go in here..
|
9
9
|
def initialize
|
@@ -12,6 +12,7 @@ module Swagger
|
|
12
12
|
@host = 'api.wordnik.com'
|
13
13
|
@base_path = '/v4'
|
14
14
|
@user_agent = "ruby-#{Swagger::VERSION}"
|
15
|
+
@inject_format = true
|
15
16
|
end
|
16
17
|
|
17
18
|
end
|
data/lib/swagger/request.rb
CHANGED
@@ -81,8 +81,10 @@ module Swagger
|
|
81
81
|
# Stick a .{format} placeholder into the path if there isn't
|
82
82
|
# one already or an actual format like json or xml
|
83
83
|
# e.g. /words/blah => /words.{format}/blah
|
84
|
-
|
85
|
-
|
84
|
+
if Swagger.configuration.inject_format
|
85
|
+
unless ['.json', '.xml', '{format}'].any? {|s| p.downcase.include? s }
|
86
|
+
p = p.sub(/^(\/?\w+)/, "\\1.#{format}")
|
87
|
+
end
|
86
88
|
end
|
87
89
|
|
88
90
|
p = p.sub("{format}", self.format.to_s)
|
@@ -0,0 +1,52 @@
|
|
1
|
+
class AuthResponse
|
2
|
+
attr_accessor :device_id, :user_id, :result, :success, :error
|
3
|
+
|
4
|
+
# :internal => :external
|
5
|
+
def self.attribute_map
|
6
|
+
{
|
7
|
+
:device_id => :device_id, :user_id => :user_id, :result => :result, :success => :success, :error => :error
|
8
|
+
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(attributes = {})
|
13
|
+
# Morph attribute keys into undescored rubyish style
|
14
|
+
if attributes.to_s != ""
|
15
|
+
|
16
|
+
if AuthResponse.attribute_map["device_id".to_sym] != nil
|
17
|
+
name = "device_id".to_sym
|
18
|
+
value = attributes["device_id"]
|
19
|
+
send("#{name}=", value) if self.respond_to?(name)
|
20
|
+
end
|
21
|
+
if AuthResponse.attribute_map["user_id".to_sym] != nil
|
22
|
+
name = "user_id".to_sym
|
23
|
+
value = attributes["user_id"]
|
24
|
+
send("#{name}=", value) if self.respond_to?(name)
|
25
|
+
end
|
26
|
+
if AuthResponse.attribute_map["result".to_sym] != nil
|
27
|
+
name = "result".to_sym
|
28
|
+
value = attributes["result"]
|
29
|
+
send("#{name}=", value) if self.respond_to?(name)
|
30
|
+
end
|
31
|
+
if AuthResponse.attribute_map["success".to_sym] != nil
|
32
|
+
name = "success".to_sym
|
33
|
+
value = attributes["success"]
|
34
|
+
send("#{name}=", value) if self.respond_to?(name)
|
35
|
+
end
|
36
|
+
if AuthResponse.attribute_map["error".to_sym] != nil
|
37
|
+
name = "error".to_sym
|
38
|
+
value = attributes["error"]
|
39
|
+
send("#{name}=", value) if self.respond_to?(name)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def to_body
|
45
|
+
body = {}
|
46
|
+
AuthResponse.attribute_map.each_pair do |key,value|
|
47
|
+
body[value] = self.send(key) unless self.send(key).nil?
|
48
|
+
end
|
49
|
+
body
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
@@ -0,0 +1,57 @@
|
|
1
|
+
class AuthUserRequest
|
2
|
+
attr_accessor :username, :user_id, :device_uuid, :longitude, :latitude, :password
|
3
|
+
|
4
|
+
# :internal => :external
|
5
|
+
def self.attribute_map
|
6
|
+
{
|
7
|
+
:username => :username, :user_id => :user_id, :device_uuid => :device_uuid, :longitude => :longitude, :latitude => :latitude, :password => :password
|
8
|
+
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(attributes = {})
|
13
|
+
# Morph attribute keys into undescored rubyish style
|
14
|
+
if attributes.to_s != ""
|
15
|
+
|
16
|
+
if AuthUserRequest.attribute_map["username".to_sym] != nil
|
17
|
+
name = "username".to_sym
|
18
|
+
value = attributes["username"]
|
19
|
+
send("#{name}=", value) if self.respond_to?(name)
|
20
|
+
end
|
21
|
+
if AuthUserRequest.attribute_map["user_id".to_sym] != nil
|
22
|
+
name = "user_id".to_sym
|
23
|
+
value = attributes["user_id"]
|
24
|
+
send("#{name}=", value) if self.respond_to?(name)
|
25
|
+
end
|
26
|
+
if AuthUserRequest.attribute_map["device_uuid".to_sym] != nil
|
27
|
+
name = "device_uuid".to_sym
|
28
|
+
value = attributes["device_uuid"]
|
29
|
+
send("#{name}=", value) if self.respond_to?(name)
|
30
|
+
end
|
31
|
+
if AuthUserRequest.attribute_map["longitude".to_sym] != nil
|
32
|
+
name = "longitude".to_sym
|
33
|
+
value = attributes["longitude"]
|
34
|
+
send("#{name}=", value) if self.respond_to?(name)
|
35
|
+
end
|
36
|
+
if AuthUserRequest.attribute_map["latitude".to_sym] != nil
|
37
|
+
name = "latitude".to_sym
|
38
|
+
value = attributes["latitude"]
|
39
|
+
send("#{name}=", value) if self.respond_to?(name)
|
40
|
+
end
|
41
|
+
if AuthUserRequest.attribute_map["password".to_sym] != nil
|
42
|
+
name = "password".to_sym
|
43
|
+
value = attributes["password"]
|
44
|
+
send("#{name}=", value) if self.respond_to?(name)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def to_body
|
50
|
+
body = {}
|
51
|
+
AuthUserRequest.attribute_map.each_pair do |key,value|
|
52
|
+
body[value] = self.send(key) unless self.send(key).nil?
|
53
|
+
end
|
54
|
+
body
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
data/models/card.rb
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
class Card
|
2
|
+
attr_accessor :name_on_card, :card_type, :expiration_year, :card_id, :expiration_month, :nickname, :last_4_digits
|
3
|
+
|
4
|
+
# :internal => :external
|
5
|
+
def self.attribute_map
|
6
|
+
{
|
7
|
+
:name_on_card => :name_on_card, :card_type => :card_type, :expiration_year => :expiration_year, :card_id => :card_id, :expiration_month => :expiration_month, :nickname => :nickname, :last_4_digits => :last_4_digits
|
8
|
+
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(attributes = {})
|
13
|
+
# Morph attribute keys into undescored rubyish style
|
14
|
+
if attributes.to_s != ""
|
15
|
+
|
16
|
+
if Card.attribute_map["name_on_card".to_sym] != nil
|
17
|
+
name = "name_on_card".to_sym
|
18
|
+
value = attributes["name_on_card"]
|
19
|
+
send("#{name}=", value) if self.respond_to?(name)
|
20
|
+
end
|
21
|
+
if Card.attribute_map["card_type".to_sym] != nil
|
22
|
+
name = "card_type".to_sym
|
23
|
+
value = attributes["card_type"]
|
24
|
+
send("#{name}=", value) if self.respond_to?(name)
|
25
|
+
end
|
26
|
+
if Card.attribute_map["expiration_year".to_sym] != nil
|
27
|
+
name = "expiration_year".to_sym
|
28
|
+
value = attributes["expiration_year"]
|
29
|
+
send("#{name}=", value) if self.respond_to?(name)
|
30
|
+
end
|
31
|
+
if Card.attribute_map["card_id".to_sym] != nil
|
32
|
+
name = "card_id".to_sym
|
33
|
+
value = attributes["card_id"]
|
34
|
+
send("#{name}=", value) if self.respond_to?(name)
|
35
|
+
end
|
36
|
+
if Card.attribute_map["expiration_month".to_sym] != nil
|
37
|
+
name = "expiration_month".to_sym
|
38
|
+
value = attributes["expiration_month"]
|
39
|
+
send("#{name}=", value) if self.respond_to?(name)
|
40
|
+
end
|
41
|
+
if Card.attribute_map["nickname".to_sym] != nil
|
42
|
+
name = "nickname".to_sym
|
43
|
+
value = attributes["nickname"]
|
44
|
+
send("#{name}=", value) if self.respond_to?(name)
|
45
|
+
end
|
46
|
+
if Card.attribute_map["last_4_digits".to_sym] != nil
|
47
|
+
name = "last_4_digits".to_sym
|
48
|
+
value = attributes["last_4_digits"]
|
49
|
+
send("#{name}=", value) if self.respond_to?(name)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def to_body
|
55
|
+
body = {}
|
56
|
+
Card.attribute_map.each_pair do |key,value|
|
57
|
+
body[value] = self.send(key) unless self.send(key).nil?
|
58
|
+
end
|
59
|
+
body
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
@@ -0,0 +1,47 @@
|
|
1
|
+
class CardStatus
|
2
|
+
attr_accessor :card_id, :result, :success, :error
|
3
|
+
|
4
|
+
# :internal => :external
|
5
|
+
def self.attribute_map
|
6
|
+
{
|
7
|
+
:card_id => :card_id, :result => :result, :success => :success, :error => :error
|
8
|
+
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(attributes = {})
|
13
|
+
# Morph attribute keys into undescored rubyish style
|
14
|
+
if attributes.to_s != ""
|
15
|
+
|
16
|
+
if CardStatus.attribute_map["card_id".to_sym] != nil
|
17
|
+
name = "card_id".to_sym
|
18
|
+
value = attributes["card_id"]
|
19
|
+
send("#{name}=", value) if self.respond_to?(name)
|
20
|
+
end
|
21
|
+
if CardStatus.attribute_map["result".to_sym] != nil
|
22
|
+
name = "result".to_sym
|
23
|
+
value = attributes["result"]
|
24
|
+
send("#{name}=", value) if self.respond_to?(name)
|
25
|
+
end
|
26
|
+
if CardStatus.attribute_map["success".to_sym] != nil
|
27
|
+
name = "success".to_sym
|
28
|
+
value = attributes["success"]
|
29
|
+
send("#{name}=", value) if self.respond_to?(name)
|
30
|
+
end
|
31
|
+
if CardStatus.attribute_map["error".to_sym] != nil
|
32
|
+
name = "error".to_sym
|
33
|
+
value = attributes["error"]
|
34
|
+
send("#{name}=", value) if self.respond_to?(name)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def to_body
|
40
|
+
body = {}
|
41
|
+
CardStatus.attribute_map.each_pair do |key,value|
|
42
|
+
body[value] = self.send(key) unless self.send(key).nil?
|
43
|
+
end
|
44
|
+
body
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
data/models/category.rb
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
class Category
|
2
|
+
attr_accessor :items, :has_items, :instructional_text, :category_images, :category_id, :has_subcategories, :category_name
|
3
|
+
|
4
|
+
# :internal => :external
|
5
|
+
def self.attribute_map
|
6
|
+
{
|
7
|
+
:items => :items, :has_items => :has_items, :instructional_text => :instructional_text, :category_images => :category_images, :category_id => :category_id, :has_subcategories => :has_subcategories, :category_name => :category_name
|
8
|
+
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(attributes = {})
|
13
|
+
# Morph attribute keys into undescored rubyish style
|
14
|
+
if attributes.to_s != ""
|
15
|
+
|
16
|
+
if Category.attribute_map["items".to_sym] != nil
|
17
|
+
name = "items".to_sym
|
18
|
+
value = attributes["items"]
|
19
|
+
if value.is_a?(Array)
|
20
|
+
array = Array.new
|
21
|
+
value.each do |arrayValue|
|
22
|
+
array.push Item.new(arrayValue)
|
23
|
+
end
|
24
|
+
send("#{name}=", array) if self.respond_to?(name)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
if Category.attribute_map["has_items".to_sym] != nil
|
28
|
+
name = "has_items".to_sym
|
29
|
+
value = attributes["has_items"]
|
30
|
+
send("#{name}=", value) if self.respond_to?(name)
|
31
|
+
end
|
32
|
+
if Category.attribute_map["instructional_text".to_sym] != nil
|
33
|
+
name = "instructional_text".to_sym
|
34
|
+
value = attributes["instructional_text"]
|
35
|
+
send("#{name}=", value) if self.respond_to?(name)
|
36
|
+
end
|
37
|
+
if Category.attribute_map["category_images".to_sym] != nil
|
38
|
+
name = "category_images".to_sym
|
39
|
+
value = attributes["category_images"]
|
40
|
+
if value.is_a?(Array)
|
41
|
+
array = Array.new
|
42
|
+
value.each do |arrayValue|
|
43
|
+
array.push CategoryImage.new(arrayValue)
|
44
|
+
end
|
45
|
+
send("#{name}=", array) if self.respond_to?(name)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
if Category.attribute_map["category_id".to_sym] != nil
|
49
|
+
name = "category_id".to_sym
|
50
|
+
value = attributes["category_id"]
|
51
|
+
send("#{name}=", value) if self.respond_to?(name)
|
52
|
+
end
|
53
|
+
if Category.attribute_map["has_subcategories".to_sym] != nil
|
54
|
+
name = "has_subcategories".to_sym
|
55
|
+
value = attributes["has_subcategories"]
|
56
|
+
send("#{name}=", value) if self.respond_to?(name)
|
57
|
+
end
|
58
|
+
if Category.attribute_map["category_name".to_sym] != nil
|
59
|
+
name = "category_name".to_sym
|
60
|
+
value = attributes["category_name"]
|
61
|
+
send("#{name}=", value) if self.respond_to?(name)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def to_body
|
67
|
+
body = {}
|
68
|
+
Category.attribute_map.each_pair do |key,value|
|
69
|
+
body[value] = self.send(key) unless self.send(key).nil?
|
70
|
+
end
|
71
|
+
body
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
@@ -0,0 +1,37 @@
|
|
1
|
+
class CategoryImage
|
2
|
+
attr_accessor :image_url, :image_type_id
|
3
|
+
|
4
|
+
# :internal => :external
|
5
|
+
def self.attribute_map
|
6
|
+
{
|
7
|
+
:image_url => :image_url, :image_type_id => :image_type_id
|
8
|
+
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(attributes = {})
|
13
|
+
# Morph attribute keys into undescored rubyish style
|
14
|
+
if attributes.to_s != ""
|
15
|
+
|
16
|
+
if CategoryImage.attribute_map["image_url".to_sym] != nil
|
17
|
+
name = "image_url".to_sym
|
18
|
+
value = attributes["image_url"]
|
19
|
+
send("#{name}=", value) if self.respond_to?(name)
|
20
|
+
end
|
21
|
+
if CategoryImage.attribute_map["image_type_id".to_sym] != nil
|
22
|
+
name = "image_type_id".to_sym
|
23
|
+
value = attributes["image_type_id"]
|
24
|
+
send("#{name}=", value) if self.respond_to?(name)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def to_body
|
30
|
+
body = {}
|
31
|
+
CategoryImage.attribute_map.each_pair do |key,value|
|
32
|
+
body[value] = self.send(key) unless self.send(key).nil?
|
33
|
+
end
|
34
|
+
body
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
@@ -0,0 +1,72 @@
|
|
1
|
+
class ConnectedUser
|
2
|
+
attr_accessor :first_name, :last_name, :user_id, :dob, :email_address, :cover_number, :middle_name, :cell_phone, :user_name
|
3
|
+
|
4
|
+
# :internal => :external
|
5
|
+
def self.attribute_map
|
6
|
+
{
|
7
|
+
:first_name => :first_name, :last_name => :last_name, :user_id => :user_id, :dob => :dob, :email_address => :email_address, :cover_number => :cover_number, :middle_name => :middle_name, :cell_phone => :cell_phone, :user_name => :user_name
|
8
|
+
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(attributes = {})
|
13
|
+
# Morph attribute keys into undescored rubyish style
|
14
|
+
if attributes.to_s != ""
|
15
|
+
|
16
|
+
if ConnectedUser.attribute_map["first_name".to_sym] != nil
|
17
|
+
name = "first_name".to_sym
|
18
|
+
value = attributes["first_name"]
|
19
|
+
send("#{name}=", value) if self.respond_to?(name)
|
20
|
+
end
|
21
|
+
if ConnectedUser.attribute_map["last_name".to_sym] != nil
|
22
|
+
name = "last_name".to_sym
|
23
|
+
value = attributes["last_name"]
|
24
|
+
send("#{name}=", value) if self.respond_to?(name)
|
25
|
+
end
|
26
|
+
if ConnectedUser.attribute_map["user_id".to_sym] != nil
|
27
|
+
name = "user_id".to_sym
|
28
|
+
value = attributes["user_id"]
|
29
|
+
send("#{name}=", value) if self.respond_to?(name)
|
30
|
+
end
|
31
|
+
if ConnectedUser.attribute_map["dob".to_sym] != nil
|
32
|
+
name = "dob".to_sym
|
33
|
+
value = attributes["dob"]
|
34
|
+
send("#{name}=", value) if self.respond_to?(name)
|
35
|
+
end
|
36
|
+
if ConnectedUser.attribute_map["email_address".to_sym] != nil
|
37
|
+
name = "email_address".to_sym
|
38
|
+
value = attributes["email_address"]
|
39
|
+
send("#{name}=", value) if self.respond_to?(name)
|
40
|
+
end
|
41
|
+
if ConnectedUser.attribute_map["cover_number".to_sym] != nil
|
42
|
+
name = "cover_number".to_sym
|
43
|
+
value = attributes["cover_number"]
|
44
|
+
send("#{name}=", value) if self.respond_to?(name)
|
45
|
+
end
|
46
|
+
if ConnectedUser.attribute_map["middle_name".to_sym] != nil
|
47
|
+
name = "middle_name".to_sym
|
48
|
+
value = attributes["middle_name"]
|
49
|
+
send("#{name}=", value) if self.respond_to?(name)
|
50
|
+
end
|
51
|
+
if ConnectedUser.attribute_map["cell_phone".to_sym] != nil
|
52
|
+
name = "cell_phone".to_sym
|
53
|
+
value = attributes["cell_phone"]
|
54
|
+
send("#{name}=", value) if self.respond_to?(name)
|
55
|
+
end
|
56
|
+
if ConnectedUser.attribute_map["user_name".to_sym] != nil
|
57
|
+
name = "user_name".to_sym
|
58
|
+
value = attributes["user_name"]
|
59
|
+
send("#{name}=", value) if self.respond_to?(name)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def to_body
|
65
|
+
body = {}
|
66
|
+
ConnectedUser.attribute_map.each_pair do |key,value|
|
67
|
+
body[value] = self.send(key) unless self.send(key).nil?
|
68
|
+
end
|
69
|
+
body
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
class ConnectStatus
|
2
|
+
attr_accessor :result, :success, :error
|
3
|
+
|
4
|
+
# :internal => :external
|
5
|
+
def self.attribute_map
|
6
|
+
{
|
7
|
+
:result => :result, :success => :success, :error => :error
|
8
|
+
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(attributes = {})
|
13
|
+
# Morph attribute keys into undescored rubyish style
|
14
|
+
if attributes.to_s != ""
|
15
|
+
|
16
|
+
if ConnectStatus.attribute_map["result".to_sym] != nil
|
17
|
+
name = "result".to_sym
|
18
|
+
value = attributes["result"]
|
19
|
+
send("#{name}=", value) if self.respond_to?(name)
|
20
|
+
end
|
21
|
+
if ConnectStatus.attribute_map["success".to_sym] != nil
|
22
|
+
name = "success".to_sym
|
23
|
+
value = attributes["success"]
|
24
|
+
send("#{name}=", value) if self.respond_to?(name)
|
25
|
+
end
|
26
|
+
if ConnectStatus.attribute_map["error".to_sym] != nil
|
27
|
+
name = "error".to_sym
|
28
|
+
value = attributes["error"]
|
29
|
+
send("#{name}=", value) if self.respond_to?(name)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def to_body
|
35
|
+
body = {}
|
36
|
+
ConnectStatus.attribute_map.each_pair do |key,value|
|
37
|
+
body[value] = self.send(key) unless self.send(key).nil?
|
38
|
+
end
|
39
|
+
body
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
data/models/country.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
class Country
|
2
|
+
attr_accessor :country_name, :country_id
|
3
|
+
|
4
|
+
# :internal => :external
|
5
|
+
def self.attribute_map
|
6
|
+
{
|
7
|
+
:country_name => :country_name, :country_id => :country_id
|
8
|
+
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(attributes = {})
|
13
|
+
# Morph attribute keys into undescored rubyish style
|
14
|
+
if attributes.to_s != ""
|
15
|
+
|
16
|
+
if Country.attribute_map["country_name".to_sym] != nil
|
17
|
+
name = "country_name".to_sym
|
18
|
+
value = attributes["country_name"]
|
19
|
+
send("#{name}=", value) if self.respond_to?(name)
|
20
|
+
end
|
21
|
+
if Country.attribute_map["country_id".to_sym] != nil
|
22
|
+
name = "country_id".to_sym
|
23
|
+
value = attributes["country_id"]
|
24
|
+
send("#{name}=", value) if self.respond_to?(name)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def to_body
|
30
|
+
body = {}
|
31
|
+
Country.attribute_map.each_pair do |key,value|
|
32
|
+
body[value] = self.send(key) unless self.send(key).nil?
|
33
|
+
end
|
34
|
+
body
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
class DeleteUserStatus
|
2
|
+
attr_accessor :result, :success, :error
|
3
|
+
|
4
|
+
# :internal => :external
|
5
|
+
def self.attribute_map
|
6
|
+
{
|
7
|
+
:result => :result, :success => :success, :error => :error
|
8
|
+
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(attributes = {})
|
13
|
+
# Morph attribute keys into undescored rubyish style
|
14
|
+
if attributes.to_s != ""
|
15
|
+
|
16
|
+
if DeleteUserStatus.attribute_map["result".to_sym] != nil
|
17
|
+
name = "result".to_sym
|
18
|
+
value = attributes["result"]
|
19
|
+
send("#{name}=", value) if self.respond_to?(name)
|
20
|
+
end
|
21
|
+
if DeleteUserStatus.attribute_map["success".to_sym] != nil
|
22
|
+
name = "success".to_sym
|
23
|
+
value = attributes["success"]
|
24
|
+
send("#{name}=", value) if self.respond_to?(name)
|
25
|
+
end
|
26
|
+
if DeleteUserStatus.attribute_map["error".to_sym] != nil
|
27
|
+
name = "error".to_sym
|
28
|
+
value = attributes["error"]
|
29
|
+
send("#{name}=", value) if self.respond_to?(name)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def to_body
|
35
|
+
body = {}
|
36
|
+
DeleteUserStatus.attribute_map.each_pair do |key,value|
|
37
|
+
body[value] = self.send(key) unless self.send(key).nil?
|
38
|
+
end
|
39
|
+
body
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
class DiscountInfo
|
2
|
+
attr_accessor :discount_type, :user_id, :discount_amount
|
3
|
+
|
4
|
+
# :internal => :external
|
5
|
+
def self.attribute_map
|
6
|
+
{
|
7
|
+
:discount_type => :discount_type, :user_id => :user_id, :discount_amount => :discount_amount
|
8
|
+
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(attributes = {})
|
13
|
+
# Morph attribute keys into undescored rubyish style
|
14
|
+
if attributes.to_s != ""
|
15
|
+
|
16
|
+
if DiscountInfo.attribute_map["discount_type".to_sym] != nil
|
17
|
+
name = "discount_type".to_sym
|
18
|
+
value = attributes["discount_type"]
|
19
|
+
send("#{name}=", value) if self.respond_to?(name)
|
20
|
+
end
|
21
|
+
if DiscountInfo.attribute_map["user_id".to_sym] != nil
|
22
|
+
name = "user_id".to_sym
|
23
|
+
value = attributes["user_id"]
|
24
|
+
send("#{name}=", value) if self.respond_to?(name)
|
25
|
+
end
|
26
|
+
if DiscountInfo.attribute_map["discount_amount".to_sym] != nil
|
27
|
+
name = "discount_amount".to_sym
|
28
|
+
value = attributes["discount_amount"]
|
29
|
+
send("#{name}=", value) if self.respond_to?(name)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def to_body
|
35
|
+
body = {}
|
36
|
+
DiscountInfo.attribute_map.each_pair do |key,value|
|
37
|
+
body[value] = self.send(key) unless self.send(key).nil?
|
38
|
+
end
|
39
|
+
body
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
class DiscountType
|
2
|
+
attr_accessor :default_discount, :discount_type_id, :name
|
3
|
+
|
4
|
+
# :internal => :external
|
5
|
+
def self.attribute_map
|
6
|
+
{
|
7
|
+
:default_discount => :default_discount, :discount_type_id => :discount_type_id, :name => :name
|
8
|
+
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(attributes = {})
|
13
|
+
# Morph attribute keys into undescored rubyish style
|
14
|
+
if attributes.to_s != ""
|
15
|
+
|
16
|
+
if DiscountType.attribute_map["default_discount".to_sym] != nil
|
17
|
+
name = "default_discount".to_sym
|
18
|
+
value = attributes["default_discount"]
|
19
|
+
send("#{name}=", value) if self.respond_to?(name)
|
20
|
+
end
|
21
|
+
if DiscountType.attribute_map["discount_type_id".to_sym] != nil
|
22
|
+
name = "discount_type_id".to_sym
|
23
|
+
value = attributes["discount_type_id"]
|
24
|
+
send("#{name}=", value) if self.respond_to?(name)
|
25
|
+
end
|
26
|
+
if DiscountType.attribute_map["name".to_sym] != nil
|
27
|
+
name = "name".to_sym
|
28
|
+
value = attributes["name"]
|
29
|
+
send("#{name}=", value) if self.respond_to?(name)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def to_body
|
35
|
+
body = {}
|
36
|
+
DiscountType.attribute_map.each_pair do |key,value|
|
37
|
+
body[value] = self.send(key) unless self.send(key).nil?
|
38
|
+
end
|
39
|
+
body
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|