fastly 8.6.0 → 8.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +1 -1
  5. data/docs/Billing.md +1 -2
  6. data/docs/BillingApi.md +2 -2
  7. data/docs/BillingBandwidth.md +11 -0
  8. data/docs/BillingBandwidthTiers.md +14 -0
  9. data/docs/BillingEstimateInvoiceId.md +10 -0
  10. data/docs/BillingEstimateResponse.md +2 -2
  11. data/docs/{LineItemDataReadOnlyInvoiceId.md → BillingInvoiceId.md} +2 -1
  12. data/docs/BillingInvoicesApi.md +2 -2
  13. data/docs/BillingRegions.md +13 -0
  14. data/docs/BillingResponse.md +2 -2
  15. data/docs/BillingResponseLineItem.md +1 -1
  16. data/docs/EomInvoiceResponse.md +1 -1
  17. data/docs/Invoice.md +1 -1
  18. data/docs/LineItemData.md +1 -1
  19. data/lib/fastly/api/billing_api.rb +2 -2
  20. data/lib/fastly/api/billing_invoices_api.rb +2 -2
  21. data/lib/fastly/models/billing.rb +2 -11
  22. data/lib/fastly/models/billing_bandwidth.rb +227 -0
  23. data/lib/fastly/models/billing_bandwidth_tiers.rb +252 -0
  24. data/lib/fastly/models/billing_estimate_invoice_id.rb +216 -0
  25. data/lib/fastly/models/billing_estimate_response.rb +12 -11
  26. data/lib/fastly/models/{line_item_data_read_only_invoice_id.rb → billing_invoice_id.rb} +14 -5
  27. data/lib/fastly/models/billing_regions.rb +243 -0
  28. data/lib/fastly/models/billing_response.rb +12 -11
  29. data/lib/fastly/models/billing_response_line_item.rb +2 -1
  30. data/lib/fastly/models/eom_invoice_response.rb +1 -1
  31. data/lib/fastly/models/invoice.rb +1 -1
  32. data/lib/fastly/models/line_item_data.rb +2 -1
  33. data/lib/fastly/version.rb +1 -1
  34. data/lib/fastly.rb +5 -1
  35. data/sig.json +1 -1
  36. metadata +12 -4
