Class: Asdawqw::PaymentGateways
- Defined in:
- lib/asdawqw/models/payment_gateways.rb
Overview
PaymentGateways Model.
Instance Attribute Summary collapse
-
#additional_field1 ⇒ String
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.
-
#additional_field2 ⇒ String
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.
-
#payment_gateways_type ⇒ PaymentGatewaysTypeEnum
PAYPAL,AUTHORIZE_NET,BRIDGE_PAY,PAY_BOX,DIBS,O_GONE,DOC_DATA,PAY_GATE.
-
#secret ⇒ String
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.
-
#user ⇒ String
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.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
Instance Method Summary collapse
-
#initialize(payment_gateways_type = nil, user = nil, secret = nil, additional_field1 = nil, additional_field2 = nil) ⇒ PaymentGateways
constructor
A new instance of PaymentGateways.
Methods inherited from BaseModel
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_field1 ⇒ String
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.
33 34 35 |
# File 'lib/asdawqw/models/payment_gateways.rb', line 33 def additional_field1 @additional_field1 end |
#additional_field2 ⇒ String
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.
40 41 42 |
# File 'lib/asdawqw/models/payment_gateways.rb', line 40 def additional_field2 @additional_field2 end |
#payment_gateways_type ⇒ PaymentGatewaysTypeEnum
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 |
#secret ⇒ String
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.
26 27 28 |
# File 'lib/asdawqw/models/payment_gateways.rb', line 26 def secret @secret end |
#user ⇒ String
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.
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 |
.names ⇒ Object
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 |