wesley-key-sdk 0.1.6 → 0.1.7

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.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +67 -25
  3. data/bin/console +4 -4
  4. data/lib/{cypress_test_api → swagger_petstore}/api_helper.rb +2 -2
  5. data/lib/swagger_petstore/client.rb +95 -0
  6. data/lib/{cypress_test_api → swagger_petstore}/configuration.rb +61 -20
  7. data/lib/{cypress_test_api → swagger_petstore}/controllers/base_controller.rb +2 -2
  8. data/lib/swagger_petstore/controllers/pet_controller.rb +206 -0
  9. data/lib/swagger_petstore/controllers/store_controller.rb +94 -0
  10. data/lib/swagger_petstore/controllers/user_controller.rb +165 -0
  11. data/lib/{cypress_test_api → swagger_petstore}/exceptions/api_exception.rb +2 -2
  12. data/lib/swagger_petstore/exceptions/o_auth_provider_exception.rb +64 -0
  13. data/lib/swagger_petstore/http/auth/api_key.rb +52 -0
  14. data/lib/swagger_petstore/http/auth/http_basic.rb +62 -0
  15. data/lib/swagger_petstore/http/auth/petstore_auth.rb +113 -0
  16. data/lib/{cypress_test_api → swagger_petstore}/http/http_call_back.rb +2 -2
  17. data/lib/{cypress_test_api → swagger_petstore}/http/http_method_enum.rb +2 -2
  18. data/lib/{cypress_test_api → swagger_petstore}/http/http_request.rb +2 -2
  19. data/lib/{cypress_test_api → swagger_petstore}/http/http_response.rb +2 -2
  20. data/lib/{cypress_test_api → swagger_petstore}/http/proxy_settings.rb +2 -2
  21. data/lib/{cypress_test_api/models/message2.rb → swagger_petstore/models/api_response.rb} +24 -14
  22. data/lib/{cypress_test_api → swagger_petstore}/models/base_model.rb +2 -2
  23. data/lib/{cypress_test_api/models/item_response.rb → swagger_petstore/models/category.rb} +10 -19
  24. data/lib/{cypress_test_api/models/deer.rb → swagger_petstore/models/category2.rb} +21 -18
  25. data/lib/swagger_petstore/models/content_type_enum.rb +26 -0
  26. data/lib/swagger_petstore/models/o_auth_provider_error_enum.rb +62 -0
  27. data/lib/swagger_petstore/models/o_auth_scope_petstore_auth_enum.rb +36 -0
  28. data/lib/swagger_petstore/models/o_auth_token.rb +96 -0
  29. data/lib/swagger_petstore/models/order.rb +120 -0
  30. data/lib/swagger_petstore/models/pet.rb +117 -0
  31. data/lib/swagger_petstore/models/pet_request.rb +117 -0
  32. data/lib/swagger_petstore/models/status1_enum.rb +40 -0
  33. data/lib/swagger_petstore/models/status2_enum.rb +40 -0
  34. data/lib/{cypress_test_api → swagger_petstore}/models/status_enum.rb +12 -12
  35. data/lib/swagger_petstore/models/store_order_request.rb +120 -0
  36. data/lib/{cypress_test_api/models/response_http404.rb → swagger_petstore/models/tag.rb} +18 -9
  37. data/lib/swagger_petstore/models/user.rb +132 -0
  38. data/lib/swagger_petstore/models/user_request.rb +132 -0
  39. data/lib/{cypress_test_api → swagger_petstore}/utilities/date_time_helper.rb +2 -2
  40. data/lib/{cypress_test_api → swagger_petstore}/utilities/file_wrapper.rb +2 -2
  41. data/lib/swagger_petstore.rb +62 -0
  42. data/test/controllers/controller_test_base.rb +14 -5
  43. data/test/controllers/test_store_controller.rb +31 -0
  44. data/test/http_response_catcher.rb +2 -2
  45. metadata +41 -34
  46. data/lib/cypress_test_api/client.rb +0 -58
  47. data/lib/cypress_test_api/controllers/api_controller.rb +0 -102
  48. data/lib/cypress_test_api/models/custom_enum.rb +0 -40
  49. data/lib/cypress_test_api/models/item.rb +0 -166
  50. data/lib/cypress_test_api/models/lion.rb +0 -68
  51. data/lib/cypress_test_api/models/message.rb +0 -68
  52. data/lib/cypress_test_api/models/multiple_arrays_request.rb +0 -70
  53. data/lib/cypress_test_api/models/nac_tag.rb +0 -265
  54. data/lib/cypress_test_api/models/o_auth_scope_o_auth_acg_enum.rb +0 -44
  55. data/lib/cypress_test_api/models/response_http400.rb +0 -62
  56. data/lib/cypress_test_api/models/status11_enum.rb +0 -40
  57. data/lib/cypress_test_api/models/status1_enum.rb +0 -40
  58. data/lib/cypress_test_api/models/tokens_request.rb +0 -60
  59. data/lib/cypress_test_api.rb +0 -55
  60. data/test/controllers/test_api_controller.rb +0 -40
