lib/fastly/models/billing_response.rb in fastly-8.6.0 vs lib/fastly/models/billing_response.rb in fastly-8.7.0
- old
+ new
@@ -17,12 +17,10 @@
attr_accessor :end_time
# Date and time in ISO 8601 format.
attr_accessor :start_time
- attr_accessor :invoice_id
-
attr_accessor :customer_id
# The current state of our third-party billing vendor. One of `up` or `down`.
attr_accessor :vendor_state
@@ -31,23 +29,25 @@
attr_accessor :total
# Breakdown of regional data for products that are region based.
attr_accessor :regions
+ attr_accessor :invoice_id
+
attr_accessor :line_items
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'end_time' => :'end_time',
:'start_time' => :'start_time',
- :'invoice_id' => :'invoice_id',
:'customer_id' => :'customer_id',
:'vendor_state' => :'vendor_state',
:'status' => :'status',
:'total' => :'total',
:'regions' => :'regions',
+ :'invoice_id' => :'invoice_id',
:'line_items' => :'line_items'
}
end
# Returns all the JSON keys this model knows about
@@ -58,16 +58,16 @@
# Attribute type mapping.
def self.fastly_types
{
:'end_time' => :'Time',
:'start_time' => :'Time',
- :'invoice_id' => :'String',
:'customer_id' => :'String',
:'vendor_state' => :'String',
:'status' => :'BillingStatus',
:'total' => :'BillingTotal',
- :'regions' => :'Hash<String, Hash<String, Object>>',
+ :'regions' => :'Hash<String, BillingRegions>',
+ :'invoice_id' => :'Integer',
:'line_items' => :'Array<BillingResponseLineItem>'
}
end
# List of attributes with nullable: true
@@ -80,10 +80,11 @@
# List of class defined in allOf (OpenAPI v3)
def self.fastly_all_of
[
:'Billing',
+ :'BillingInvoiceId',
:'BillingResponseItemItemsData'
]
end
# Initializes the object
@@ -107,14 +108,10 @@
if attributes.key?(:'start_time')
self.start_time = attributes[:'start_time']
end
- if attributes.key?(:'invoice_id')
- self.invoice_id = attributes[:'invoice_id']
- end
-
if attributes.key?(:'customer_id')
self.customer_id = attributes[:'customer_id']
end
if attributes.key?(:'vendor_state')
@@ -133,10 +130,14 @@
if (value = attributes[:'regions']).is_a?(Hash)
self.regions = value
end
end
+ if attributes.key?(:'invoice_id')
+ self.invoice_id = attributes[:'invoice_id']
+ end
+
if attributes.key?(:'line_items')
if (value = attributes[:'line_items']).is_a?(Array)
self.line_items = value
end
end
@@ -160,16 +161,16 @@
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
end_time == o.end_time &&
start_time == o.start_time &&
- invoice_id == o.invoice_id &&
customer_id == o.customer_id &&
vendor_state == o.vendor_state &&
status == o.status &&
total == o.total &&
regions == o.regions &&
+ invoice_id == o.invoice_id &&
line_items == o.line_items
end
# @see the `==` method
# @param [Object] Object to be compared
@@ -178,10 +179,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [end_time, start_time, invoice_id, customer_id, vendor_state, status, total, regions, line_items].hash
+ [end_time, start_time, customer_id, vendor_state, status, total, regions, invoice_id, line_items].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself