Class: ProcessOut::Gateway
- Inherits:
-
Object
- Object
- ProcessOut::Gateway
- Defined in:
- lib/processout/gateway.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#flows ⇒ Object
Returns the value of attribute flows.
-
#id ⇒ Object
Returns the value of attribute id.
-
#logo_url ⇒ Object
Returns the value of attribute logo_url.
-
#name ⇒ Object
Returns the value of attribute name.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#url ⇒ Object
Returns the value of attribute url.
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. -
#initialize(client) ⇒ Gateway
constructor
Initializes the Gateway object Params:
client::ProcessOutclient instance.
Constructor Details
#initialize(client) ⇒ Gateway
Initializes the Gateway object Params:
clientProcessOutclient instance
56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/processout/gateway.rb', line 56 def initialize(client) @client = client @id = "" @name = "" @display_name = "" @logo_url = "" @url = "" @flows = Array.new @tags = Array.new @description = "" end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
17 18 19 |
# File 'lib/processout/gateway.rb', line 17 def description @description end |
#display_name ⇒ Object
Returns the value of attribute display_name.
12 13 14 |
# File 'lib/processout/gateway.rb', line 12 def display_name @display_name end |
#flows ⇒ Object
Returns the value of attribute flows.
15 16 17 |
# File 'lib/processout/gateway.rb', line 15 def flows @flows end |
#id ⇒ Object
Returns the value of attribute id.
10 11 12 |
# File 'lib/processout/gateway.rb', line 10 def id @id end |
#logo_url ⇒ Object
Returns the value of attribute logo_url.
13 14 15 |
# File 'lib/processout/gateway.rb', line 13 def logo_url @logo_url end |
#name ⇒ Object
Returns the value of attribute name.
11 12 13 |
# File 'lib/processout/gateway.rb', line 11 def name @name end |
#tags ⇒ Object
Returns the value of attribute tags.
16 17 18 |
# File 'lib/processout/gateway.rb', line 16 def @tags end |
#url ⇒ Object
Returns the value of attribute url.
14 15 16 |
# File 'lib/processout/gateway.rb', line 14 def url @url end |
Instance Method Details
#fill_with_data(data) ⇒ Object
Fills the object with data coming from the API Params:
dataHashof data coming from the API
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/processout/gateway.rb', line 73 def fill_with_data(data) if data.include? "id" @id = data["id"] end if data.include? "name" @name = data["name"] end if data.include? "display_name" @display_name = data["display_name"] end if data.include? "logo_url" @logo_url = data["logo_url"] end if data.include? "url" @url = data["url"] end if data.include? "flows" @flows = data["flows"] end if data.include? "tags" @tags = data["tags"] end if data.include? "description" @description = data["description"] end self end |