@@ -0,0 +1,252 @@
1
+ =begin
2
+ #Fastly API
3
+
4
+ #Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: oss@fastly.com
8
+
9
+ =end
10
+
11
+ require 'date'
12
+ require 'time'
13
+
14
+ module Fastly
15
+ class BillingBandwidthTiers
16
+ attr_accessor :name
17
+
18
+ attr_accessor :units
19
+
20
+ attr_accessor :price
21
+
22
+ attr_accessor :discounted_price
23
+
24
+ attr_accessor :total
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'name' => :'name',
30
+ :'units' => :'units',
31
+ :'price' => :'price',
32
+ :'discounted_price' => :'discounted_price',
33
+ :'total' => :'total'
34
+ }
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.fastly_types
44
+ {
45
+ :'name' => :'String',
46
+ :'units' => :'Float',
47
+ :'price' => :'Float',
48
+ :'discounted_price' => :'Float',
49
+ :'total' => :'Float'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ def self.fastly_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 `Fastly::BillingBandwidthTiers` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!self.class.attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::BillingBandwidthTiers`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'name')
75
+ self.name = attributes[:'name']
76
+ end
77
+
78
+ if attributes.key?(:'units')
79
+ self.units = attributes[:'units']
80
+ end
81
+
82
+ if attributes.key?(:'price')
83
+ self.price = attributes[:'price']
84
+ end
85
+
86
+ if attributes.key?(:'discounted_price')
87
+ self.discounted_price = attributes[:'discounted_price']
88
+ end
89
+
90
+ if attributes.key?(:'total')
91
+ self.total = attributes[:'total']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ invalid_properties = Array.new
99
+ invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ true
106
+ end
107
+
108
+ # Checks equality by comparing each attribute.
109
+ # @param [Object] Object to be compared
110
+ def ==(o)
111
+ return true if self.equal?(o)
112
+ self.class == o.class &&
113
+ name == o.name &&
114
+ units == o.units &&
115
+ price == o.price &&
116
+ discounted_price == o.discounted_price &&
117
+ total == o.total
118
+ end
119
+
120
+ # @see the `==` method
121
+ # @param [Object] Object to be compared
122
+ def eql?(o)
123
+ self == o
124
+ end
125
+
126
+ # Calculates hash code according to all attributes.
127
+ # @return [Integer] Hash code
128
+ def hash
129
+ [name, units, price, discounted_price, total].hash
130
+ end
131
+
132
+ # Builds the object from hash
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ # @return [Object] Returns the model itself
135
+ def self.build_from_hash(attributes)
136
+ new.build_from_hash(attributes)
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def build_from_hash(attributes)
143
+ return nil unless attributes.is_a?(Hash)
144
+ self.class.fastly_types.each_pair do |key, type|
145
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
146
+ self.send("#{key}=", nil)
147
+ elsif type =~ /\AArray<(.*)>/i
148
+ # check to ensure the input is an array given that the attribute
149
+ # is documented as an array but the input is not
150
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
151
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
152
+ end
153
+ elsif !attributes[self.class.attribute_map[key]].nil?
154
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
155
+ end
156
+ end
157
+
158
+ self
159
+ end
160
+
161
+ # Deserializes the data based on type
162
+ # @param string type Data type
163
+ # @param string value Value to be deserialized
164
+ # @return [Object] Deserialized data
165
+ def _deserialize(type, value)
166
+ case type.to_sym
167
+ when :Time
168
+ Time.parse(value)
169
+ when :Date
170
+ Date.parse(value)
171
+ when :String
172
+ value.to_s
173
+ when :Integer
174
+ value.to_i
175
+ when :Float
176
+ value.to_f
177
+ when :Boolean
178
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
179
+ true
180
+ else
181
+ false
182
+ end
183
+ when :Object
184
+ # generic object (usually a Hash), return directly
185
+ value
186
+ when /\AArray<(?<inner_type>.+)>\z/
187
+ inner_type = Regexp.last_match[:inner_type]
188
+ value.map { |v| _deserialize(inner_type, v) }
189
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
190
+ k_type = Regexp.last_match[:k_type]
191
+ v_type = Regexp.last_match[:v_type]
192
+ {}.tap do |hash|
193
+ value.each do |k, v|
194
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
195
+ end
196
+ end
197
+ else # model
198
+ # models (e.g. Pet) or oneOf
199
+ klass = Fastly.const_get(type)
200
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
201
+ end
202
+ end
203
+
204
+ # Returns the string representation of the object
205
+ # @return [String] String presentation of the object
206
+ def to_s
207
+ to_hash.to_s
208
+ end
209
+
210
+ # to_body is an alias to to_hash (backward compatibility)
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_body
213
+ to_hash
214
+ end
215
+
216
+ # Returns the object in the form of hash
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_hash
219
+ hash = {}
220
+ self.class.attribute_map.each_pair do |attr, param|
221
+ value = self.send(attr)
222
+ if value.nil?
223
+ is_nullable = self.class.fastly_nullable.include?(attr)
224
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
225
+ end
226
+
227
+ hash[param] = _to_hash(value)
228
+ end
229
+ hash
230
+ end
231
+
232
+ # Outputs non-array value in the form of hash
233
+ # For object, use to_hash. Otherwise, just return the value
234
+ # @param [Object] value Any valid value
235
+ # @return [Hash] Returns the value in the form of hash
236
+ def _to_hash(value)
237
+ if value.is_a?(Array)
238
+ value.compact.map { |v| _to_hash(v) }
239
+ elsif value.is_a?(Hash)
240
+ {}.tap do |hash|
241
+ value.each { |k, v| hash[k] = _to_hash(v) }
242
+ end
243
+ elsif value.respond_to? :to_hash
244
+ value.to_hash
245
+ else
246
+ value
247
+ end
248
+ end
249
+
250
+ end
251
+
252
+ end
@@ -0,0 +1,216 @@
1
+ =begin
2
+ #Fastly API
3
+
4
+ #Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: oss@fastly.com
8
+
9
+ =end
10
+
11
+ require 'date'
12
+ require 'time'
13
+
14
+ module Fastly
15
+ class BillingEstimateInvoiceId
16
+ attr_accessor :invoice_id
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'invoice_id' => :'invoice_id'
22
+ }
23
+ end
24
+
25
+ # Returns all the JSON keys this model knows about
26
+ def self.acceptable_attributes
27
+ attribute_map.values
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.fastly_types
32
+ {
33
+ :'invoice_id' => :'String'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.fastly_nullable
39
+ Set.new([
40
+ ])
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ if (!attributes.is_a?(Hash))
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::BillingEstimateInvoiceId` initialize method"
48
+ end
49
+
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::BillingEstimateInvoiceId`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ end
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:'invoice_id')
59
+ self.invoice_id = attributes[:'invoice_id']
60
+ end
61
+ end
62
+
63
+ # Show invalid properties with the reasons. Usually used together with valid?
64
+ # @return Array for valid properties with the reasons
65
+ def list_invalid_properties
66
+ invalid_properties = Array.new
67
+ invalid_properties
68
+ end
69
+
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+ true
74
+ end
75
+
76
+ # Checks equality by comparing each attribute.
77
+ # @param [Object] Object to be compared
78
+ def ==(o)
79
+ return true if self.equal?(o)
80
+ self.class == o.class &&
81
+ invoice_id == o.invoice_id
82
+ end
83
+
84
+ # @see the `==` method
85
+ # @param [Object] Object to be compared
86
+ def eql?(o)
87
+ self == o
88
+ end
89
+
90
+ # Calculates hash code according to all attributes.
91
+ # @return [Integer] Hash code
92
+ def hash
93
+ [invoice_id].hash
94
+ end
95
+
96
+ # Builds the object from hash
97
+ # @param [Hash] attributes Model attributes in the form of hash
98
+ # @return [Object] Returns the model itself
99
+ def self.build_from_hash(attributes)
100
+ new.build_from_hash(attributes)
101
+ end
102
+
103
+ # Builds the object from hash
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ # @return [Object] Returns the model itself
106
+ def build_from_hash(attributes)
107
+ return nil unless attributes.is_a?(Hash)
108
+ self.class.fastly_types.each_pair do |key, type|
109
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
110
+ self.send("#{key}=", nil)
111
+ elsif type =~ /\AArray<(.*)>/i
112
+ # check to ensure the input is an array given that the attribute
113
+ # is documented as an array but the input is not
114
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
115
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
116
+ end
117
+ elsif !attributes[self.class.attribute_map[key]].nil?
118
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
119
+ end
120
+ end
121
+
122
+ self
123
+ end
124
+
125
+ # Deserializes the data based on type
126
+ # @param string type Data type
127
+ # @param string value Value to be deserialized
128
+ # @return [Object] Deserialized data
129
+ def _deserialize(type, value)
130
+ case type.to_sym
131
+ when :Time
132
+ Time.parse(value)
133
+ when :Date
134
+ Date.parse(value)
135
+ when :String
136
+ value.to_s
137
+ when :Integer
138
+ value.to_i
139
+ when :Float
140
+ value.to_f
141
+ when :Boolean
142
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143
+ true
144
+ else
145
+ false
146
+ end
147
+ when :Object
148
+ # generic object (usually a Hash), return directly
149
+ value
150
+ when /\AArray<(?<inner_type>.+)>\z/
151
+ inner_type = Regexp.last_match[:inner_type]
152
+ value.map { |v| _deserialize(inner_type, v) }
153
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
154
+ k_type = Regexp.last_match[:k_type]
155
+ v_type = Regexp.last_match[:v_type]
156
+ {}.tap do |hash|
157
+ value.each do |k, v|
158
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
159
+ end
160
+ end
161
+ else # model
162
+ # models (e.g. Pet) or oneOf
163
+ klass = Fastly.const_get(type)
164
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
165
+ end
166
+ end
167
+
168
+ # Returns the string representation of the object
169
+ # @return [String] String presentation of the object
170
+ def to_s
171
+ to_hash.to_s
172
+ end
173
+
174
+ # to_body is an alias to to_hash (backward compatibility)
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_body
177
+ to_hash
178
+ end
179
+
180
+ # Returns the object in the form of hash
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_hash
183
+ hash = {}
184
+ self.class.attribute_map.each_pair do |attr, param|
185
+ value = self.send(attr)
186
+ if value.nil?
187
+ is_nullable = self.class.fastly_nullable.include?(attr)
188
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
189
+ end
190
+
191
+ hash[param] = _to_hash(value)
192
+ end
193
+ hash
194
+ end
195
+
196
+ # Outputs non-array value in the form of hash
197
+ # For object, use to_hash. Otherwise, just return the value
198
+ # @param [Object] value Any valid value
199
+ # @return [Hash] Returns the value in the form of hash
200
+ def _to_hash(value)
201
+ if value.is_a?(Array)
202
+ value.compact.map { |v| _to_hash(v) }
203
+ elsif value.is_a?(Hash)
204
+ {}.tap do |hash|
205
+ value.each { |k, v| hash[k] = _to_hash(v) }
206
+ end
207
+ elsif value.respond_to? :to_hash
208
+ value.to_hash
209
+ else
210
+ value
211
+ end
212
+ end
213
+
214
+ end
215
+
216
+ end
@@ -19,8 +19,6 @@ module Fastly
19
19
  # Date and time in ISO 8601 format.
20
20
  attr_accessor :start_time
21
21
 
22
- attr_accessor :invoice_id
23
-
24
22
  attr_accessor :customer_id
25
23
 
26
24
  # The current state of our third-party billing vendor. One of `up` or `down`.
@@ -33,6 +31,8 @@ module Fastly
33
31
  # Breakdown of regional data for products that are region based.
34
32
  attr_accessor :regions
35
33
 
34
+ attr_accessor :invoice_id
35
+
36
36
  attr_accessor :line_items
37
37
 
38
38
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -40,12 +40,12 @@ module Fastly
40
40
  {
41
41
  :'end_time' => :'end_time',
42
42
  :'start_time' => :'start_time',
43
- :'invoice_id' => :'invoice_id',
44
43
  :'customer_id' => :'customer_id',
45
44
  :'vendor_state' => :'vendor_state',
46
45
  :'status' => :'status',
47
46
  :'total' => :'total',
48
47
  :'regions' => :'regions',
48
+ :'invoice_id' => :'invoice_id',
49
49
  :'line_items' => :'line_items'
50
50
  }
51
51
  end
@@ -60,12 +60,12 @@ module Fastly
60
60
  {
61
61
  :'end_time' => :'Time',
62
62
  :'start_time' => :'Time',
63
- :'invoice_id' => :'String',
64
63
  :'customer_id' => :'String',
65
64
  :'vendor_state' => :'String',
66
65
  :'status' => :'BillingStatus',
67
66
  :'total' => :'BillingTotal',
68
- :'regions' => :'Hash<String, Hash<String, Object>>',
67
+ :'regions' => :'Hash<String, BillingRegions>',
68
+ :'invoice_id' => :'String',
69
69
  :'line_items' => :'Array<BillingEstimateLinesLineItems>'
70
70
  }
71
71
  end
@@ -82,6 +82,7 @@ module Fastly
82
82
  def self.fastly_all_of
83
83
  [
84
84
  :'Billing',
85
+ :'BillingEstimateInvoiceId',
85
86
  :'BillingEstimateLines'
86
87
  ]
87
88
  end
@@ -109,10 +110,6 @@ module Fastly
109
110
  self.start_time = attributes[:'start_time']
110
111
  end
111
112
 
112
- if attributes.key?(:'invoice_id')
113
- self.invoice_id = attributes[:'invoice_id']
114
- end
115
-
116
113
  if attributes.key?(:'customer_id')
117
114
  self.customer_id = attributes[:'customer_id']
118
115
  end
@@ -135,6 +132,10 @@ module Fastly
135
132
  end
136
133
  end
137
134
 
135
+ if attributes.key?(:'invoice_id')
136
+ self.invoice_id = attributes[:'invoice_id']
137
+ end
138
+
138
139
  if attributes.key?(:'line_items')
139
140
  if (value = attributes[:'line_items']).is_a?(Array)
140
141
  self.line_items = value
@@ -162,12 +163,12 @@ module Fastly
162
163
  self.class == o.class &&
163
164
  end_time == o.end_time &&
164
165
  start_time == o.start_time &&
165
- invoice_id == o.invoice_id &&
166
166
  customer_id == o.customer_id &&
167
167
  vendor_state == o.vendor_state &&
168
168
  status == o.status &&
169
169
  total == o.total &&
170
170
  regions == o.regions &&
171
+ invoice_id == o.invoice_id &&
171
172
  line_items == o.line_items
172
173
  end
173
174
 
@@ -180,7 +181,7 @@ module Fastly
180
181
  # Calculates hash code according to all attributes.
181
182
  # @return [Integer] Hash code
182
183
  def hash
183
- [end_time, start_time, invoice_id, customer_id, vendor_state, status, total, regions, line_items].hash
184
+ [end_time, start_time, customer_id, vendor_state, status, total, regions, invoice_id, line_items].hash
184
185
  end
185
186
 
186
187
  # Builds the object from hash
@@ -12,10 +12,13 @@ require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Fastly
15
- class LineItemDataReadOnlyInvoiceId
15
+ class BillingInvoiceId
16
+ attr_accessor :invoice_id
17
+
16
18
  # Attribute mapping from ruby-style variable name to JSON key.
17
19
  def self.attribute_map
18
20
  {
21
+ :'invoice_id' => :'invoice_id'
19
22
  }
20
23
  end
21
24
 
@@ -27,6 +30,7 @@ module Fastly
27
30
  # Attribute type mapping.
28
31
  def self.fastly_types
29
32
  {
33
+ :'invoice_id' => :'Integer'
30
34
  }
31
35
  end
32
36
 
@@ -40,16 +44,20 @@ module Fastly
40
44
  # @param [Hash] attributes Model attributes in the form of hash
41
45
  def initialize(attributes = {})
42
46
  if (!attributes.is_a?(Hash))
43
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::LineItemDataReadOnlyInvoiceId` initialize method"
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::BillingInvoiceId` initialize method"
44
48
  end
45
49
 
46
50
  # check to see if the attribute exists and convert string to symbol for hash key
47
51
  attributes = attributes.each_with_object({}) { |(k, v), h|
48
52
  if (!self.class.attribute_map.key?(k.to_sym))
49
- fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::LineItemDataReadOnlyInvoiceId`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::BillingInvoiceId`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
54
  end
51
55
  h[k.to_sym] = v
52
56
  }
57
+
58
+ if attributes.key?(:'invoice_id')
59
+ self.invoice_id = attributes[:'invoice_id']
60
+ end
53
61
  end
54
62
 
55
63
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -69,7 +77,8 @@ module Fastly
69
77
  # @param [Object] Object to be compared
70
78
  def ==(o)
71
79
  return true if self.equal?(o)
72
- self.class == o.class
80
+ self.class == o.class &&
81
+ invoice_id == o.invoice_id
73
82
  end
74
83
 
75
84
  # @see the `==` method
@@ -81,7 +90,7 @@ module Fastly
81
90
  # Calculates hash code according to all attributes.
82
91
  # @return [Integer] Hash code
83
92
  def hash
84
- [].hash
93
+ [invoice_id].hash
85
94
  end
86
95
 
87
96
  # Builds the object from hash