@@ -0,0 +1,120 @@
1
+ # swagger_petstore
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0
4
+ # ( https://www.apimatic.io ).
5
+
6
+ require 'date'
7
+ module SwaggerPetstore
8
+ # Order Model.
9
+ class Order < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # TODO: Write general description for this method
14
+ # @return [Integer]
15
+ attr_accessor :id
16
+
17
+ # TODO: Write general description for this method
18
+ # @return [Integer]
19
+ attr_accessor :pet_id
20
+
21
+ # TODO: Write general description for this method
22
+ # @return [Integer]
23
+ attr_accessor :quantity
24
+
25
+ # TODO: Write general description for this method
26
+ # @return [DateTime]
27
+ attr_accessor :ship_date
28
+
29
+ # TODO: Write general description for this method
30
+ # @return [Status1Enum]
31
+ attr_accessor :status
32
+
33
+ # TODO: Write general description for this method
34
+ # @return [TrueClass | FalseClass]
35
+ attr_accessor :complete
36
+
37
+ # A mapping from model property names to API property names.
38
+ def self.names
39
+ @_hash = {} if @_hash.nil?
40
+ @_hash['id'] = 'id'
41
+ @_hash['pet_id'] = 'petId'
42
+ @_hash['quantity'] = 'quantity'
43
+ @_hash['ship_date'] = 'shipDate'
44
+ @_hash['status'] = 'status'
45
+ @_hash['complete'] = 'complete'
46
+ @_hash
47
+ end
48
+
49
+ # An array for optional fields
50
+ def self.optionals
51
+ %w[
52
+ id
53
+ pet_id
54
+ quantity
55
+ ship_date
56
+ status
57
+ complete
58
+ ]
59
+ end
60
+
61
+ # An array for nullable fields
62
+ def self.nullables
63
+ []
64
+ end
65
+
66
+ def initialize(id = SKIP, pet_id = SKIP, quantity = SKIP, ship_date = SKIP,
67
+ status = SKIP, complete = SKIP)
68
+ @id = id unless id == SKIP
69
+ @pet_id = pet_id unless pet_id == SKIP
70
+ @quantity = quantity unless quantity == SKIP
71
+ @ship_date = ship_date unless ship_date == SKIP
72
+ @status = status unless status == SKIP
73
+ @complete = complete unless complete == SKIP
74
+ end
75
+
76
+ # Creates an instance of the object from a hash.
77
+ def self.from_hash(hash)
78
+ return nil unless hash
79
+
80
+ # Extract variables from the hash.
81
+ id = hash.key?('id') ? hash['id'] : SKIP
82
+ pet_id = hash.key?('petId') ? hash['petId'] : SKIP
83
+ quantity = hash.key?('quantity') ? hash['quantity'] : SKIP
84
+ ship_date = if hash.key?('shipDate')
85
+ (DateTimeHelper.from_rfc3339(hash['shipDate']) if hash['shipDate'])
86
+ else
87
+ SKIP
88
+ end
89
+ status = hash.key?('status') ? hash['status'] : SKIP
90
+ complete = hash.key?('complete') ? hash['complete'] : SKIP
91
+
92
+ # Create object from extracted values.
93
+ Order.new(id,
94
+ pet_id,
95
+ quantity,
96
+ ship_date,
97
+ status,
98
+ complete)
99
+ end
100
+
101
+ def to_custom_ship_date
102
+ DateTimeHelper.to_rfc3339(ship_date)
103
+ end
104
+
105
+ # Provides a human-readable string representation of the object.
106
+ def to_s
107
+ class_name = self.class.name.split('::').last
108
+ "<#{class_name} id: #{@id}, pet_id: #{@pet_id}, quantity: #{@quantity}, ship_date:"\
109
+ " #{@ship_date}, status: #{@status}, complete: #{@complete}>"
110
+ end
111
+
112
+ # Provides a debugging-friendly string with detailed object information.
113
+ def inspect
114
+ class_name = self.class.name.split('::').last
115
+ "<#{class_name} id: #{@id.inspect}, pet_id: #{@pet_id.inspect}, quantity:"\
116
+ " #{@quantity.inspect}, ship_date: #{@ship_date.inspect}, status: #{@status.inspect},"\
117
+ " complete: #{@complete.inspect}>"
118
+ end
119
+ end
120
+ end
@@ -0,0 +1,117 @@
1
+ # swagger_petstore
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0
4
+ # ( https://www.apimatic.io ).
5
+
6
+ module SwaggerPetstore
7
+ # Pet Model.
8
+ class Pet < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Integer]
14
+ attr_accessor :id
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Category2]
18
+ attr_accessor :category
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :name
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [Array[String]]
26
+ attr_accessor :photo_urls
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [Array[Tag]]
30
+ attr_accessor :tags
31
+
32
+ # TODO: Write general description for this method
33
+ # @return [StatusEnum]
34
+ attr_accessor :status
35
+
36
+ # A mapping from model property names to API property names.
37
+ def self.names
38
+ @_hash = {} if @_hash.nil?
39
+ @_hash['id'] = 'id'
40
+ @_hash['category'] = 'category'
41
+ @_hash['name'] = 'name'
42
+ @_hash['photo_urls'] = 'photoUrls'
43
+ @_hash['tags'] = 'tags'
44
+ @_hash['status'] = 'status'
45
+ @_hash
46
+ end
47
+
48
+ # An array for optional fields
49
+ def self.optionals
50
+ %w[
51
+ id
52
+ category
53
+ tags
54
+ status
55
+ ]
56
+ end
57
+
58
+ # An array for nullable fields
59
+ def self.nullables
60
+ []
61
+ end
62
+
63
+ def initialize(name = nil, photo_urls = nil, id = SKIP, category = SKIP,
64
+ tags = SKIP, status = SKIP)
65
+ @id = id unless id == SKIP
66
+ @category = category unless category == SKIP
67
+ @name = name
68
+ @photo_urls = photo_urls
69
+ @tags = tags unless tags == SKIP
70
+ @status = status unless status == SKIP
71
+ end
72
+
73
+ # Creates an instance of the object from a hash.
74
+ def self.from_hash(hash)
75
+ return nil unless hash
76
+
77
+ # Extract variables from the hash.
78
+ name = hash.key?('name') ? hash['name'] : nil
79
+ photo_urls = hash.key?('photoUrls') ? hash['photoUrls'] : nil
80
+ id = hash.key?('id') ? hash['id'] : SKIP
81
+ category = Category2.from_hash(hash['category']) if hash['category']
82
+ # Parameter is an array, so we need to iterate through it
83
+ tags = nil
84
+ unless hash['tags'].nil?
85
+ tags = []
86
+ hash['tags'].each do |structure|
87
+ tags << (Tag.from_hash(structure) if structure)
88
+ end
89
+ end
90
+
91
+ tags = SKIP unless hash.key?('tags')
92
+ status = hash.key?('status') ? hash['status'] : SKIP
93
+
94
+ # Create object from extracted values.
95
+ Pet.new(name,
96
+ photo_urls,
97
+ id,
98
+ category,
99
+ tags,
100
+ status)
101
+ end
102
+
103
+ # Provides a human-readable string representation of the object.
104
+ def to_s
105
+ class_name = self.class.name.split('::').last
106
+ "<#{class_name} id: #{@id}, category: #{@category}, name: #{@name}, photo_urls:"\
107
+ " #{@photo_urls}, tags: #{@tags}, status: #{@status}>"
108
+ end
109
+
110
+ # Provides a debugging-friendly string with detailed object information.
111
+ def inspect
112
+ class_name = self.class.name.split('::').last
113
+ "<#{class_name} id: #{@id.inspect}, category: #{@category.inspect}, name: #{@name.inspect},"\
114
+ " photo_urls: #{@photo_urls.inspect}, tags: #{@tags.inspect}, status: #{@status.inspect}>"
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,117 @@
1
+ # swagger_petstore
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0
4
+ # ( https://www.apimatic.io ).
5
+
6
+ module SwaggerPetstore
7
+ # PetRequest Model.
8
+ class PetRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Integer]
14
+ attr_accessor :id
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Category2]
18
+ attr_accessor :category
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :name
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [Array[String]]
26
+ attr_accessor :photo_urls
27
+
28
+ # TODO: Write general description for this method
29
+ # @return [Array[Tag]]
30
+ attr_accessor :tags
31
+
32
+ # TODO: Write general description for this method
33
+ # @return [StatusEnum]
34
+ attr_accessor :status
35
+
36
+ # A mapping from model property names to API property names.
37
+ def self.names
38
+ @_hash = {} if @_hash.nil?
39
+ @_hash['id'] = 'id'
40
+ @_hash['category'] = 'category'
41
+ @_hash['name'] = 'name'
42
+ @_hash['photo_urls'] = 'photoUrls'
43
+ @_hash['tags'] = 'tags'
44
+ @_hash['status'] = 'status'
45
+ @_hash
46
+ end
47
+
48
+ # An array for optional fields
49
+ def self.optionals
50
+ %w[
51
+ id
52
+ category
53
+ tags
54
+ status
55
+ ]
56
+ end
57
+
58
+ # An array for nullable fields
59
+ def self.nullables
60
+ []
61
+ end
62
+
63
+ def initialize(name = nil, photo_urls = nil, id = SKIP, category = SKIP,
64
+ tags = SKIP, status = SKIP)
65
+ @id = id unless id == SKIP
66
+ @category = category unless category == SKIP
67
+ @name = name
68
+ @photo_urls = photo_urls
69
+ @tags = tags unless tags == SKIP
70
+ @status = status unless status == SKIP
71
+ end
72
+
73
+ # Creates an instance of the object from a hash.
74
+ def self.from_hash(hash)
75
+ return nil unless hash
76
+
77
+ # Extract variables from the hash.
78
+ name = hash.key?('name') ? hash['name'] : nil
79
+ photo_urls = hash.key?('photoUrls') ? hash['photoUrls'] : nil
80
+ id = hash.key?('id') ? hash['id'] : SKIP
81
+ category = Category2.from_hash(hash['category']) if hash['category']
82
+ # Parameter is an array, so we need to iterate through it
83
+ tags = nil
84
+ unless hash['tags'].nil?
85
+ tags = []
86
+ hash['tags'].each do |structure|
87
+ tags << (Tag.from_hash(structure) if structure)
88
+ end
89
+ end
90
+
91
+ tags = SKIP unless hash.key?('tags')
92
+ status = hash.key?('status') ? hash['status'] : SKIP
93
+
94
+ # Create object from extracted values.
95
+ PetRequest.new(name,
96
+ photo_urls,
97
+ id,
98
+ category,
99
+ tags,
100
+ status)
101
+ end
102
+
103
+ # Provides a human-readable string representation of the object.
104
+ def to_s
105
+ class_name = self.class.name.split('::').last
106
+ "<#{class_name} id: #{@id}, category: #{@category}, name: #{@name}, photo_urls:"\
107
+ " #{@photo_urls}, tags: #{@tags}, status: #{@status}>"
108
+ end
109
+
110
+ # Provides a debugging-friendly string with detailed object information.
111
+ def inspect
112
+ class_name = self.class.name.split('::').last
113
+ "<#{class_name} id: #{@id.inspect}, category: #{@category.inspect}, name: #{@name.inspect},"\
114
+ " photo_urls: #{@photo_urls.inspect}, tags: #{@tags.inspect}, status: #{@status.inspect}>"
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,40 @@
1
+ # swagger_petstore
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0
4
+ # ( https://www.apimatic.io ).
5
+
6
+ module SwaggerPetstore
7
+ # Order Status
8
+ class Status1Enum
9
+ STATUS1_ENUM = [
10
+ # TODO: Write general description for PLACED
11
+ PLACED = 'placed'.freeze,
12
+
13
+ # TODO: Write general description for APPROVED
14
+ APPROVED = 'approved'.freeze,
15
+
16
+ # TODO: Write general description for DELIVERED
17
+ DELIVERED = 'delivered'.freeze
18
+ ].freeze
19
+
20
+ def self.validate(value)
21
+ return false if value.nil?
22
+
23
+ STATUS1_ENUM.include?(value)
24
+ end
25
+
26
+ def self.from_value(value, default_value = PLACED)
27
+ return default_value if value.nil?
28
+
29
+ str = value.to_s.strip
30
+
31
+ case str.downcase
32
+ when 'placed' then PLACED
33
+ when 'approved' then APPROVED
34
+ when 'delivered' then DELIVERED
35
+ else
36
+ default_value
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
1
+ # swagger_petstore
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0
4
+ # ( https://www.apimatic.io ).
5
+
6
+ module SwaggerPetstore
7
+ # status2.
8
+ class Status2Enum
9
+ STATUS2_ENUM = [
10
+ # TODO: Write general description for AVAILABLE
11
+ AVAILABLE = 'available'.freeze,
12
+
13
+ # TODO: Write general description for PENDING
14
+ PENDING = 'pending'.freeze,
15
+
16
+ # TODO: Write general description for SOLD
17
+ SOLD = 'sold'.freeze
18
+ ].freeze
19
+
20
+ def self.validate(value)
21
+ return false if value.nil?
22
+
23
+ STATUS2_ENUM.include?(value)
24
+ end
25
+
26
+ def self.from_value(value, default_value = AVAILABLE)
27
+ return default_value if value.nil?
28
+
29
+ str = value.to_s.strip
30
+
31
+ case str.downcase
32
+ when 'available' then AVAILABLE
33
+ when 'pending' then PENDING
34
+ when 'sold' then SOLD
35
+ else
36
+ default_value
37
+ end
38
+ end
39
+ end
40
+ end
@@ -1,20 +1,20 @@
1
- # cypress_test_api
1
+ # swagger_petstore
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v3.0
4
4
  # ( https://www.apimatic.io ).
