class Revolut::Api::Response::Address
Constants
- MAPPING
Attributes
city[RW]
country[RW]
mapping[RW]
postcode[RW]
region[RW]
street_line_one[RW]
street_line_two[RW]
Public Class Methods
new(hash = {})
click to toggle source
# File lib/revolut/api/response/address.rb, line 17 def initialize(hash = {}) ::Revolut::Api::Response::Address::MAPPING.each do |revolut_key, accessor| self.send("#{accessor}=", hash.fetch(revolut_key, nil)) end end
Public Instance Methods
to_api_hash()
click to toggle source
# File lib/revolut/api/response/address.rb, line 23 def to_api_hash hash = {} ::Revolut::Api::Response::Address::MAPPING.each do |revolut_key, accessor| hash[revolut_key] = self.send(accessor) end return hash end