class SixSaferpay::Wallet

Attributes

enable_amount_adjustment[RW]
payment_methods[RW]
request_delivery_address[RW]
type[RW]

Public Class Methods

new(type:, payment_methods: nil, request_delivery_address: nil, enable_amount_adjustment: nil ) click to toggle source
# File lib/six_saferpay/models/wallet.rb, line 10
def initialize(type:,
              payment_methods: nil,
              request_delivery_address: nil,
              enable_amount_adjustment: nil
              )
  @type = type
  @payment_methods = payment_methods
  @request_delivery_address = request_delivery_address
  @enable_amount_adjustment = enable_amount_adjustment
end

Public Instance Methods

to_h()
Alias for: to_hash
to_hash() click to toggle source
# File lib/six_saferpay/models/wallet.rb, line 21
def to_hash
  hash = Hash.new
  hash.merge!(type: @type)
  hash.merge!(payment_methods: @payment_methods) if @payment_methods
  hash.merge!(request_delivery_address: @request_delivery_address) if @request_delivery_address
  hash.merge!(enable_amount_adjustment: @enable_amount_adjustment) if @enable_amount_adjustment
  hash
end
Also aliased as: to_h