class PaymentsApi::PaymentStatus

Payment Information Data

Attributes

approved[RW]

Set to true once the payment has been approved @return [Boolean]

sent[RW]

Set to true once the payment has been sent @return [Boolean]

Public Class Methods

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

# File lib/payments_api/models/payment_status.rb, line 32
def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  approved = hash['approved']
  sent = hash['sent']

  # Create object from extracted values.
  PaymentStatus.new(approved,
                    sent)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/payments_api/models/payment_status.rb, line 18
def self.names
  @_hash = {} if @_hash.nil?
  @_hash['approved'] = 'approved'
  @_hash['sent'] = 'sent'
  @_hash
end
new(approved = nil, sent = nil) click to toggle source
# File lib/payments_api/models/payment_status.rb, line 25
def initialize(approved = nil,
               sent = nil)
  @approved = approved
  @sent = sent
end