class Beaver::BillingStatementsResponse
BillingStatementsResponse
Model.
Attributes
api_version[RW]
TODO: Write general description for this method @return [String]
mnext[RW]
TODO: Write general description for this method @return [String]
previous[RW]
TODO: Write general description for this method @return [String]
results[RW]
TODO: Write general description for this method @return [List of BillingStatement]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/beaver/models/billing_statements_response.rb, line 46 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. # Parameter is an array, so we need to iterate through it results = nil unless hash['results'].nil? results = [] hash['results'].each do |structure| results << (BillingStatement.from_hash(structure) if structure) end end api_version = hash['api_version'] mnext = hash['next'] previous = hash['previous'] # Create object from extracted values. BillingStatementsResponse.new(results, api_version, mnext, previous) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/billing_statements_response.rb, line 26 def self.names @_hash = {} if @_hash.nil? @_hash['mnext'] = 'next' @_hash['previous'] = 'previous' @_hash['results'] = 'results' @_hash['api_version'] = 'api_version' @_hash end
new(results = nil, api_version = nil, mnext = nil, previous = nil)
click to toggle source
# File lib/beaver/models/billing_statements_response.rb, line 35 def initialize(results = nil, api_version = nil, mnext = nil, previous = nil) @mnext = mnext @previous = previous @results = results @api_version = api_version end