5
5
 
6
- module CypressTestApi
7
- # Status.
6
+ module SwaggerPetstore
7
+ # pet status in the store
8
8
  class StatusEnum
9
9
  STATUS_ENUM = [
10
- # TODO: Write general description for ACTIVE
11
- ACTIVE = 'active'.freeze,
12
-
13
- # TODO: Write general description for INACTIVE
14
- INACTIVE = 'inactive'.freeze,
10
+ # TODO: Write general description for AVAILABLE
11
+ AVAILABLE = 'available'.freeze,
15
12
 
16
13
  # TODO: Write general description for PENDING
17
- PENDING = 'pending'.freeze
14
+ PENDING = 'pending'.freeze,
15
+
16
+ # TODO: Write general description for SOLD
17
+ SOLD = 'sold'.freeze
18
18
  ].freeze
19
19
 
20
20
  def self.validate(value)
@@ -23,15 +23,15 @@ module CypressTestApi
23
23
  STATUS_ENUM.include?(value)
24
24
  end
25
25
 
26
- def self.from_value(value, default_value = ACTIVE)
26
+ def self.from_value(value, default_value = AVAILABLE)
27
27
  return default_value if value.nil?
28
28
 
29
29
  str = value.to_s.strip
30
30
 
31
31
  case str.downcase
