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 (https://developer.gocardless.com/api-reference/#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



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

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

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

Instance Method Details

#api_responseObject



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

def api_response
  ApiResponse.new(@response)
end

#to_hObject

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



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

def to_h
  @object
end