Class: GoCardlessPro::Resources::PayerTheme

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

Overview

Custom colour themes for payment pages and customer notifications.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, response = nil) ⇒ PayerTheme

Initialize a payer_theme resource instance

Parameters:

  • object (Hash)

    an object returned from the API



19
20
21
22
23
24
# File 'lib/gocardless_pro/resources/payer_theme.rb', line 19

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

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



15
16
17
# File 'lib/gocardless_pro/resources/payer_theme.rb', line 15

def id
  @id
end

Instance Method Details

#api_responseObject



26
27
28
# File 'lib/gocardless_pro/resources/payer_theme.rb', line 26

def api_response
  ApiResponse.new(@response)
end

#to_hObject

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



31
32
33
# File 'lib/gocardless_pro/resources/payer_theme.rb', line 31

def to_h
  @object
end