late-sdk 0.0.782 → 0.0.784

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 +15 -0
  3. data/docs/CreatePhoneNumberStockWatchRequest.md +18 -0
  4. data/docs/ListPhoneNumberStockWatches200Response.md +18 -0
  5. data/docs/PhoneNumberStockWatch.md +24 -0
  6. data/docs/PhoneNumbersApi.md +203 -0
  7. data/docs/UsageApi.md +8 -2
  8. data/docs/UsageAttributionGroup.md +22 -0
  9. data/docs/UsageAttributionSlice.md +20 -0
  10. data/docs/UsageAttributionSliceByProduct.md +34 -0
  11. data/docs/UsageMetering.md +5 -1
  12. data/docs/UsageMeteringAttribution.md +26 -0
  13. data/docs/UsageMeteringScope.md +49 -0
  14. data/docs/UsageMeteringScopeOneOf.md +18 -0
  15. data/docs/WebhookEventsApi.md +69 -0
  16. data/docs/WebhookPayloadPhoneNumberStockAvailable.md +24 -0
  17. data/docs/WebhookPayloadPhoneNumberStockAvailableStock.md +20 -0
  18. data/docs/WebhookPayloadPhoneNumberStockAvailableStockTypesInner.md +20 -0
  19. data/lib/zernio-sdk/api/phone_numbers_api.rb +184 -0
  20. data/lib/zernio-sdk/api/usage_api.rb +15 -2
  21. data/lib/zernio-sdk/api/webhook_events_api.rb +66 -0
  22. data/lib/zernio-sdk/models/create_phone_number_stock_watch_request.rb +183 -0
  23. data/lib/zernio-sdk/models/list_phone_number_stock_watches200_response.rb +149 -0
  24. data/lib/zernio-sdk/models/phone_number_stock_watch.rb +243 -0
  25. data/lib/zernio-sdk/models/usage_attribution_group.rb +190 -0
  26. data/lib/zernio-sdk/models/usage_attribution_slice.rb +156 -0
  27. data/lib/zernio-sdk/models/usage_attribution_slice_by_product.rb +220 -0
  28. data/lib/zernio-sdk/models/usage_metering.rb +22 -4
  29. data/lib/zernio-sdk/models/usage_metering_attribution.rb +223 -0
  30. data/lib/zernio-sdk/models/usage_metering_call_usage.rb +1 -1
  31. data/lib/zernio-sdk/models/usage_metering_peaks.rb +1 -1
  32. data/lib/zernio-sdk/models/usage_metering_scope.rb +105 -0
  33. data/lib/zernio-sdk/models/usage_metering_scope_one_of.rb +164 -0
  34. data/lib/zernio-sdk/models/webhook_payload_phone_number_stock_available.rb +269 -0
  35. data/lib/zernio-sdk/models/webhook_payload_phone_number_stock_available_stock.rb +194 -0
  36. data/lib/zernio-sdk/models/webhook_payload_phone_number_stock_available_stock_types_inner.rb +192 -0
  37. data/lib/zernio-sdk/version.rb +1 -1
  38. data/lib/zernio-sdk.rb +12 -0
  39. data/openapi.yaml +236 -8
  40. data/spec/api/phone_numbers_api_spec.rb +33 -0
  41. data/spec/api/usage_api_spec.rb +4 -1
  42. data/spec/models/create_phone_number_stock_watch_request_spec.rb +36 -0
  43. data/spec/models/create_webhook_settings_request_spec.rb +1 -1
  44. data/spec/models/list_phone_number_stock_watches200_response_spec.rb +36 -0
  45. data/spec/models/phone_number_stock_watch_spec.rb +54 -0
  46. data/spec/models/update_webhook_settings_request_spec.rb +1 -1
  47. data/spec/models/usage_attribution_group_spec.rb +48 -0
  48. data/spec/models/usage_attribution_slice_by_product_spec.rb +84 -0
  49. data/spec/models/usage_attribution_slice_spec.rb +42 -0
  50. data/spec/models/usage_metering_attribution_spec.rb +64 -0
  51. data/spec/models/usage_metering_scope_one_of_spec.rb +36 -0
  52. data/spec/models/usage_metering_scope_spec.rb +32 -0
  53. data/spec/models/usage_metering_spec.rb +12 -0
  54. data/spec/models/webhook_payload_phone_number_stock_available_spec.rb +58 -0
  55. data/spec/models/webhook_payload_phone_number_stock_available_stock_spec.rb +42 -0
  56. data/spec/models/webhook_payload_phone_number_stock_available_stock_types_inner_spec.rb +42 -0
  57. data/spec/models/webhook_spec.rb +1 -1
  58. data/zernio-sdk-0.0.784.gem +0 -0
  59. metadata +50 -2
  60. data/zernio-sdk-0.0.782.gem +0 -0
