yotpo_api_smart_map 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,169 @@
1
+ =begin
2
+ smartmap.proto
3
+
4
+ OpenAPI spec version: version not set
5
+
6
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
7
+
8
+
9
+ =end
10
+
11
+ require 'date'
12
+
13
+ module YotpoApiSmartMap
14
+ class SmartmapExcludedDay
15
+ attr_accessor :day
16
+
17
+ attr_accessor :percentage
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+
23
+ :'day' => :'day',
24
+
25
+ :'percentage' => :'percentage'
26
+
27
+ }
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.swagger_types
32
+ {
33
+ :'day' => :'String',
34
+ :'percentage' => :'Float'
35
+
36
+ }
37
+ end
38
+
39
+ def initialize(attributes = {})
40
+ return unless attributes.is_a?(Hash)
41
+
42
+ # convert string to symbol for hash key
43
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
44
+
45
+
46
+ if attributes[:'day']
47
+ self.day = attributes[:'day']
48
+ end
49
+
50
+ if attributes[:'percentage']
51
+ self.percentage = attributes[:'percentage']
52
+ end
53
+
54
+ end
55
+
56
+ # Check equality by comparing each attribute.
57
+ def ==(o)
58
+ return true if self.equal?(o)
59
+ self.class == o.class &&
60
+ day == o.day &&
61
+ percentage == o.percentage
62
+ end
63
+
64
+ # @see the `==` method
65
+ def eql?(o)
66
+ self == o
67
+ end
68
+
69
+ # Calculate hash code according to all attributes.
70
+ def hash
71
+ [day, percentage].hash
72
+ end
73
+
74
+ # build the object from hash
75
+ def build_from_hash(attributes)
76
+ return nil unless attributes.is_a?(Hash)
77
+ self.class.swagger_types.each_pair do |key, type|
78
+ if type =~ /^Array<(.*)>/i
79
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
80
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
81
+ else
82
+ #TODO show warning in debug mode
83
+ end
84
+ elsif !attributes[self.class.attribute_map[key]].nil?
85
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
86
+ else
87
+ # data not found in attributes(hash), not an issue as the data can be optional
88
+ end
89
+ end
90
+
91
+ self
92
+ end
93
+
94
+ def _deserialize(type, value)
95
+ case type.to_sym
96
+ when :DateTime
97
+ DateTime.parse(value)
98
+ when :Date
99
+ Date.parse(value)
100
+ when :String
101
+ value.to_s
102
+ when :Integer
103
+ value.to_i
104
+ when :Float
105
+ value.to_f
106
+ when :BOOLEAN
107
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
108
+ true
109
+ else
110
+ false
111
+ end
112
+ when :Object
113
+ # generic object (usually a Hash), return directly
114
+ value
115
+ when /\AArray<(?<inner_type>.+)>\z/
116
+ inner_type = Regexp.last_match[:inner_type]
117
+ value.map { |v| _deserialize(inner_type, v) }
118
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
119
+ k_type = Regexp.last_match[:k_type]
120
+ v_type = Regexp.last_match[:v_type]
121
+ {}.tap do |hash|
122
+ value.each do |k, v|
123
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
124
+ end
125
+ end
126
+ else # model
127
+ _model = YotpoApiSmartMap.const_get(type).new
128
+ _model.build_from_hash(value)
129
+ end
130
+ end
131
+
132
+ def to_s
133
+ to_hash.to_s
134
+ end
135
+
136
+ # to_body is an alias to to_body (backward compatibility))
137
+ def to_body
138
+ to_hash
139
+ end
140
+
141
+ # return the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ next if value.nil?
147
+ hash[param] = _to_hash(value)
148
+ end
149
+ hash
150
+ end
151
+
152
+ # Method to output non-array value in the form of hash
153
+ # For object, use to_hash. Otherwise, just return the value
154
+ def _to_hash(value)
155
+ if value.is_a?(Array)
156
+ value.compact.map{ |v| _to_hash(v) }
157
+ elsif value.is_a?(Hash)
158
+ {}.tap do |hash|
159
+ value.each { |k, v| hash[k] = _to_hash(v) }
160
+ end
161
+ elsif value.respond_to? :to_hash
162
+ value.to_hash
163
+ else
164
+ value
165
+ end
166
+ end
167
+
168
+ end
169
+ end
@@ -0,0 +1,13 @@
1
+ =begin
2
+ smartmap.proto
3
+
4
+ OpenAPI spec version: version not set
5
+
6
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
7
+
8
+
9
+ =end
10
+
11
+ module YotpoApiSmartMap
12
+ VERSION = "1.0.0"
13
+ end
@@ -0,0 +1,49 @@
1
+ =begin
2
+ smartmap.proto
3
+
4
+ OpenAPI spec version: version not set
5
+
6
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
7
+
8
+
9
+ =end
10
+
11
+ require 'spec_helper'
12
+ require 'json'
13
+
14
+ # Unit tests for YotpoApiSmartMap::SmartMapsApi
15
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
16
+ # Please update as you see appropriate
17
+ describe 'SmartMapsApi' do
18
+ before do
19
+ # run before each test
20
+ @instance = YotpoApiSmartMap::SmartMapsApi.new
21
+ end
22
+
23
+ after do
24
+ # run after each test
25
+ end
26
+
27
+ describe 'test an instance of SmartMapsApi' do
28
+ it 'should create an instact of SmartMapsApi' do
29
+ @instance.should be_a(YotpoApiSmartMap::SmartMapsApi)
30
+ end
31
+ end
32
+
33
+ # unit tests for get
34
+ #
35
+ #
36
+ # @param account_id
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [SmartmapAccountStats]
39
+ describe 'get test' do
40
+ it "should work" do
41
+ # assertion here
42
+ # should be_a()
43
+ # should be_nil
44
+ # should ==
45
+ # should_not ==
46
+ end
47
+ end
48
+
49
+ end
@@ -0,0 +1,44 @@
1
+ =begin
2
+ smartmap.proto
3
+
4
+ OpenAPI spec version: version not set
5
+
6
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
7
+
8
+
9
+ =end
10
+
11
+ require 'spec_helper'
12
+ require 'json'
13
+ require 'date'
14
+
15
+ # Unit tests for YotpoApiSmartMap::SmartmapAccountStats
16
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
17
+ # Please update as you see appropriate
18
+ describe 'SmartmapAccountStats' do
19
+ before do
20
+ # run before each test
21
+ @instance = YotpoApiSmartMap::SmartmapAccountStats.new
22
+ end
23
+
24
+ after do
25
+ # run after each test
26
+ end
27
+
28
+ describe 'test an instance of SmartmapAccountStats' do
29
+ it 'should create an instact of SmartmapAccountStats' do
30
+ @instance.should be_a(YotpoApiSmartMap::SmartmapAccountStats)
31
+ end
32
+ end
33
+ describe 'test attribute "excluded_days"' do
34
+ it 'should work' do
35
+ # assertion here
36
+ # should be_a()
37
+ # should be_nil
38
+ # should ==
39
+ # should_not ==
40
+ end
41
+ end
42
+
43
+ end
44
+
@@ -0,0 +1,44 @@
1
+ =begin
2
+ smartmap.proto
3
+
4
+ OpenAPI spec version: version not set
5
+
6
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
7
+
8
+
9
+ =end
10
+
11
+ require 'spec_helper'
12
+ require 'json'
13
+ require 'date'
14
+
15
+ # Unit tests for YotpoApiSmartMap::SmartmapArgs
16
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
17
+ # Please update as you see appropriate
18
+ describe 'SmartmapArgs' do
19
+ before do
20
+ # run before each test
21
+ @instance = YotpoApiSmartMap::SmartmapArgs.new
22
+ end
23
+
24
+ after do
25
+ # run after each test
26
+ end
27
+
28
+ describe 'test an instance of SmartmapArgs' do
29
+ it 'should create an instact of SmartmapArgs' do
30
+ @instance.should be_a(YotpoApiSmartMap::SmartmapArgs)
31
+ end
32
+ end
33
+ describe 'test attribute "account_id"' do
34
+ it 'should work' do
35
+ # assertion here
36
+ # should be_a()
37
+ # should be_nil
38
+ # should ==
39
+ # should_not ==
40
+ end
41
+ end
42
+
43
+ end
44
+
@@ -0,0 +1,54 @@
1
+ =begin
2
+ smartmap.proto
3
+
4
+ OpenAPI spec version: version not set
5
+
6
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
7
+
8
+
9
+ =end
10
+
11
+ require 'spec_helper'
12
+ require 'json'
13
+ require 'date'
14
+
15
+ # Unit tests for YotpoApiSmartMap::SmartmapExcludedDay
16
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
17
+ # Please update as you see appropriate
18
+ describe 'SmartmapExcludedDay' do
19
+ before do
20
+ # run before each test
21
+ @instance = YotpoApiSmartMap::SmartmapExcludedDay.new
22
+ end
23
+
24
+ after do
25
+ # run after each test
26
+ end
27
+
28
+ describe 'test an instance of SmartmapExcludedDay' do
29
+ it 'should create an instact of SmartmapExcludedDay' do
30
+ @instance.should be_a(YotpoApiSmartMap::SmartmapExcludedDay)
31
+ end
32
+ end
33
+ describe 'test attribute "day"' do
34
+ it 'should work' do
35
+ # assertion here
36
+ # should be_a()
37
+ # should be_nil
38
+ # should ==
39
+ # should_not ==
40
+ end
41
+ end
42
+
43
+ describe 'test attribute "percentage"' do
44
+ it 'should work' do
45
+ # assertion here
46
+ # should be_a()
47
+ # should be_nil
48
+ # should ==
49
+ # should_not ==
50
+ end
51
+ end
52
+
53
+ end
54
+
@@ -0,0 +1,32 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "yotpo_api_smart_map/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "yotpo_api_smart_map"
7
+ s.version = YotpoApiSmartMap::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = [""]
10
+ s.email = [""]
11
+ s.homepage = ""
12
+ s.summary = ""
13
+ s.description = ""
14
+ s.license = ""
15
+
16
+
17
+ s.add_runtime_dependency 'typhoeus', '~> 0.2', '>= 0.2.1'
18
+ s.add_runtime_dependency 'json', '~> 1.4', '>= 1.4.6'
19
+
20
+ s.add_development_dependency 'rspec', '~> 3.2', '>= 3.2.0'
21
+ s.add_development_dependency 'vcr', '~> 2.9', '>= 2.9.3'
22
+ s.add_development_dependency 'webmock', '~> 1.6', '>= 1.6.2'
23
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
24
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
25
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
26
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.11'
27
+
28
+ s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
29
+ s.test_files = `find spec/*`.split("\n")
30
+ s.executables = []
31
+ s.require_paths = ["lib"]
32
+ end
metadata ADDED
@@ -0,0 +1,248 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: yotpo_api_smart_map
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - ''
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-08-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: typhoeus
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.2'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.2.1
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '0.2'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.2.1
33
+ - !ruby/object:Gem::Dependency
34
+ name: json
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '1.4'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 1.4.6
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '1.4'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 1.4.6
53
+ - !ruby/object:Gem::Dependency
54
+ name: rspec
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '3.2'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 3.2.0
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '3.2'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 3.2.0
73
+ - !ruby/object:Gem::Dependency
74
+ name: vcr
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: '2.9'
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 2.9.3
83
+ type: :development
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '2.9'
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 2.9.3
93
+ - !ruby/object:Gem::Dependency
94
+ name: webmock
95
+ requirement: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - "~>"
98
+ - !ruby/object:Gem::Version
99
+ version: '1.6'
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: 1.6.2
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '1.6'
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: 1.6.2
113
+ - !ruby/object:Gem::Dependency
114
+ name: autotest
115
+ requirement: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - "~>"
118
+ - !ruby/object:Gem::Version
119
+ version: '4.4'
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: 4.4.6
123
+ type: :development
124
+ prerelease: false
125
+ version_requirements: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - "~>"
128
+ - !ruby/object:Gem::Version
129
+ version: '4.4'
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: 4.4.6
133
+ - !ruby/object:Gem::Dependency
134
+ name: autotest-rails-pure
135
+ requirement: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: '4.1'
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: 4.1.2
143
+ type: :development
144
+ prerelease: false
145
+ version_requirements: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - "~>"
148
+ - !ruby/object:Gem::Version
149
+ version: '4.1'
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: 4.1.2
153
+ - !ruby/object:Gem::Dependency
154
+ name: autotest-growl
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '0.2'
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: 0.2.16
163
+ type: :development
164
+ prerelease: false
165
+ version_requirements: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - "~>"
168
+ - !ruby/object:Gem::Version
169
+ version: '0.2'
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: 0.2.16
173
+ - !ruby/object:Gem::Dependency
174
+ name: autotest-fsevent
175
+ requirement: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - "~>"
178
+ - !ruby/object:Gem::Version
179
+ version: '0.2'
180
+ - - ">="
181
+ - !ruby/object:Gem::Version
182
+ version: 0.2.11
183
+ type: :development
184
+ prerelease: false
185
+ version_requirements: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - "~>"
188
+ - !ruby/object:Gem::Version
189
+ version: '0.2'
190
+ - - ">="
191
+ - !ruby/object:Gem::Version
192
+ version: 0.2.11
193
+ description: ''
194
+ email:
195
+ - ''
196
+ executables: []
197
+ extensions: []
198
+ extra_rdoc_files: []
199
+ files:
200
+ - README.md
201
+ - docs/SmartMapsApi.md
202
+ - docs/SmartmapAccountStats.md
203
+ - docs/SmartmapArgs.md
204
+ - docs/SmartmapExcludedDay.md
205
+ - git_push.sh
206
+ - lib/yotpo_api_smart_map.rb
207
+ - lib/yotpo_api_smart_map/api/smart_maps_api.rb
208
+ - lib/yotpo_api_smart_map/api_client.rb
209
+ - lib/yotpo_api_smart_map/api_error.rb
210
+ - lib/yotpo_api_smart_map/configuration.rb
211
+ - lib/yotpo_api_smart_map/models/smartmap_account_stats.rb
212
+ - lib/yotpo_api_smart_map/models/smartmap_args.rb
213
+ - lib/yotpo_api_smart_map/models/smartmap_excluded_day.rb
214
+ - lib/yotpo_api_smart_map/version.rb
215
+ - spec/api/smart_maps_api_spec.rb
216
+ - spec/models/smartmap_account_stats_spec.rb
217
+ - spec/models/smartmap_args_spec.rb
218
+ - spec/models/smartmap_excluded_day_spec.rb
219
+ - yotpo_api_smart_map.gemspec
220
+ homepage: ''
221
+ licenses:
222
+ - ''
223
+ metadata: {}
224
+ post_install_message:
225
+ rdoc_options: []
226
+ require_paths:
227
+ - lib
228
+ required_ruby_version: !ruby/object:Gem::Requirement
229
+ requirements:
230
+ - - ">="
231
+ - !ruby/object:Gem::Version
232
+ version: '0'
233
+ required_rubygems_version: !ruby/object:Gem::Requirement
234
+ requirements:
235
+ - - ">="
236
+ - !ruby/object:Gem::Version
237
+ version: '0'
238
+ requirements: []
239
+ rubyforge_project:
240
+ rubygems_version: 2.5.1
241
+ signing_key:
242
+ specification_version: 4
243
+ summary: ''
244
+ test_files:
245
+ - spec/api/smart_maps_api_spec.rb
246
+ - spec/models/smartmap_account_stats_spec.rb
247
+ - spec/models/smartmap_args_spec.rb
248
+ - spec/models/smartmap_excluded_day_spec.rb