late-sdk 0.0.539 → 0.0.541

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 (111) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -42
  3. data/docs/AdAudiencesApi.md +5 -5
  4. data/docs/AdCampaignsApi.md +0 -142
  5. data/docs/AdsApi.md +18 -700
  6. data/docs/InboxApi.md +79 -0
  7. data/docs/InboxWebhookMessageAttachmentsInner.md +1 -1
  8. data/docs/SMSApi.md +1 -276
  9. data/docs/SendSmsRequest.md +1 -1
  10. data/docs/WebhookPayloadMessageMessage.md +1 -1
  11. data/docs/WebhookPayloadMessageMessageAttachmentsInner.md +22 -0
  12. data/docs/WebhookPayloadMessageSentMessage.md +1 -1
  13. data/docs/WebhookPayloadMessageSentMessageAttachmentsInner.md +22 -0
  14. data/lib/zernio-sdk/api/ad_audiences_api.rb +4 -4
  15. data/lib/zernio-sdk/api/ad_campaigns_api.rb +0 -142
  16. data/lib/zernio-sdk/api/ads_api.rb +39 -739
  17. data/lib/zernio-sdk/api/inbox_api.rb +92 -0
  18. data/lib/zernio-sdk/api/sms_api.rb +2 -256
  19. data/lib/zernio-sdk/models/inbox_webhook_message_attachments_inner.rb +1 -1
  20. data/lib/zernio-sdk/models/send_sms_request.rb +1 -1
  21. data/lib/zernio-sdk/models/webhook_payload_message_message.rb +1 -1
  22. data/lib/zernio-sdk/models/{create_sms_sender_id_request.rb → webhook_payload_message_message_attachments_inner.rb} +52 -33
  23. data/lib/zernio-sdk/models/webhook_payload_message_sent_message.rb +1 -1
  24. data/lib/zernio-sdk/models/{update_ad_creative_request.rb → webhook_payload_message_sent_message_attachments_inner.rb} +46 -44
  25. data/lib/zernio-sdk/version.rb +1 -1
  26. data/lib/zernio-sdk.rb +3 -26
  27. data/openapi.yaml +87 -624
  28. data/spec/api/ad_audiences_api_spec.rb +2 -2
  29. data/spec/api/ad_campaigns_api_spec.rb +0 -25
  30. data/spec/api/ads_api_spec.rb +0 -128
  31. data/spec/api/inbox_api_spec.rb +48 -0
  32. data/spec/api/sms_api_spec.rb +1 -47
  33. data/spec/models/{list_ad_images200_response_spec.rb → webhook_payload_message_message_attachments_inner_spec.rb} +9 -9
  34. data/spec/models/{list_ad_creatives200_response_spec.rb → webhook_payload_message_sent_message_attachments_inner_spec.rb} +9 -9
  35. data/zernio-sdk-0.0.541.gem +0 -0
  36. metadata +14 -106
  37. data/docs/CreateAdCampaign201Response.md +0 -24
  38. data/docs/CreateAdCampaignRequest.md +0 -32
  39. data/docs/CreateAdCreative201Response.md +0 -20
  40. data/docs/CreateAdCreativeRequest.md +0 -38
  41. data/docs/CreateAdCreativeRequestCarouselCardsInner.md +0 -26
  42. data/docs/CreateSmsSenderId200Response.md +0 -22
  43. data/docs/CreateSmsSenderIdRequest.md +0 -18
  44. data/docs/DeleteAdCreative200Response.md +0 -20
  45. data/docs/DeleteSmsSenderId200Response.md +0 -18
  46. data/docs/DuplicateAd200Response.md +0 -22
  47. data/docs/DuplicateAdRequest.md +0 -28
  48. data/docs/DuplicateAdSet200Response.md +0 -22
  49. data/docs/DuplicateAdSetRequest.md +0 -36
  50. data/docs/GetAdCreative200Response.md +0 -18
  51. data/docs/ListAdCreatives200Response.md +0 -22
  52. data/docs/ListAdImages200Response.md +0 -22
  53. data/docs/ListAdLabels200Response.md +0 -22
  54. data/docs/ListHighDemandPeriods200Response.md +0 -22
  55. data/docs/ListSmsSenderIds200Response.md +0 -20
  56. data/docs/ListSmsSenderIds200ResponseBudget.md +0 -24
  57. data/docs/ListSmsSenderIds200ResponseBudgetPendingRequest.md +0 -22
  58. data/docs/ListSmsSenderIds200ResponseSenderIdsInner.md +0 -24
  59. data/docs/RequestSmsSenderIdLimitIncrease200Response.md +0 -20
  60. data/docs/RequestSmsSenderIdLimitIncreaseRequest.md +0 -20
  61. data/docs/UpdateAdCreative200Response.md +0 -22
  62. data/docs/UpdateAdCreativeRequest.md +0 -20
  63. data/lib/zernio-sdk/models/create_ad_campaign201_response.rb +0 -210
  64. data/lib/zernio-sdk/models/create_ad_campaign_request.rb +0 -343
  65. data/lib/zernio-sdk/models/create_ad_creative201_response.rb +0 -157
  66. data/lib/zernio-sdk/models/create_ad_creative_request.rb +0 -390
  67. data/lib/zernio-sdk/models/create_ad_creative_request_carousel_cards_inner.rb +0 -255
  68. data/lib/zernio-sdk/models/create_sms_sender_id200_response.rb +0 -166
  69. data/lib/zernio-sdk/models/delete_ad_creative200_response.rb +0 -156
  70. data/lib/zernio-sdk/models/delete_sms_sender_id200_response.rb +0 -147
  71. data/lib/zernio-sdk/models/duplicate_ad200_response.rb +0 -200
  72. data/lib/zernio-sdk/models/duplicate_ad_request.rb +0 -243
  73. data/lib/zernio-sdk/models/duplicate_ad_set200_response.rb +0 -201
  74. data/lib/zernio-sdk/models/duplicate_ad_set_request.rb +0 -302
  75. data/lib/zernio-sdk/models/get_ad_creative200_response.rb +0 -148
  76. data/lib/zernio-sdk/models/list_ad_creatives200_response.rb +0 -167
  77. data/lib/zernio-sdk/models/list_ad_images200_response.rb +0 -167
  78. data/lib/zernio-sdk/models/list_ad_labels200_response.rb +0 -167
  79. data/lib/zernio-sdk/models/list_high_demand_periods200_response.rb +0 -168
  80. data/lib/zernio-sdk/models/list_sms_sender_ids200_response.rb +0 -158
  81. data/lib/zernio-sdk/models/list_sms_sender_ids200_response_budget.rb +0 -178
  82. data/lib/zernio-sdk/models/list_sms_sender_ids200_response_budget_pending_request.rb +0 -167
  83. data/lib/zernio-sdk/models/list_sms_sender_ids200_response_sender_ids_inner.rb +0 -175
  84. data/lib/zernio-sdk/models/request_sms_sender_id_limit_increase200_response.rb +0 -156
  85. data/lib/zernio-sdk/models/request_sms_sender_id_limit_increase_request.rb +0 -210
  86. data/lib/zernio-sdk/models/update_ad_creative200_response.rb +0 -165
  87. data/spec/models/create_ad_campaign201_response_spec.rb +0 -58
  88. data/spec/models/create_ad_campaign_request_spec.rb +0 -94
  89. data/spec/models/create_ad_creative201_response_spec.rb +0 -42
  90. data/spec/models/create_ad_creative_request_carousel_cards_inner_spec.rb +0 -60
  91. data/spec/models/create_ad_creative_request_spec.rb +0 -96
  92. data/spec/models/create_sms_sender_id200_response_spec.rb +0 -48
  93. data/spec/models/create_sms_sender_id_request_spec.rb +0 -36
  94. data/spec/models/delete_ad_creative200_response_spec.rb +0 -42
  95. data/spec/models/delete_sms_sender_id200_response_spec.rb +0 -36
  96. data/spec/models/duplicate_ad200_response_spec.rb +0 -52
  97. data/spec/models/duplicate_ad_request_spec.rb +0 -74
  98. data/spec/models/duplicate_ad_set200_response_spec.rb +0 -52
  99. data/spec/models/duplicate_ad_set_request_spec.rb +0 -102
  100. data/spec/models/get_ad_creative200_response_spec.rb +0 -36
  101. data/spec/models/list_ad_labels200_response_spec.rb +0 -48
  102. data/spec/models/list_high_demand_periods200_response_spec.rb +0 -48
  103. data/spec/models/list_sms_sender_ids200_response_budget_pending_request_spec.rb +0 -48
  104. data/spec/models/list_sms_sender_ids200_response_budget_spec.rb +0 -54
  105. data/spec/models/list_sms_sender_ids200_response_sender_ids_inner_spec.rb +0 -54
  106. data/spec/models/list_sms_sender_ids200_response_spec.rb +0 -42
  107. data/spec/models/request_sms_sender_id_limit_increase200_response_spec.rb +0 -42
  108. data/spec/models/request_sms_sender_id_limit_increase_request_spec.rb +0 -42
  109. data/spec/models/update_ad_creative200_response_spec.rb +0 -48
  110. data/spec/models/update_ad_creative_request_spec.rb +0 -42
  111. data/zernio-sdk-0.0.539.gem +0 -0
