Class: Recras::Payment

Inherits:
Object
  • Object
show all
Extended by:
Recras
Defined in:
lib/recras/payment.rb

Constant Summary

Constants included from Recras

API_VERSION, VERSION

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Recras

make_request, new_from_json, object_mappings, parse_json, url, version

Constructor Details

#initialize(args = nil) ⇒ Payment

Initializer to transform a Hash into an Client object

Parameters:

  • args (Hash) (defaults to: nil)


12
13
14
15
16
17
18
# File 'lib/recras/payment.rb', line 12

def initialize(args=nil)
  required_args = []
  return if args.nil?
  args.each do |k,v|
    instance_variable_set("@#{k}", v) unless v.nil?
  end
end

Instance Attribute Details

#idObject

Note:

The is a required parameter.



7
8
9
# File 'lib/recras/payment.rb', line 7

def id
  @id
end

#statusObject

Returns the value of attribute status.



8
9
10
# File 'lib/recras/payment.rb', line 8

def status
  @status
end

Class Method Details

.attribute_mappingObject

translates the mapping between the Recras API and the terms used in this gem



22
23
24
25
26
27
# File 'lib/recras/payment.rb', line 22

def self.attribute_mapping
  [
    ["id", "id"],
    ["status", "status"]
  ]
end