Class: GoCardlessPro::Resources::Logo

Inherits:
Object
  • Object
show all
Defined in:
lib/gocardless_pro/resources/logo.rb

Overview

Logos are image uploads that, when associated with a creditor, are shown on the [billing request flow](#billing-requests-billing-request-flows) payment pages.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, response = nil) ⇒ Logo

Initialize a logo resource instance

Parameters:

  • object (Hash)

    an object returned from the API



21
22
23
24
25
26
# File 'lib/gocardless_pro/resources/logo.rb', line 21

def initialize(object, response = nil)
  @object = object

  @id = object['id']
  @response = response
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



17
18
19
# File 'lib/gocardless_pro/resources/logo.rb', line 17

def id
  @id
end

Instance Method Details

#api_responseObject



28
29
30
# File 'lib/gocardless_pro/resources/logo.rb', line 28

def api_response
  ApiResponse.new(@response)
end

#to_hObject

Provides the logo resource as a hash of all its readable attributes



33
34
35
# File 'lib/gocardless_pro/resources/logo.rb', line 33

def to_h
  @object
end