@@ -0,0 +1,190 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
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 UsageAttributionGroup < ApiModelBase
18
+ attr_accessor :by_product
19
+
20
+ attr_accessor :total_usd
21
+
22
+ # Profile id or account id, per `groupBy`.
23
+ attr_accessor :key
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'by_product' => :'byProduct',
29
+ :'total_usd' => :'totalUsd',
30
+ :'key' => :'key'
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
+ :'by_product' => :'UsageAttributionSliceByProduct',
48
+ :'total_usd' => :'Float',
49
+ :'key' => :'String'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ def self.openapi_nullable
55
+ Set.new([
56
+ ])
57
+ end
58
+
59
+ # List of class defined in allOf (OpenAPI v3)
60
+ def self.openapi_all_of
61
+ [
62
+ :'UsageAttributionSlice'
63
+ ]
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::UsageAttributionGroup` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ acceptable_attribute_map = self.class.acceptable_attribute_map
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!acceptable_attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::UsageAttributionGroup`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'by_product')
83
+ self.by_product = attributes[:'by_product']
84
+ end
85
+
86
+ if attributes.key?(:'total_usd')
87
+ self.total_usd = attributes[:'total_usd']
88
+ end
89
+
90
+ if attributes.key?(:'key')
91
+ self.key = attributes[:'key']
92
+ else
93
+ self.key = nil
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ if @key.nil?
103
+ invalid_properties.push('invalid value for "key", key cannot be nil.')
104
+ end
105
+
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ warn '[DEPRECATED] the `valid?` method is obsolete'
113
+ return false if @key.nil?
114
+ true
115
+ end
116
+
117
+ # Custom attribute writer method with validation
118
+ # @param [Object] key Value to be assigned
119
+ def key=(key)
120
+ if key.nil?
121
+ fail ArgumentError, 'key cannot be nil'
122
+ end
123
+
124
+ @key = key
125
+ end
126
+
127
+ # Checks equality by comparing each attribute.
128
+ # @param [Object] Object to be compared
129
+ def ==(o)
130
+ return true if self.equal?(o)
131
+ self.class == o.class &&
132
+ by_product == o.by_product &&
133
+ total_usd == o.total_usd &&
134
+ key == o.key
135
+ end
136
+
137
+ # @see the `==` method
138
+ # @param [Object] Object to be compared
139
+ def eql?(o)
140
+ self == o
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Integer] Hash code
145
+ def hash
146
+ [by_product, total_usd, key].hash
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def self.build_from_hash(attributes)
153
+ return nil unless attributes.is_a?(Hash)
154
+ attributes = attributes.transform_keys(&:to_sym)
155
+ transformed_hash = {}
156
+ openapi_types.each_pair do |key, type|
157
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
158
+ transformed_hash["#{key}"] = nil
159
+ elsif type =~ /\AArray<(.*)>/i
160
+ # check to ensure the input is an array given that the attribute
161
+ # is documented as an array but the input is not
162
+ if attributes[attribute_map[key]].is_a?(Array)
163
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
164
+ end
165
+ elsif !attributes[attribute_map[key]].nil?
166
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
167
+ end
168
+ end
169
+ new(transformed_hash)
170
+ end
171
+
172
+ # Returns the object in the form of hash
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_hash
175
+ hash = {}
176
+ self.class.attribute_map.each_pair do |attr, param|
177
+ value = self.send(attr)
178
+ if value.nil?
179
+ is_nullable = self.class.openapi_nullable.include?(attr)
180
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
181
+ end
182
+
183
+ hash[param] = _to_hash(value)
184
+ end
185
+ hash
186
+ end
187
+
188
+ end
189
+
190
+ end
@@ -0,0 +1,156 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
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 UsageAttributionSlice < ApiModelBase
18
+ attr_accessor :by_product
19
+
20
+ attr_accessor :total_usd
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'by_product' => :'byProduct',
26
+ :'total_usd' => :'totalUsd'
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
+ :'by_product' => :'UsageAttributionSliceByProduct',
44
+ :'total_usd' => :'Float'
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::UsageAttributionSlice` 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::UsageAttributionSlice`. 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?(:'by_product')
71
+ self.by_product = attributes[:'by_product']
72
+ end
73
+
74
+ if attributes.key?(:'total_usd')
75
+ self.total_usd = attributes[:'total_usd']
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
+ by_product == o.by_product &&
100
+ total_usd == o.total_usd
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
+ [by_product, total_usd].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
@@ -0,0 +1,220 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
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
+ # USD per product family.
18
+ class UsageAttributionSliceByProduct < ApiModelBase
19
+ attr_accessor :accounts
20
+
21
+ attr_accessor :numbers
22
+
23
+ attr_accessor :calls
24
+
25
+ attr_accessor :sms
26
+
27
+ attr_accessor :verify
28
+
29
+ attr_accessor :dlc
30
+
31
+ attr_accessor :x_api
32
+
33
+ attr_accessor :credits
34
+
35
+ attr_accessor :other
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'accounts' => :'accounts',
41
+ :'numbers' => :'numbers',
42
+ :'calls' => :'calls',
43
+ :'sms' => :'sms',
44
+ :'verify' => :'verify',
45
+ :'dlc' => :'dlc',
46
+ :'x_api' => :'xApi',
47
+ :'credits' => :'credits',
48
+ :'other' => :'other'
49
+ }
50
+ end
51
+
52
+ # Returns attribute mapping this model knows about
53
+ def self.acceptable_attribute_map
54
+ attribute_map
55
+ end
56
+
57
+ # Returns all the JSON keys this model knows about
58
+ def self.acceptable_attributes
59
+ acceptable_attribute_map.values
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'accounts' => :'Float',
66
+ :'numbers' => :'Float',
67
+ :'calls' => :'Float',
68
+ :'sms' => :'Float',
69
+ :'verify' => :'Float',
70
+ :'dlc' => :'Float',
71
+ :'x_api' => :'Float',
72
+ :'credits' => :'Float',
73
+ :'other' => :'Float'
74
+ }
75
+ end
76
+
77
+ # List of attributes with nullable: true
78
+ def self.openapi_nullable
79
+ Set.new([
80
+ ])
81
+ end
82
+
83
+ # Initializes the object
84
+ # @param [Hash] attributes Model attributes in the form of hash
85
+ def initialize(attributes = {})
86
+ if (!attributes.is_a?(Hash))
87
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::UsageAttributionSliceByProduct` initialize method"
88
+ end
89
+
90
+ # check to see if the attribute exists and convert string to symbol for hash key
91
+ acceptable_attribute_map = self.class.acceptable_attribute_map
92
+ attributes = attributes.each_with_object({}) { |(k, v), h|
93
+ if (!acceptable_attribute_map.key?(k.to_sym))
94
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::UsageAttributionSliceByProduct`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
95
+ end
96
+ h[k.to_sym] = v
97
+ }
98
+
99
+ if attributes.key?(:'accounts')
100
+ self.accounts = attributes[:'accounts']
101
+ end
102
+
103
+ if attributes.key?(:'numbers')
104
+ self.numbers = attributes[:'numbers']
105
+ end
106
+
107
+ if attributes.key?(:'calls')
108
+ self.calls = attributes[:'calls']
109
+ end
110
+
111
+ if attributes.key?(:'sms')
112
+ self.sms = attributes[:'sms']
113
+ end
114
+
115
+ if attributes.key?(:'verify')
116
+ self.verify = attributes[:'verify']
117
+ end
118
+
119
+ if attributes.key?(:'dlc')
120
+ self.dlc = attributes[:'dlc']
121
+ end
122
+
123
+ if attributes.key?(:'x_api')
124
+ self.x_api = attributes[:'x_api']
125
+ end
126
+
127
+ if attributes.key?(:'credits')
128
+ self.credits = attributes[:'credits']
129
+ end
130
+
131
+ if attributes.key?(:'other')
132
+ self.other = attributes[:'other']
133
+ end
134
+ end
135
+
136
+ # Show invalid properties with the reasons. Usually used together with valid?
137
+ # @return Array for valid properties with the reasons
138
+ def list_invalid_properties
139
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
140
+ invalid_properties = Array.new
141
+ invalid_properties
142
+ end
143
+
144
+ # Check to see if the all the properties in the model are valid
145
+ # @return true if the model is valid
146
+ def valid?
147
+ warn '[DEPRECATED] the `valid?` method is obsolete'
148
+ true
149
+ end
150
+
151
+ # Checks equality by comparing each attribute.
152
+ # @param [Object] Object to be compared
153
+ def ==(o)
154
+ return true if self.equal?(o)
155
+ self.class == o.class &&
156
+ accounts == o.accounts &&
157
+ numbers == o.numbers &&
158
+ calls == o.calls &&
159
+ sms == o.sms &&
160
+ verify == o.verify &&
161
+ dlc == o.dlc &&
162
+ x_api == o.x_api &&
163
+ credits == o.credits &&
164
+ other == o.other
165
+ end
166
+
167
+ # @see the `==` method
168
+ # @param [Object] Object to be compared
169
+ def eql?(o)
170
+ self == o
171
+ end
172
+
173
+ # Calculates hash code according to all attributes.
174
+ # @return [Integer] Hash code
175
+ def hash
176
+ [accounts, numbers, calls, sms, verify, dlc, x_api, credits, other].hash
177
+ end
178
+
179
+ # Builds the object from hash
180
+ # @param [Hash] attributes Model attributes in the form of hash
181
+ # @return [Object] Returns the model itself
182
+ def self.build_from_hash(attributes)
183
+ return nil unless attributes.is_a?(Hash)
184
+ attributes = attributes.transform_keys(&:to_sym)
185
+ transformed_hash = {}
186
+ openapi_types.each_pair do |key, type|
187
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
188
+ transformed_hash["#{key}"] = nil
189
+ elsif type =~ /\AArray<(.*)>/i
190
+ # check to ensure the input is an array given that the attribute
191
+ # is documented as an array but the input is not
192
+ if attributes[attribute_map[key]].is_a?(Array)
193
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
194
+ end
195
+ elsif !attributes[attribute_map[key]].nil?
196
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
197
+ end
198
+ end
199
+ new(transformed_hash)
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ if value.nil?
209
+ is_nullable = self.class.openapi_nullable.include?(attr)
210
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
+ end
212
+
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ end
219
+
220
+ end
@@ -37,6 +37,10 @@ module Zernio
37
37
 
