Class: ProcessOut::GatewayConfiguration
- Inherits:
-
Object
- Object
- ProcessOut::GatewayConfiguration
- Defined in:
- lib/processout/gateway_configuration.rb
Instance Attribute Summary collapse
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#gateway ⇒ Object
Returns the value of attribute gateway.
-
#id ⇒ Object
Returns the value of attribute id.
-
#project ⇒ Object
Returns the value of attribute project.
-
#public_keys ⇒ Object
Returns the value of attribute public_keys.
Instance Method Summary collapse
-
#fill_with_data(data) ⇒ Object
- Fills the object with data coming from the API Params:
data -
Hashof data coming from the API.
- Fills the object with data coming from the API Params:
-
#initialize(client) ⇒ GatewayConfiguration
constructor
- Initializes the GatewayConfiguration object Params:
client -
ProcessOutclient instance.
- Initializes the GatewayConfiguration object Params:
Constructor Details
#initialize(client) ⇒ GatewayConfiguration
Initializes the GatewayConfiguration object Params:
client-
ProcessOutclient instance
55 56 57 58 59 60 61 62 63 64 |
# File 'lib/processout/gateway_configuration.rb', line 55 def initialize(client) @client = client @id = "" @project = nil @gateway = nil @enabled = false @public_keys = Hash.new end |
Instance Attribute Details
#enabled ⇒ Object
Returns the value of attribute enabled.
13 14 15 |
# File 'lib/processout/gateway_configuration.rb', line 13 def enabled @enabled end |
#gateway ⇒ Object
Returns the value of attribute gateway.
12 13 14 |
# File 'lib/processout/gateway_configuration.rb', line 12 def gateway @gateway end |
#id ⇒ Object
Returns the value of attribute id.
10 11 12 |
# File 'lib/processout/gateway_configuration.rb', line 10 def id @id end |
#project ⇒ Object
Returns the value of attribute project.
11 12 13 |
# File 'lib/processout/gateway_configuration.rb', line 11 def project @project end |
#public_keys ⇒ Object
Returns the value of attribute public_keys.
14 15 16 |
# File 'lib/processout/gateway_configuration.rb', line 14 def public_keys @public_keys end |
Instance Method Details
#fill_with_data(data) ⇒ Object
Fills the object with data coming from the API Params:
data-
Hashof data coming from the API
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/processout/gateway_configuration.rb', line 69 def fill_with_data(data) if data.include? "id" @id = data["id"] end if data.include? "project" @project = data["project"] end if data.include? "gateway" @gateway = data["gateway"] end if data.include? "enabled" @enabled = data["enabled"] end if data.include? "public_keys" @public_keys = data["public_keys"] end self end |