32
- when 'active' then ACTIVE
33
- when 'inactive' then INACTIVE
32
+ when 'available' then AVAILABLE
34
33
  when 'pending' then PENDING
34
+ when 'sold' then SOLD
35
35
  else
36
36
  default_value
37
37
  end
@@ -0,0 +1,120 @@
1
+ # swagger_petstore
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0
4
+ # ( https://www.apimatic.io ).
5
+
6
+ require 'date'
7
+ module SwaggerPetstore
8
+ # StoreOrderRequest Model.
9
+ class StoreOrderRequest < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # TODO: Write general description for this method
14
+ # @return [Integer]
15
+ attr_accessor :id
16
+
17
+ # TODO: Write general description for this method
18
+ # @return [Integer]
19
+ attr_accessor :pet_id
20
+
21
+ # TODO: Write general description for this method
22
+ # @return [Integer]
23
+ attr_accessor :quantity
24
+
25
+ # TODO: Write general description for this method
26
+ # @return [DateTime]
27
+ attr_accessor :ship_date
28
+
29
+ # TODO: Write general description for this method
30
+ # @return [Status1Enum]
31
+ attr_accessor :status
32
+
33
+ # TODO: Write general description for this method
34
+ # @return [TrueClass | FalseClass]
35
+ attr_accessor :complete
36
+
37
+ # A mapping from model property names to API property names.
38
+ def self.names
39
+ @_hash = {} if @_hash.nil?
40
+ @_hash['id'] = 'id'
41
+ @_hash['pet_id'] = 'petId'
42
+ @_hash['quantity'] = 'quantity'
43
+ @_hash['ship_date'] = 'shipDate'
44
+ @_hash['status'] = 'status'
45
+ @_hash['complete'] = 'complete'
46
+ @_hash
47
+ end
48
+
49
+ # An array for optional fields
50
+ def self.optionals
51
+ %w[
52
+ id
53
+ pet_id
54
+ quantity
55
+ ship_date
56
+ status
57
+ complete
58
+ ]
59
+ end
60
+
61
+ # An array for nullable fields
62
+ def self.nullables
63
+ []
64
+ end
65
+
66
+ def initialize(id = SKIP, pet_id = SKIP, quantity = SKIP, ship_date = SKIP,
67
+ status = SKIP, complete = SKIP)
68
+ @id = id unless id == SKIP
69
+ @pet_id = pet_id unless pet_id == SKIP
70
+ @quantity = quantity unless quantity == SKIP
71
+ @ship_date = ship_date unless ship_date == SKIP
72
+ @status = status unless status == SKIP
73
+ @complete = complete unless complete == SKIP
74
+ end
75
+
76
+ # Creates an instance of the object from a hash.
77
+ def self.from_hash(hash)
78
+ return nil unless hash
79
+
80
+ # Extract variables from the hash.
81
+ id = hash.key?('id') ? hash['id'] : SKIP
82
+ pet_id = hash.key?('petId') ? hash['petId'] : SKIP
83
+ quantity = hash.key?('quantity') ? hash['quantity'] : SKIP
84
+ ship_date = if hash.key?('shipDate')
85
+ (DateTimeHelper.from_rfc3339(hash['shipDate']) if hash['shipDate'])
86
+ else
87
+ SKIP
88
+ end
89
+ status = hash.key?('status') ? hash['status'] : SKIP
90
+ complete = hash.key?('complete') ? hash['complete'] : SKIP
91
+
92
+ # Create object from extracted values.
93
+ StoreOrderRequest.new(id,
94
+ pet_id,
95
+ quantity,
96
+ ship_date,
97
+ status,
98
+ complete)
99
+ end
100
+
101
+ def to_custom_ship_date
102
+ DateTimeHelper.to_rfc3339(ship_date)
103
+ end
104
+
105
+ # Provides a human-readable string representation of the object.
106
+ def to_s
107
+ class_name = self.class.name.split('::').last
108
+ "<#{class_name} id: #{@id}, pet_id: #{@pet_id}, quantity: #{@quantity}, ship_date:"\
109
+ " #{@ship_date}, status: #{@status}, complete: #{@complete}>"
110
+ end
111
+
112
+ # Provides a debugging-friendly string with detailed object information.
113
+ def inspect
114
+ class_name = self.class.name.split('::').last
115
+ "<#{class_name} id: #{@id.inspect}, pet_id: #{@pet_id.inspect}, quantity:"\
116
+ " #{@quantity.inspect}, ship_date: #{@ship_date.inspect}, status: #{@status.inspect},"\
117
+ " complete: #{@complete.inspect}>"
118
+ end
119
+ end
120
+ end
@@ -1,22 +1,27 @@
1
- # cypress_test_api
1
+ # swagger_petstore
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v3.0
4
4
  # ( https://www.apimatic.io ).