38
38
  attr_accessor :tax
39
39
 
40
+ attr_accessor :attribution
41
+
42
+ attr_accessor :scope
43
+
40
44
  class EnumAttributeValidator
41
45
  attr_reader :datatype
42
46
  attr_reader :allowable_values
@@ -70,7 +74,9 @@ module Zernio
70
74
  :'peaks' => :'peaks',
71
75
  :'call_usage' => :'callUsage',
72
76
  :'period' => :'period',
73
- :'tax' => :'tax'
77
+ :'tax' => :'tax',
78
+ :'attribution' => :'attribution',
79
+ :'scope' => :'scope'
74
80
  }
75
81
  end
76
82
 
@@ -95,7 +101,9 @@ module Zernio
95
101
  :'peaks' => :'UsageMeteringPeaks',
96
102
  :'call_usage' => :'UsageMeteringCallUsage',
97
103
  :'period' => :'UsageMeteringPeriod',
98
- :'tax' => :'UsageMeteringTax'
104
+ :'tax' => :'UsageMeteringTax',
105
+ :'attribution' => :'UsageMeteringAttribution',
106
+ :'scope' => :'UsageMeteringScope'
99
107
  }
100
108
  end
101
109
 
@@ -160,6 +168,14 @@ module Zernio
160
168
  if attributes.key?(:'tax')
161
169
  self.tax = attributes[:'tax']
162
170
  end
171
+
172
+ if attributes.key?(:'attribution')
173
+ self.attribution = attributes[:'attribution']
174
+ end
175
+
176
+ if attributes.key?(:'scope')
177
+ self.scope = attributes[:'scope']
178
+ end
163
179
  end
164
180
 
165
181
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -202,7 +218,9 @@ module Zernio
202
218
  peaks == o.peaks &&
203
219
  call_usage == o.call_usage &&
204
220
  period == o.period &&
205
- tax == o.tax
221
+ tax == o.tax &&
222
+ attribution == o.attribution &&
223
+ scope == o.scope
206
224
  end
207
225
 
208
226
  # @see the `==` method
@@ -214,7 +232,7 @@ module Zernio
214
232
  # Calculates hash code according to all attributes.
215
233
  # @return [Integer] Hash code
216
234
  def hash
217
- [supported, granularity, days, totals, line_items, peaks, call_usage, period, tax].hash
235
+ [supported, granularity, days, totals, line_items, peaks, call_usage, period, tax, attribution, scope].hash
218
236
  end
219
237
 
220
238
  # Builds the object from hash