Class: Mollie::Profile

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

Constant Summary collapse

CATEGORY_CODE_GENERAL_MERCHANDISE =
5399
CATEGORY_CODE_ELECTRONICS_COMPUTERS_AND_SOFTWARE =
5732
CATEGORY_CODE_TRAVEL_RENTAL_AND_TRANSPORTATION =
4121
CATEGORY_CODE_FINANCIAL_SERVICES =
6012
CATEGORY_CODE_FOOD_AND_DRINKS =
5499
CATEGORY_CODE_EVENTS_FESTIVALS_AND_RECREATION =
7999
CATEGORY_CODE_BOOKS_MAGAZINES_AND_NEWSPAPERS =
5192
CATEGORY_CODE_PERSONAL_SERVICES =
7299
CATEGORY_CODE_CHARITY_AND_DONATIONS =
8398
CATEGORY_CODE_OTHER =
0
STATUS_UNVERIFIED =
'unverified'.freeze
STATUS_VERIFIED =
'verified'.freeze
STATUS_BLOCKED =
'blocked'.freeze
REVIEW_STATUS_PENDING =
'pending'.freeze
REVIEW_STATUS_REJECTED =
'rejected'.freeze

Instance Attribute Summary collapse

Attributes inherited from Base

#attributes

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.



21
22
23
# File 'lib/mollie/profile.rb', line 21

def _links
  @_links
end

#business_categoryObject

Returns the value of attribute business_category.



21
22
23
# File 'lib/mollie/profile.rb', line 21

def business_category
  @business_category
end

#category_codeObject

Returns the value of attribute category_code.



21
22
23
# File 'lib/mollie/profile.rb', line 21

def category_code
  @category_code
end

#created_atObject

Returns the value of attribute created_at.



21
22
23
# File 'lib/mollie/profile.rb', line 21

def created_at
  @created_at
end

#emailObject

Returns the value of attribute email.



21
22
23
# File 'lib/mollie/profile.rb', line 21

def email
  @email
end

#idObject

Returns the value of attribute id.



21
22
23
# File 'lib/mollie/profile.rb', line 21

def id
  @id
end

#modeObject

Returns the value of attribute mode.



21
22
23
# File 'lib/mollie/profile.rb', line 21

def mode
  @mode
end

#nameObject

Returns the value of attribute name.



21
22
23
# File 'lib/mollie/profile.rb', line 21

def name
  @name
end

#phoneObject

Returns the value of attribute phone.



21
22
23
# File 'lib/mollie/profile.rb', line 21

def phone
  @phone
end

#reviewObject

Returns the value of attribute review.



21
22
23
# File 'lib/mollie/profile.rb', line 21

def review
  @review
end

#statusObject

Returns the value of attribute status.



21
22
23
# File 'lib/mollie/profile.rb', line 21

def status
  @status
end

#websiteObject

Returns the value of attribute website.



21
22
23
# File 'lib/mollie/profile.rb', line 21

def website
  @website
end

Instance Method Details

#blocked?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/mollie/profile.rb', line 45

def blocked?
  status == STATUS_BLOCKED
end

#chargebacks(options = {}) ⇒ Object



73
74
75
# File 'lib/mollie/profile.rb', line 73

def chargebacks(options = {})
  Chargeback.all(options.merge(profile_id: id))
end

#checkout_preview_urlObject



69
70
71
# File 'lib/mollie/profile.rb', line 69

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

#methods(options = {}) ⇒ Object



77
78
79
# File 'lib/mollie/profile.rb', line 77

def methods(options = {})
  Method.all(options.merge(profile_id: id))
end

#payments(options = {}) ⇒ Object



81
82
83
# File 'lib/mollie/profile.rb', line 81

def payments(options = {})
  Payment.all(options.merge(profile_id: id))
end

#refunds(options = {}) ⇒ Object



85
86
87
# File 'lib/mollie/profile.rb', line 85

def refunds(options = {})
  Refund.all(options.merge(profile_id: id))
end

#review_pending?Boolean

Returns:

  • (Boolean)


53
54
55
# File 'lib/mollie/profile.rb', line 53

def review_pending?
  @review && @review.status == REVIEW_STATUS_PENDING
end

#review_rejected?Boolean

Returns:

  • (Boolean)


57
58
59
# File 'lib/mollie/profile.rb', line 57

def review_rejected?
  @review && @review.status == REVIEW_STATUS_REJECTED
end

#unverified?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/mollie/profile.rb', line 37

def unverified?
  status == STATUS_UNVERIFIED
end

#verified?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/mollie/profile.rb', line 41

def verified?
  status == STATUS_VERIFIED
end