@@ -1,166 +0,0 @@
1
- =begin
2
- #Zernio API
3
-
4
- #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
-
6
- The version of the OpenAPI document: 1.0.4
7
- Contact: support@zernio.com
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.19.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module Zernio
17
- class CreateSmsSenderId200Response < ApiModelBase
18
- # Sender ID resource id.
19
- attr_accessor :id
20
-
21
- attr_accessor :sender_id
22
-
23
- attr_accessor :is_active
24
-
25
- # Attribute mapping from ruby-style variable name to JSON key.
26
- def self.attribute_map
27
- {
28
- :'id' => :'id',
29
- :'sender_id' => :'senderId',
30
- :'is_active' => :'isActive'
31
- }
32
- end
33
-
34
- # Returns attribute mapping this model knows about
35
- def self.acceptable_attribute_map
36
- attribute_map
37
- end
38
-
39
- # Returns all the JSON keys this model knows about
40
- def self.acceptable_attributes
41
- acceptable_attribute_map.values
42
- end
43
-
44
- # Attribute type mapping.
45
- def self.openapi_types
46
- {
47
- :'id' => :'String',
48
- :'sender_id' => :'String',
49
- :'is_active' => :'Boolean'
50
- }
51
- end
52
-
53
- # List of attributes with nullable: true
54
- def self.openapi_nullable
55
- Set.new([
56
- ])
57
- end
58
-
59
- # Initializes the object
60
- # @param [Hash] attributes Model attributes in the form of hash
61
- def initialize(attributes = {})
62
- if (!attributes.is_a?(Hash))
63
- fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CreateSmsSenderId200Response` initialize method"
64
- end
65
-
66
- # check to see if the attribute exists and convert string to symbol for hash key
67
- acceptable_attribute_map = self.class.acceptable_attribute_map
68
- attributes = attributes.each_with_object({}) { |(k, v), h|
69
- if (!acceptable_attribute_map.key?(k.to_sym))
70
- fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CreateSmsSenderId200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
- end
72
- h[k.to_sym] = v
73
- }
74
-
75
- if attributes.key?(:'id')
76
- self.id = attributes[:'id']
77
- end
78
-
79
- if attributes.key?(:'sender_id')
80
- self.sender_id = attributes[:'sender_id']
81
- end
82
-
83
- if attributes.key?(:'is_active')
84
- self.is_active = attributes[:'is_active']
85
- end
86
- end
87
-
88
- # Show invalid properties with the reasons. Usually used together with valid?
89
- # @return Array for valid properties with the reasons
90
- def list_invalid_properties
91
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
92
- invalid_properties = Array.new
93
- invalid_properties
94
- end
95
-
96
- # Check to see if the all the properties in the model are valid
97
- # @return true if the model is valid
98
- def valid?
99
- warn '[DEPRECATED] the `valid?` method is obsolete'
100
- true
101
- end
102
-
103
- # Checks equality by comparing each attribute.
104
- # @param [Object] Object to be compared
105
- def ==(o)
106
- return true if self.equal?(o)
107
- self.class == o.class &&
108
- id == o.id &&
109
- sender_id == o.sender_id &&
110
- is_active == o.is_active
111
- end
112
-
113
- # @see the `==` method
114
- # @param [Object] Object to be compared
115
- def eql?(o)
116
- self == o
117
- end
118
-
119
- # Calculates hash code according to all attributes.
120
- # @return [Integer] Hash code
121
- def hash
122
- [id, sender_id, is_active].hash
123
- end
124
-
125
- # Builds the object from hash
126
- # @param [Hash] attributes Model attributes in the form of hash
127
- # @return [Object] Returns the model itself
128
- def self.build_from_hash(attributes)
129
- return nil unless attributes.is_a?(Hash)
130
- attributes = attributes.transform_keys(&:to_sym)
131
- transformed_hash = {}
132
- openapi_types.each_pair do |key, type|
133
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
- transformed_hash["#{key}"] = nil
135
- elsif type =~ /\AArray<(.*)>/i
136
- # check to ensure the input is an array given that the attribute
137
- # is documented as an array but the input is not
138
- if attributes[attribute_map[key]].is_a?(Array)
139
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
- end
141
- elsif !attributes[attribute_map[key]].nil?
142
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
- end
144
- end
145
- new(transformed_hash)
146
- end
147
-
148
- # Returns the object in the form of hash
149
- # @return [Hash] Returns the object in the form of hash
150
- def to_hash
151
- hash = {}
152
- self.class.attribute_map.each_pair do |attr, param|
153
- value = self.send(attr)
154
- if value.nil?
155
- is_nullable = self.class.openapi_nullable.include?(attr)
156
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
157
- end
158
-
159
- hash[param] = _to_hash(value)
160
- end
161
- hash
162
- end
163
-
164
- end
165
-
166
- end
@@ -1,156 +0,0 @@
1
- =begin
2
- #Zernio API
3
-
4
- #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
-
6
- The version of the OpenAPI document: 1.0.4
7
- Contact: support@zernio.com
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.19.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module Zernio
17
- class DeleteAdCreative200Response < ApiModelBase
18
- attr_accessor :creative_id
19
-
20
- attr_accessor :message
21
-
22
- # Attribute mapping from ruby-style variable name to JSON key.
23
- def self.attribute_map
24
- {
25
- :'creative_id' => :'creativeId',
26
- :'message' => :'message'
27
- }
28
- end
29
-
30
- # Returns attribute mapping this model knows about
31
- def self.acceptable_attribute_map
32
- attribute_map
33
- end
34
-
35
- # Returns all the JSON keys this model knows about
36
- def self.acceptable_attributes
37
- acceptable_attribute_map.values
38
- end
39
-
40
- # Attribute type mapping.
41
- def self.openapi_types
42
- {
43
- :'creative_id' => :'String',
44
- :'message' => :'String'
45
- }
46
- end
47
-
48
- # List of attributes with nullable: true
49
- def self.openapi_nullable
50
- Set.new([
51
- ])
52
- end
53
-
54
- # Initializes the object
55
- # @param [Hash] attributes Model attributes in the form of hash
56
- def initialize(attributes = {})
57
- if (!attributes.is_a?(Hash))
58
- fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::DeleteAdCreative200Response` initialize method"
59
- end
60
-
61
- # check to see if the attribute exists and convert string to symbol for hash key
62
- acceptable_attribute_map = self.class.acceptable_attribute_map
63
- attributes = attributes.each_with_object({}) { |(k, v), h|
64
- if (!acceptable_attribute_map.key?(k.to_sym))
65
- fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::DeleteAdCreative200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
- end
67
- h[k.to_sym] = v
68
- }
69
-
70
- if attributes.key?(:'creative_id')
71
- self.creative_id = attributes[:'creative_id']
72
- end
73
-
74
- if attributes.key?(:'message')
75
- self.message = attributes[:'message']
76
- end
77
- end
78
-
79
- # Show invalid properties with the reasons. Usually used together with valid?
80
- # @return Array for valid properties with the reasons
81
- def list_invalid_properties
82
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
- invalid_properties = Array.new
84
- invalid_properties
85
- end
86
-
87
- # Check to see if the all the properties in the model are valid
88
- # @return true if the model is valid
89
- def valid?
90
- warn '[DEPRECATED] the `valid?` method is obsolete'
91
- true
92
- end
93
-
94
- # Checks equality by comparing each attribute.
95
- # @param [Object] Object to be compared
96
- def ==(o)
97
- return true if self.equal?(o)
98
- self.class == o.class &&
99
- creative_id == o.creative_id &&
100
- message == o.message
101
- end
102
-
103
- # @see the `==` method
104
- # @param [Object] Object to be compared
105
- def eql?(o)
106
- self == o
107
- end
108
-
109
- # Calculates hash code according to all attributes.
110
- # @return [Integer] Hash code
111
- def hash
112
- [creative_id, message].hash
113
- end
114
-
115
- # Builds the object from hash
116
- # @param [Hash] attributes Model attributes in the form of hash
117
- # @return [Object] Returns the model itself
118
- def self.build_from_hash(attributes)
119
- return nil unless attributes.is_a?(Hash)
120
- attributes = attributes.transform_keys(&:to_sym)
121
- transformed_hash = {}
122
- openapi_types.each_pair do |key, type|
123
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
124
- transformed_hash["#{key}"] = nil
125
- elsif type =~ /\AArray<(.*)>/i
126
- # check to ensure the input is an array given that the attribute
127
- # is documented as an array but the input is not
128
- if attributes[attribute_map[key]].is_a?(Array)
129
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
130
- end
131
- elsif !attributes[attribute_map[key]].nil?
132
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
133
- end
134
- end
135
- new(transformed_hash)
136
- end
137
-
138
- # Returns the object in the form of hash
139
- # @return [Hash] Returns the object in the form of hash
140
- def to_hash
141
- hash = {}
142
- self.class.attribute_map.each_pair do |attr, param|
143
- value = self.send(attr)
144
- if value.nil?
145
- is_nullable = self.class.openapi_nullable.include?(attr)
146
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
147
- end
148
-
149
- hash[param] = _to_hash(value)
150
- end
151
- hash
152
- end
153
-
154
- end
155
-
156
- end
@@ -1,147 +0,0 @@
1
- =begin
2
- #Zernio API
3
-
4
- #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
-
6
- The version of the OpenAPI document: 1.0.4
7
- Contact: support@zernio.com
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.19.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module Zernio
17
- class DeleteSmsSenderId200Response < ApiModelBase
18
- attr_accessor :deleted
19
-
20
- # Attribute mapping from ruby-style variable name to JSON key.
21
- def self.attribute_map
22
- {
23
- :'deleted' => :'deleted'
24
- }
25
- end
26
-
27
- # Returns attribute mapping this model knows about
28
- def self.acceptable_attribute_map
29
- attribute_map
30
- end
31
-
32
- # Returns all the JSON keys this model knows about
33
- def self.acceptable_attributes
34
- acceptable_attribute_map.values
35
- end
36
-
37
- # Attribute type mapping.
38
- def self.openapi_types
39
- {
40
- :'deleted' => :'Boolean'
41
- }
42
- end
43
-
44
- # List of attributes with nullable: true
45
- def self.openapi_nullable
46
- Set.new([
47
- ])
48
- end
49
-
50
- # Initializes the object
51
- # @param [Hash] attributes Model attributes in the form of hash
52
- def initialize(attributes = {})
53
- if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::DeleteSmsSenderId200Response` initialize method"
55
- end
56
-
57
- # check to see if the attribute exists and convert string to symbol for hash key
58
- acceptable_attribute_map = self.class.acceptable_attribute_map
59
- attributes = attributes.each_with_object({}) { |(k, v), h|
60
- if (!acceptable_attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::DeleteSmsSenderId200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
- end
63
- h[k.to_sym] = v
64
- }
65
-
66
- if attributes.key?(:'deleted')
67
- self.deleted = attributes[:'deleted']
68
- end
69
- end
70
-
71
- # Show invalid properties with the reasons. Usually used together with valid?
72
- # @return Array for valid properties with the reasons
73
- def list_invalid_properties
74
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
75
- invalid_properties = Array.new
76
- invalid_properties
77
- end
78
-
79
- # Check to see if the all the properties in the model are valid
80
- # @return true if the model is valid
81
- def valid?
82
- warn '[DEPRECATED] the `valid?` method is obsolete'
83
- true
84
- end
85
-
86
- # Checks equality by comparing each attribute.
87
- # @param [Object] Object to be compared
88
- def ==(o)
89
- return true if self.equal?(o)
90
- self.class == o.class &&
91
- deleted == o.deleted
92
- end
93
-
94
- # @see the `==` method
95
- # @param [Object] Object to be compared
96
- def eql?(o)
97
- self == o
98
- end
99
-
100
- # Calculates hash code according to all attributes.
101
- # @return [Integer] Hash code
102
- def hash
103
- [deleted].hash
104
- end
105
-
106
- # Builds the object from hash
107
- # @param [Hash] attributes Model attributes in the form of hash
108
- # @return [Object] Returns the model itself
109
- def self.build_from_hash(attributes)
110
- return nil unless attributes.is_a?(Hash)
111
- attributes = attributes.transform_keys(&:to_sym)
112
- transformed_hash = {}
113
- openapi_types.each_pair do |key, type|
114
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
115
- transformed_hash["#{key}"] = nil
116
- elsif type =~ /\AArray<(.*)>/i
117
- # check to ensure the input is an array given that the attribute
118
- # is documented as an array but the input is not
119
- if attributes[attribute_map[key]].is_a?(Array)
120
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
121
- end
122
- elsif !attributes[attribute_map[key]].nil?
123
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
124
- end
125
- end
126
- new(transformed_hash)
127
- end
128
-
129
- # Returns the object in the form of hash
130
- # @return [Hash] Returns the object in the form of hash
131
- def to_hash
132
- hash = {}
133
- self.class.attribute_map.each_pair do |attr, param|
134
- value = self.send(attr)
135
- if value.nil?
136
- is_nullable = self.class.openapi_nullable.include?(attr)
137
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
138
- end
139
-
140
- hash[param] = _to_hash(value)
141
- end
142
- hash
143
- end
144
-
145
- end
146
-
147
- end
@@ -1,200 +0,0 @@
1
- =begin
2
- #Zernio API
3
-
4
- #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
-
6
- The version of the OpenAPI document: 1.0.4
7
- Contact: support@zernio.com
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.19.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module Zernio
17
- class DuplicateAd200Response < ApiModelBase
18
- # Platform ID of the new ad
19
- attr_accessor :copied_ad_id
20
-
21
- attr_accessor :discovery
22
-
23
- attr_accessor :raw
24
-
25
- class EnumAttributeValidator
26
- attr_reader :datatype
27
- attr_reader :allowable_values
28
-
29
- def initialize(datatype, allowable_values)
30
- @allowable_values = allowable_values.map do |value|
31
- case datatype.to_s
32
- when /Integer/i
33
- value.to_i
34
- when /Float/i
35
- value.to_f
36
- else
37
- value
38
- end
39
- end
40
- end
41
-
42
- def valid?(value)
43
- !value || allowable_values.include?(value)
44
- end
45
- end
46
-
47
- # Attribute mapping from ruby-style variable name to JSON key.
48
- def self.attribute_map
49
- {
50
- :'copied_ad_id' => :'copiedAdId',
51
- :'discovery' => :'discovery',
52
- :'raw' => :'raw'
53
- }
54
- end
55
-
56
- # Returns attribute mapping this model knows about
57
- def self.acceptable_attribute_map
58
- attribute_map
59
- end
60
-
61
- # Returns all the JSON keys this model knows about
62
- def self.acceptable_attributes
63
- acceptable_attribute_map.values
64
- end
65
-
66
- # Attribute type mapping.
67
- def self.openapi_types
68
- {
69
- :'copied_ad_id' => :'String',
70
- :'discovery' => :'String',
71
- :'raw' => :'Object'
72
- }
73
- end
74
-
75
- # List of attributes with nullable: true
76
- def self.openapi_nullable
77
- Set.new([
78
- ])
79
- end
80
-
81
- # Initializes the object
82
- # @param [Hash] attributes Model attributes in the form of hash
83
- def initialize(attributes = {})
84
- if (!attributes.is_a?(Hash))
85
- fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::DuplicateAd200Response` initialize method"
86
- end
87
-
88
- # check to see if the attribute exists and convert string to symbol for hash key
89
- acceptable_attribute_map = self.class.acceptable_attribute_map
90
- attributes = attributes.each_with_object({}) { |(k, v), h|
91
- if (!acceptable_attribute_map.key?(k.to_sym))
92
- fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::DuplicateAd200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
93
- end
94
- h[k.to_sym] = v
95
- }
96
-
97
- if attributes.key?(:'copied_ad_id')
98
- self.copied_ad_id = attributes[:'copied_ad_id']
99
- end
100
-
101
- if attributes.key?(:'discovery')
102
- self.discovery = attributes[:'discovery']
103
- end
104
-
105
- if attributes.key?(:'raw')
106
- self.raw = attributes[:'raw']
107
- end
108
- end
109
-
110
- # Show invalid properties with the reasons. Usually used together with valid?
111
- # @return Array for valid properties with the reasons
112
- def list_invalid_properties
113
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
114
- invalid_properties = Array.new
115
- invalid_properties
116
- end
117
-
118
- # Check to see if the all the properties in the model are valid
119
- # @return true if the model is valid
120
- def valid?
121
- warn '[DEPRECATED] the `valid?` method is obsolete'
122
- discovery_validator = EnumAttributeValidator.new('String', ["triggered", "skipped", "failed"])
123
- return false unless discovery_validator.valid?(@discovery)
124
- true
125
- end
126
-
127
- # Custom attribute writer method checking allowed values (enum).
128
- # @param [Object] discovery Object to be assigned
129
- def discovery=(discovery)
130
- validator = EnumAttributeValidator.new('String', ["triggered", "skipped", "failed"])
131
- unless validator.valid?(discovery)
132
- fail ArgumentError, "invalid value for \"discovery\", must be one of #{validator.allowable_values}."
133
- end
134
- @discovery = discovery
135
- end
136
-
137
- # Checks equality by comparing each attribute.
138
- # @param [Object] Object to be compared
139
- def ==(o)
140
- return true if self.equal?(o)
141
- self.class == o.class &&
142
- copied_ad_id == o.copied_ad_id &&
143
- discovery == o.discovery &&
144
- raw == o.raw
145
- end
146
-
147
- # @see the `==` method
148
- # @param [Object] Object to be compared
149
- def eql?(o)
150
- self == o
151
- end
152
-
153
- # Calculates hash code according to all attributes.
154
- # @return [Integer] Hash code
155
- def hash
156
- [copied_ad_id, discovery, raw].hash
157
- end
158
-
159
- # Builds the object from hash
160
- # @param [Hash] attributes Model attributes in the form of hash
161
- # @return [Object] Returns the model itself
162
- def self.build_from_hash(attributes)
163
- return nil unless attributes.is_a?(Hash)
164
- attributes = attributes.transform_keys(&:to_sym)
165
- transformed_hash = {}
166
- openapi_types.each_pair do |key, type|
167
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
168
- transformed_hash["#{key}"] = nil
169
- elsif type =~ /\AArray<(.*)>/i
170
- # check to ensure the input is an array given that the attribute
171
- # is documented as an array but the input is not
172
- if attributes[attribute_map[key]].is_a?(Array)
173
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
174
- end
175
- elsif !attributes[attribute_map[key]].nil?
176
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
177
- end
178
- end
179
- new(transformed_hash)
180
- end
181
-
182
- # Returns the object in the form of hash
183
- # @return [Hash] Returns the object in the form of hash
184
- def to_hash
185
- hash = {}
186
- self.class.attribute_map.each_pair do |attr, param|
187
- value = self.send(attr)
188
- if value.nil?
189
- is_nullable = self.class.openapi_nullable.include?(attr)
190
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
- end
192
-
193
- hash[param] = _to_hash(value)
194
- end
195
- hash
196
- end
197
-
198
- end
199
-
200
- end