Class: Asdawqw::PaymentGateways

Inherits:
BaseModel show all
Defined in:
lib/asdawqw/models/payment_gateways.rb

Overview

PaymentGateways Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(payment_gateways_type = nil, user = nil, secret = nil, additional_field1 = nil, additional_field2 = nil) ⇒ PaymentGateways

Returns a new instance of PaymentGateways.



53
54
55
56
57
58
59
60
61
62
63
# File 'lib/asdawqw/models/payment_gateways.rb', line 53

def initialize(payment_gateways_type = nil,
               user = nil,
               secret = nil,
               additional_field1 = nil,
               additional_field2 = nil)
  @payment_gateways_type = payment_gateways_type
  @user = user
  @secret = secret
  @additional_field1 = additional_field1
  @additional_field2 = additional_field2
end

Instance Attribute Details

#additional_field1String

Additional value necessary for accessing some payment gateways, values are different per payment gateway: BRIDGE_PAY - Merchant Number PAY_BOX - An identifier DIBS - Merchant ID O_GONE - PSP ID Note: This value will not be returned in response.

Returns:



33
34
35
# File 'lib/asdawqw/models/payment_gateways.rb', line 33

def additional_field1
  @additional_field1
end

#additional_field2String

Additional value necessary for accessing some payment gateways, values are different per payment gateway: BRIDGE_PAY - Merchant Number PAY_BOX - An identifier DIBS - Merchant ID O_GONE - PSP ID Note: This value will not be returned in response.

Returns:



40
41
42
# File 'lib/asdawqw/models/payment_gateways.rb', line 40

def additional_field2
  @additional_field2
end

#payment_gateways_typePaymentGatewaysTypeEnum

PAYPAL,AUTHORIZE_NET,BRIDGE_PAY,PAY_BOX,DIBS,O_GONE,DOC_DATA,PAY_GATE



11
12
13
# File 'lib/asdawqw/models/payment_gateways.rb', line 11

def payment_gateways_type
  @payment_gateways_type
end

#secretString

Value necessary for accessing payment gateway, values are different per payment gateway: PAYPAL - Secret AUTHORIZE_NET - Transaction Key BRIDGE_PAY - Password PAY_BOX - Rank number DIBS - Password O_GONE - Password DOC_DATA - Password PAY_GATE - Password Note: This value will not be returned in response.

Returns:



26
27
28
# File 'lib/asdawqw/models/payment_gateways.rb', line 26

def secret
  @secret
end

#userString

Value necessary for accessing payment gateway, values are different per payment gateway: PAYPAL - Client ID AUTHORIZE_NET - User ID BRIDGE_PAY - Username PAY_BOX - Site number DIBS - Login O_GONE - User ID DOC_DATA - ID PAY_GATE - ID Note: This value will not be returned in response.

Returns:



18
19
20
# File 'lib/asdawqw/models/payment_gateways.rb', line 18

def user
  @user
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/asdawqw/models/payment_gateways.rb', line 66

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  payment_gateways_type = hash['paymentGatewaysType']
  user = hash['user']
  secret = hash['secret']
  additional_field1 = hash['additionalField1']
  additional_field2 = hash['additionalField2']

  # Create object from extracted values.
  PaymentGateways.new(payment_gateways_type,
                      user,
                      secret,
                      additional_field1,
                      additional_field2)
end

.namesObject

A mapping from model property names to API property names.



43
44
45
46
47
48
49
50
51
# File 'lib/asdawqw/models/payment_gateways.rb', line 43

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['payment_gateways_type'] = 'paymentGatewaysType'
  @_hash['user'] = 'user'
  @_hash['secret'] = 'secret'
  @_hash['additional_field1'] = 'additionalField1'
  @_hash['additional_field2'] = 'additionalField2'
  @_hash
end