class Beaver::PaymentMethodResp

PaymentMethodResp Model.

Attributes

api_version[RW]

TODO: Write general description for this method @return [String]

create_time[RW]

TODO: Write general description for this method @return [Integer]

credit_card[RW]

TODO: Write general description for this method @return [CreditCard1]

custom_data[RW]

TODO: Write general description for this method @return [Object]

id[RW]

TODO: Write general description for this method @return [String]

owner[RW]

TODO: Write general description for this method @return [OwnerApplications]

path[RW]

TODO: Write general description for this method @return [String]

payment_bank_us[RW]

TODO: Write general description for this method @return [PaymentBankUs]

resource[RW]

TODO: Write general description for this method @return [String]

status[RW]

TODO: Write general description for this method @return [Status2Enum]

type[RW]

TODO: Write general description for this method @return [Type3Enum]

Public Class Methods

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

# File lib/beaver/models/payment_method_resp.rb, line 95
def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  create_time = hash['create_time']
  id = hash['id']
  owner = OwnerApplications.from_hash(hash['owner']) if hash['owner']
  path = hash['path']
  resource = hash['resource']
  status = hash['status']
  type = hash['type']
  credit_card = CreditCard1.from_hash(hash['credit_card']) if
    hash['credit_card']
  custom_data = hash['custom_data']
  payment_bank_us = PaymentBankUs.from_hash(hash['payment_bank_us']) if
    hash['payment_bank_us']
  api_version = hash['api_version']

  # Create object from extracted values.
  PaymentMethodResp.new(create_time,
                        id,
                        owner,
                        path,
                        resource,
                        status,
                        type,
                        credit_card,
                        custom_data,
                        payment_bank_us,
                        api_version)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/beaver/models/payment_method_resp.rb, line 54
def self.names
  @_hash = {} if @_hash.nil?
  @_hash['create_time'] = 'create_time'
  @_hash['credit_card'] = 'credit_card'
  @_hash['custom_data'] = 'custom_data'
  @_hash['id'] = 'id'
  @_hash['owner'] = 'owner'
  @_hash['path'] = 'path'
  @_hash['payment_bank_us'] = 'payment_bank_us'
  @_hash['resource'] = 'resource'
  @_hash['status'] = 'status'
  @_hash['type'] = 'type'
  @_hash['api_version'] = 'api_version'
  @_hash
end
new(create_time = nil, id = nil, owner = nil, path = nil, resource = nil, status = nil, type = nil, credit_card = nil, custom_data = nil, payment_bank_us = nil, api_version = nil) click to toggle source
# File lib/beaver/models/payment_method_resp.rb, line 70
def initialize(create_time = nil,
               id = nil,
               owner = nil,
               path = nil,
               resource = nil,
               status = nil,
               type = nil,
               credit_card = nil,
               custom_data = nil,
               payment_bank_us = nil,
               api_version = nil)
  @create_time = create_time
  @credit_card = credit_card
  @custom_data = custom_data
  @id = id
  @owner = owner
  @path = path
  @payment_bank_us = payment_bank_us
  @resource = resource
  @status = status
  @type = type
  @api_version = api_version
end