class Beaver::AddressPaymentsReq

AddressPaymentsReq Model.

Attributes

city[RW]

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

country[RW]

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

line1[RW]

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

line2[RW]

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

postal_code[RW]

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

region[RW]

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

Public Class Methods

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

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

  # Extract variables from the hash.
  country = hash['country']
  postal_code = hash['postal_code']
  city = hash['city']
  line1 = hash['line1']
  line2 = hash['line2']
  region = hash['region']

  # Create object from extracted values.
  AddressPaymentsReq.new(country,
                         postal_code,
                         city,
                         line1,
                         line2,
                         region)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/beaver/models/address_payments_req.rb, line 34
def self.names
  @_hash = {} if @_hash.nil?
  @_hash['city'] = 'city'
  @_hash['country'] = 'country'
  @_hash['line1'] = 'line1'
  @_hash['line2'] = 'line2'
  @_hash['postal_code'] = 'postal_code'
  @_hash['region'] = 'region'
  @_hash
end
new(country = nil, postal_code = nil, city = nil, line1 = nil, line2 = nil, region = nil) click to toggle source
# File lib/beaver/models/address_payments_req.rb, line 45
def initialize(country = nil,
               postal_code = nil,
               city = nil,
               line1 = nil,
               line2 = nil,
               region = nil)
  @city = city
  @country = country
  @line1 = line1
  @line2 = line2
  @postal_code = postal_code
  @region = region
end