5
5
 
6
- module CypressTestApi
7
- # ResponseHttp404 Model.
8
- class ResponseHttp404 < BaseModel
6
+ module SwaggerPetstore
7
+ # Tag Model.
8
+ class Tag < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
12
  # TODO: Write general description for this method
13
- # @return [String]
13
+ # @return [Integer]
14
14
  attr_accessor :id
15
15
 
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :name
19
+
16
20
  # A mapping from model property names to API property names.
17
21
  def self.names
18
22
  @_hash = {} if @_hash.nil?
19
23
  @_hash['id'] = 'id'
24
+ @_hash['name'] = 'name'
20
25
  @_hash
21
26
  end
22
27
 
@@ -24,6 +29,7 @@ module CypressTestApi
24
29
  def self.optionals
25
30
  %w[
26
31
  id
32
+ name
27
33
  ]
28
34
  end
29
35
 
@@ -32,8 +38,9 @@ module CypressTestApi
32
38
  []
33
39
  end
34
40
 
35
- def initialize(id = SKIP)
41
+ def initialize(id = SKIP, name = SKIP)
36
42
  @id = id unless id == SKIP
43
+ @name = name unless name == SKIP
37
44
  end
38
45
 
39
46
  # Creates an instance of the object from a hash.
@@ -42,21 +49,23 @@ module CypressTestApi
42
49
 
43
50
  # Extract variables from the hash.
44
51
  id = hash.key?('id') ? hash['id'] : SKIP
52
+ name = hash.key?('name') ? hash['name'] : SKIP
45
53
 
46
54
  # Create object from extracted values.
47
- ResponseHttp404.new(id)
55
+ Tag.new(id,
56
+ name)
48
57
  end
49
58
 
50
59
  # Provides a human-readable string representation of the object.
51
60
  def to_s
52
61
  class_name = self.class.name.split('::').last
53
- "<#{class_name} id: #{@id}>"
62
+ "<#{class_name} id: #{@id}, name: #{@name}>"
54
63
  end
55
64
 
56
65
  # Provides a debugging-friendly string with detailed object information.
57
66
  def inspect
58
67
  class_name = self.class.name.split('::').last
59
- "<#{class_name} id: #{@id.inspect}>"
68
+ "<#{class_name} id: #{@id.inspect}, name: #{@name.inspect}>"
60
69
  end
61
70
  end
62
71
  end