Class: Recras::PaymentMethod

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

Overview

links to ‘arrangement_regels’ in the API recras.github.io/docs/endpoints/betaalmethoden.html

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) ⇒ PaymentMethod

Initializer to transform a Hash into an Client object

Parameters:

  • args (Hash) (defaults to: nil)


14
15
16
17
18
19
20
# File 'lib/recras/payment_method.rb', line 14

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.



9
10
11
# File 'lib/recras/payment_method.rb', line 9

def id
  @id
end

#nameObject

Returns the value of attribute name.



10
11
12
# File 'lib/recras/payment_method.rb', line 10

def name
  @name
end

Class Method Details

.attribute_mappingObject

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



24
25
26
27
28
29
# File 'lib/recras/payment_method.rb', line 24

def self.attribute_mapping
  [
    ["id", "id"],
    ["naam", "name"]
  ]
end