class Beaver::PayoutMethodsResponse

PayoutMethodsResponse 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 PayoutMethodResp]

Public Class Methods

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

# File lib/beaver/models/payout_methods_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 << (PayoutMethodResp.from_hash(structure) if structure)
    end
  end
  mnext = hash['next']
  previous = hash['previous']
  api_version = hash['api_version']

  # Create object from extracted values.
  PayoutMethodsResponse.new(results,
                            mnext,
                            previous,
                            api_version)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/beaver/models/payout_methods_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, mnext = nil, previous = nil, api_version = nil) click to toggle source
# File lib/beaver/models/payout_methods_response.rb, line 35
def initialize(results = nil,
               mnext = nil,
               previous = nil,
               api_version = nil)
  @mnext = mnext
  @previous = previous
  @results = results
  @api_version = api_version
end