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,167 +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 ListAdImages200Response < ApiModelBase
18
- attr_accessor :ad_account_id
19
-
20
- attr_accessor :data
21
-
22
- attr_accessor :paging
23
-
24
- # Attribute mapping from ruby-style variable name to JSON key.
25
- def self.attribute_map
26
- {
27
- :'ad_account_id' => :'adAccountId',
28
- :'data' => :'data',
29
- :'paging' => :'paging'
30
- }
31
- end
32
-
33
- # Returns attribute mapping this model knows about
34
- def self.acceptable_attribute_map
35
- attribute_map
36
- end
37
-
38
- # Returns all the JSON keys this model knows about
39
- def self.acceptable_attributes
40
- acceptable_attribute_map.values
41
- end
42
-
43
- # Attribute type mapping.
44
- def self.openapi_types
45
- {
46
- :'ad_account_id' => :'String',
47
- :'data' => :'Array<Object>',
48
- :'paging' => :'QueryAdInsights200ResponsePaging'
49
- }
50
- end
51
-
52
- # List of attributes with nullable: true
53
- def self.openapi_nullable
54
- Set.new([
55
- ])
56
- end
57
-
58
- # Initializes the object
59
- # @param [Hash] attributes Model attributes in the form of hash
60
- def initialize(attributes = {})
61
- if (!attributes.is_a?(Hash))
62
- fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ListAdImages200Response` initialize method"
63
- end
64
-
65
- # check to see if the attribute exists and convert string to symbol for hash key
66
- acceptable_attribute_map = self.class.acceptable_attribute_map
67
- attributes = attributes.each_with_object({}) { |(k, v), h|
68
- if (!acceptable_attribute_map.key?(k.to_sym))
69
- fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ListAdImages200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
- end
71
- h[k.to_sym] = v
72
- }
73
-
74
- if attributes.key?(:'ad_account_id')
75
- self.ad_account_id = attributes[:'ad_account_id']
76
- end
77
-
78
- if attributes.key?(:'data')
79
- if (value = attributes[:'data']).is_a?(Array)
80
- self.data = value
81
- end
82
- end
83
-
84
- if attributes.key?(:'paging')
85
- self.paging = attributes[:'paging']
86
- end
87
- end
88
-
89
- # Show invalid properties with the reasons. Usually used together with valid?
90
- # @return Array for valid properties with the reasons
91
- def list_invalid_properties
92
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
- invalid_properties = Array.new
94
- invalid_properties
95
- end
96
-
97
- # Check to see if the all the properties in the model are valid
98
- # @return true if the model is valid
99
- def valid?
100
- warn '[DEPRECATED] the `valid?` method is obsolete'
101
- true
102
- end
103
-
104
- # Checks equality by comparing each attribute.
105
- # @param [Object] Object to be compared
106
- def ==(o)
107
- return true if self.equal?(o)
108
- self.class == o.class &&
109
- ad_account_id == o.ad_account_id &&
110
- data == o.data &&
111
- paging == o.paging
112
- end
113
-
114
- # @see the `==` method
115
- # @param [Object] Object to be compared
116
- def eql?(o)
117
- self == o
118
- end
119
-
120
- # Calculates hash code according to all attributes.
121
- # @return [Integer] Hash code
122
- def hash
123
- [ad_account_id, data, paging].hash
124
- end
125
-
126
- # Builds the object from hash
127
- # @param [Hash] attributes Model attributes in the form of hash
128
- # @return [Object] Returns the model itself
129
- def self.build_from_hash(attributes)
130
- return nil unless attributes.is_a?(Hash)
131
- attributes = attributes.transform_keys(&:to_sym)
132
- transformed_hash = {}
133
- openapi_types.each_pair do |key, type|
134
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
- transformed_hash["#{key}"] = nil
136
- elsif type =~ /\AArray<(.*)>/i
137
- # check to ensure the input is an array given that the attribute
138
- # is documented as an array but the input is not
139
- if attributes[attribute_map[key]].is_a?(Array)
140
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
141
- end
142
- elsif !attributes[attribute_map[key]].nil?
143
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
144
- end
145
- end
146
- new(transformed_hash)
147
- end
148
-
149
- # Returns the object in the form of hash
150
- # @return [Hash] Returns the object in the form of hash
151
- def to_hash
152
- hash = {}
153
- self.class.attribute_map.each_pair do |attr, param|
154
- value = self.send(attr)
155
- if value.nil?
156
- is_nullable = self.class.openapi_nullable.include?(attr)
157
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
158
- end
159
-
160
- hash[param] = _to_hash(value)
161
- end
162
- hash
163
- end
164
-
165
- end
166
-
167
- end
@@ -1,167 +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 ListAdLabels200Response < ApiModelBase
18
- attr_accessor :ad_account_id
19
-
20
- attr_accessor :data
21
-
22
- attr_accessor :paging
23
-
24
- # Attribute mapping from ruby-style variable name to JSON key.
25
- def self.attribute_map
26
- {
27
- :'ad_account_id' => :'adAccountId',
28
- :'data' => :'data',
29
- :'paging' => :'paging'
30
- }
31
- end
32
-
33
- # Returns attribute mapping this model knows about
34
- def self.acceptable_attribute_map
35
- attribute_map
36
- end
37
-
38
- # Returns all the JSON keys this model knows about
39
- def self.acceptable_attributes
40
- acceptable_attribute_map.values
41
- end
42
-
43
- # Attribute type mapping.
44
- def self.openapi_types
45
- {
46
- :'ad_account_id' => :'String',
47
- :'data' => :'Array<Object>',
48
- :'paging' => :'QueryAdInsights200ResponsePaging'
49
- }
50
- end
51
-
52
- # List of attributes with nullable: true
53
- def self.openapi_nullable
54
- Set.new([
55
- ])
56
- end
57
-
58
- # Initializes the object
59
- # @param [Hash] attributes Model attributes in the form of hash
60
- def initialize(attributes = {})
61
- if (!attributes.is_a?(Hash))
62
- fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ListAdLabels200Response` initialize method"
63
- end
64
-
65
- # check to see if the attribute exists and convert string to symbol for hash key
66
- acceptable_attribute_map = self.class.acceptable_attribute_map
67
- attributes = attributes.each_with_object({}) { |(k, v), h|
68
- if (!acceptable_attribute_map.key?(k.to_sym))
69
- fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ListAdLabels200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
- end
71
- h[k.to_sym] = v
72
- }
73
-
74
- if attributes.key?(:'ad_account_id')
75
- self.ad_account_id = attributes[:'ad_account_id']
76
- end
77
-
78
- if attributes.key?(:'data')
79
- if (value = attributes[:'data']).is_a?(Array)
80
- self.data = value
81
- end
82
- end
83
-
84
- if attributes.key?(:'paging')
85
- self.paging = attributes[:'paging']
86
- end
87
- end
88
-
89
- # Show invalid properties with the reasons. Usually used together with valid?
90
- # @return Array for valid properties with the reasons
91
- def list_invalid_properties
92
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
- invalid_properties = Array.new
94
- invalid_properties
95
- end
96
-
97
- # Check to see if the all the properties in the model are valid
98
- # @return true if the model is valid
99
- def valid?
100
- warn '[DEPRECATED] the `valid?` method is obsolete'
101
- true
102
- end
103
-
104
- # Checks equality by comparing each attribute.
105
- # @param [Object] Object to be compared
106
- def ==(o)
107
- return true if self.equal?(o)
108
- self.class == o.class &&
109
- ad_account_id == o.ad_account_id &&
110
- data == o.data &&
111
- paging == o.paging
112
- end
113
-
114
- # @see the `==` method
115
- # @param [Object] Object to be compared
116
- def eql?(o)
117
- self == o
118
- end
119
-
120
- # Calculates hash code according to all attributes.
121
- # @return [Integer] Hash code
122
- def hash
123
- [ad_account_id, data, paging].hash
124
- end
125
-
126
- # Builds the object from hash
127
- # @param [Hash] attributes Model attributes in the form of hash
128
- # @return [Object] Returns the model itself
129
- def self.build_from_hash(attributes)
130
- return nil unless attributes.is_a?(Hash)
131
- attributes = attributes.transform_keys(&:to_sym)
132
- transformed_hash = {}
133
- openapi_types.each_pair do |key, type|
134
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
- transformed_hash["#{key}"] = nil
136
- elsif type =~ /\AArray<(.*)>/i
137
- # check to ensure the input is an array given that the attribute
138
- # is documented as an array but the input is not
139
- if attributes[attribute_map[key]].is_a?(Array)
140
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
141
- end
142
- elsif !attributes[attribute_map[key]].nil?
143
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
144
- end
145
- end
146
- new(transformed_hash)
147
- end
148
-
149
- # Returns the object in the form of hash
150
- # @return [Hash] Returns the object in the form of hash
151
- def to_hash
152
- hash = {}
153
- self.class.attribute_map.each_pair do |attr, param|
154
- value = self.send(attr)
155
- if value.nil?
156
- is_nullable = self.class.openapi_nullable.include?(attr)
157
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
158
- end
159
-
160
- hash[param] = _to_hash(value)
161
- end
162
- hash
163
- end
164
-
165
- end
166
-
167
- end
@@ -1,168 +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 ListHighDemandPeriods200Response < ApiModelBase
18
- # The campaign / ad set id the schedules belong to.
19
- attr_accessor :object_id
20
-
21
- attr_accessor :data
22
-
23
- attr_accessor :paging
24
-
25
- # Attribute mapping from ruby-style variable name to JSON key.
26
- def self.attribute_map
27
- {
28
- :'object_id' => :'objectId',
29
- :'data' => :'data',
30
- :'paging' => :'paging'
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
- :'object_id' => :'String',
48
- :'data' => :'Array<Object>',
49
- :'paging' => :'QueryAdInsights200ResponsePaging'
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::ListHighDemandPeriods200Response` 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::ListHighDemandPeriods200Response`. 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?(:'object_id')
76
- self.object_id = attributes[:'object_id']
77
- end
78
-
79
- if attributes.key?(:'data')
80
- if (value = attributes[:'data']).is_a?(Array)
81
- self.data = value
82
- end
83
- end
84
-
85
- if attributes.key?(:'paging')
86
- self.paging = attributes[:'paging']
87
- end
88
- end
89
-
90
- # Show invalid properties with the reasons. Usually used together with valid?
91
- # @return Array for valid properties with the reasons
92
- def list_invalid_properties
93
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
94
- invalid_properties = Array.new
95
- invalid_properties
96
- end
97
-
98
- # Check to see if the all the properties in the model are valid
99
- # @return true if the model is valid
100
- def valid?
101
- warn '[DEPRECATED] the `valid?` method is obsolete'
102
- true
103
- end
104
-
105
- # Checks equality by comparing each attribute.
106
- # @param [Object] Object to be compared
107
- def ==(o)
108
- return true if self.equal?(o)
109
- self.class == o.class &&
110
- object_id == o.object_id &&
111
- data == o.data &&
112
- paging == o.paging
113
- end
114
-
115
- # @see the `==` method
116
- # @param [Object] Object to be compared
117
- def eql?(o)
118
- self == o
119
- end
120
-
121
- # Calculates hash code according to all attributes.
122
- # @return [Integer] Hash code
123
- def hash
124
- [object_id, data, paging].hash
125
- end
126
-
127
- # Builds the object from hash
128
- # @param [Hash] attributes Model attributes in the form of hash
129
- # @return [Object] Returns the model itself
130
- def self.build_from_hash(attributes)
131
- return nil unless attributes.is_a?(Hash)
132
- attributes = attributes.transform_keys(&:to_sym)
133
- transformed_hash = {}
134
- openapi_types.each_pair do |key, type|
135
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
136
- transformed_hash["#{key}"] = nil
137
- elsif type =~ /\AArray<(.*)>/i
138
- # check to ensure the input is an array given that the attribute
139
- # is documented as an array but the input is not
140
- if attributes[attribute_map[key]].is_a?(Array)
141
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
142
- end
143
- elsif !attributes[attribute_map[key]].nil?
144
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
145
- end
146
- end
147
- new(transformed_hash)
148
- end
149
-
150
- # Returns the object in the form of hash
151
- # @return [Hash] Returns the object in the form of hash
152
- def to_hash
153
- hash = {}
154
- self.class.attribute_map.each_pair do |attr, param|
155
- value = self.send(attr)
156
- if value.nil?
157
- is_nullable = self.class.openapi_nullable.include?(attr)
158
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
159
- end
160
-
161
- hash[param] = _to_hash(value)
162
- end
163
- hash
164
- end
165
-
166
- end
167
-
168
- end
@@ -1,158 +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 ListSmsSenderIds200Response < ApiModelBase
18
- attr_accessor :sender_ids
19
-
20
- attr_accessor :budget
21
-
22
- # Attribute mapping from ruby-style variable name to JSON key.
23
- def self.attribute_map
24
- {
25
- :'sender_ids' => :'senderIds',
26
- :'budget' => :'budget'
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
- :'sender_ids' => :'Array<ListSmsSenderIds200ResponseSenderIdsInner>',
44
- :'budget' => :'ListSmsSenderIds200ResponseBudget'
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::ListSmsSenderIds200Response` 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::ListSmsSenderIds200Response`. 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?(:'sender_ids')
71
- if (value = attributes[:'sender_ids']).is_a?(Array)
72
- self.sender_ids = value
73
- end
74
- end
75
-
76
- if attributes.key?(:'budget')
77
- self.budget = attributes[:'budget']
78
- end
79
- end
80
-
81
- # Show invalid properties with the reasons. Usually used together with valid?
82
- # @return Array for valid properties with the reasons
83
- def list_invalid_properties
84
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
- invalid_properties = Array.new
86
- invalid_properties
87
- end
88
-
89
- # Check to see if the all the properties in the model are valid
90
- # @return true if the model is valid
91
- def valid?
92
- warn '[DEPRECATED] the `valid?` method is obsolete'
93
- true
94
- end
95
-
96
- # Checks equality by comparing each attribute.
97
- # @param [Object] Object to be compared
98
- def ==(o)
99
- return true if self.equal?(o)
100
- self.class == o.class &&
101
- sender_ids == o.sender_ids &&
102
- budget == o.budget
103
- end
104
-
105
- # @see the `==` method
106
- # @param [Object] Object to be compared
107
- def eql?(o)
108
- self == o
109
- end
110
-
111
- # Calculates hash code according to all attributes.
112
- # @return [Integer] Hash code
113
- def hash
114
- [sender_ids, budget].hash
115
- end
116
-
117
- # Builds the object from hash
118
- # @param [Hash] attributes Model attributes in the form of hash
119
- # @return [Object] Returns the model itself
120
- def self.build_from_hash(attributes)
121
- return nil unless attributes.is_a?(Hash)
122
- attributes = attributes.transform_keys(&:to_sym)
123
- transformed_hash = {}
124
- openapi_types.each_pair do |key, type|
125
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
- transformed_hash["#{key}"] = nil
127
- elsif type =~ /\AArray<(.*)>/i
128
- # check to ensure the input is an array given that the attribute
129
- # is documented as an array but the input is not
130
- if attributes[attribute_map[key]].is_a?(Array)
131
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
- end
133
- elsif !attributes[attribute_map[key]].nil?
134
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
- end
136
- end
137
- new(transformed_hash)
138
- end
139
-
140
- # Returns the object in the form of hash
141
- # @return [Hash] Returns 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
- if value.nil?
147
- is_nullable = self.class.openapi_nullable.include?(attr)
148
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
- end
150
-
151
- hash[param] = _to_hash(value)
152
- end
153
- hash
154
- end
155
-
156
- end
157
-
158
- end