class Beaver::CreditCard
CreditCard
Model.
Attributes
interchange_plus[RW]
The interchange plus pricing model for credit cards to collect platform markup fees. @return [InterchangePlus]
type[RW]
The interchange plus pricing model for credit cards to collect platform markup fees. @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/credit_card.rb, line 34 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. type = hash['type'] interchange_plus = InterchangePlus.from_hash(hash['interchange_plus']) if hash['interchange_plus'] # Create object from extracted values. CreditCard.new(type, interchange_plus) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/credit_card.rb, line 20 def self.names @_hash = {} if @_hash.nil? @_hash['interchange_plus'] = 'interchange_plus' @_hash['type'] = 'type' @_hash end
new(type = nil, interchange_plus = nil)
click to toggle source
# File lib/beaver/models/credit_card.rb, line 27 def initialize(type = nil, interchange_plus = nil) @interchange_plus = interchange_plus @type = type end