Class: Mollie::Partner

Inherits:
Base
  • Object
show all
Defined in:
lib/mollie/partner.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#attributes

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

all, #assign_attributes, cancel, create, #delete, delete, get, id_param, #initialize, parent_id, request, resource_name, update, #update

Constructor Details

This class inherits a constructor from Mollie::Base

Instance Attribute Details

Returns the value of attribute _links.



3
4
5
# File 'lib/mollie/partner.rb', line 3

def _links
  @_links
end

#is_commission_partnerObject

Returns the value of attribute is_commission_partner.



3
4
5
# File 'lib/mollie/partner.rb', line 3

def is_commission_partner
  @is_commission_partner
end

#partner_contract_signed_atObject

Returns the value of attribute partner_contract_signed_at.



3
4
5
# File 'lib/mollie/partner.rb', line 3

def partner_contract_signed_at
  @partner_contract_signed_at
end

#partner_contract_update_availableObject

Returns the value of attribute partner_contract_update_available.



3
4
5
# File 'lib/mollie/partner.rb', line 3

def partner_contract_update_available
  @partner_contract_update_available
end

#partner_typeObject

Returns the value of attribute partner_type.



3
4
5
# File 'lib/mollie/partner.rb', line 3

def partner_type
  @partner_type
end

#user_agent_tokensObject

Returns the value of attribute user_agent_tokens.



9
10
11
# File 'lib/mollie/partner.rb', line 9

def user_agent_tokens
  @user_agent_tokens
end

Class Method Details

.current(options = {}) ⇒ Object



13
14
15
16
# File 'lib/mollie/partner.rb', line 13

def self.current(options = {})
  response = Client.instance.perform_http_call('GET', 'organizations/me/partner', nil, {}, options)
  new(response)
end

Instance Method Details

#commission_partner?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/mollie/partner.rb', line 22

def commission_partner?
  is_commission_partner
end

#contract_signed_atObject



26
27
28
29
30
31
32
# File 'lib/mollie/partner.rb', line 26

def contract_signed_at
  @contract_signed_at = begin
    Time.parse(partner_contract_signed_at)
  rescue StandardError
    nil
  end
end

#contract_update_available?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/mollie/partner.rb', line 34

def contract_update_available?
  partner_contract_update_available
end


48
49
50
# File 'lib/mollie/partner.rb', line 48

def signuplink
  Util.extract_url(links, 'signuplink')
end

#typeObject



18
19
20
# File 'lib/mollie/partner.rb', line 18

def type
  partner_type
end