Class: MundiApi::CreateCardOptionsRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/mundi_api/models/create_card_options_request.rb

Overview

Options for creating the card

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(verify_card = nil) ⇒ CreateCardOptionsRequest

Returns a new instance of CreateCardOptionsRequest.



21
22
23
# File 'lib/mundi_api/models/create_card_options_request.rb', line 21

def initialize(verify_card = nil)
  @verify_card = verify_card
end

Instance Attribute Details

#verify_cardBoolean

Indicates if the card should be verified before creation. If true, executes an authorization before saving the card.

Returns:

  • (Boolean)


10
11
12
# File 'lib/mundi_api/models/create_card_options_request.rb', line 10

def verify_card
  @verify_card
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



26
27
28
29
30
31
32
33
34
# File 'lib/mundi_api/models/create_card_options_request.rb', line 26

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.

  verify_card = hash['verify_card']

  # Create object from extracted values.

  CreateCardOptionsRequest.new(verify_card)
end

.namesObject

A mapping from model property names to API property names.



13
14
15
16
17
18
19
# File 'lib/mundi_api/models/create_card_options_request.rb', line 13

def self.names
  if @_hash.nil?
    @_hash = {}
    @_hash['verify_card'] = 'verify_card'
  end
  @_hash
end