module SixSaferpay

Constants

VERSION

Public Class Methods

config() click to toggle source

Initialize the config class

# File lib/six_saferpay.rb, line 34
def self.config
  @@config ||= Config.new
end
configure() { |config| ... } click to toggle source

Set the configs

# File lib/six_saferpay.rb, line 39
def self.configure
  yield self.config
end

Public Instance Methods

to_h()
Alias for: to_hash
to_hash() click to toggle source
# File lib/six_saferpay/models/address.rb, line 52
def to_hash
  hash = Hash.new
  hash.merge!(first_name: @first_name) if @first_name
  hash.merge!(last_name: @last_name) if @last_name
  hash.merge!(date_of_birth: @date_of_birth) if @date_of_birth
  hash.merge!(company: @company) if @company
  hash.merge!(gender: @gender) if @gender
  hash.merge!(legal_form: @legal_form) if @legal_form
  hash.merge!(street: @street) if @street
  hash.merge!(street2: @street2) if @street2.present?
  hash.merge!(zip: @zip) if @zip
  hash.merge!(city: @city) if @city
  hash.merge!(country_subdevision_code: @country_subdevision_code) if @country_subdevision_code
  hash.merge!(country_code: @country_code) if @country_code
  hash.merge!(phone: @phone) if @phone
  hash.merge!(email: @email) if @email
  hash
end
Also aliased as: to_h, to_h, to_h, to_h, to_h, to_h, to_h, to_h, to_h, to_h