Class: Square::Connect::Merchant

Inherits:
Node
  • Object
show all
Includes:
Connections::BankAccounts, Connections::Payments, Connections::Refunds, Connections::Settlements
Defined in:
lib/square/connect/merchant.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#access_token, #endpoint, #identifier

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Connections::BankAccounts

#bank_account

Methods included from Connections::Settlements

#settlement, #settlements

Methods included from Connections::Refunds

#refunds

Methods included from Connections::Payments

#payment, #payments

Methods inherited from Node

#fetch

Constructor Details

#initialize(*args) ⇒ Merchant

Returns a new instance of Merchant.



11
12
13
14
15
16
17
18
# File 'lib/square/connect/merchant.rb', line 11

def initialize(*args)
  super do |attributes|
    self.name = attributes[:name]
    self.email = attributes[:email]
    self.country_code = attributes[:country_code]
    self.language_code = attributes[:language_code]
  end
end

Instance Attribute Details

#country_codeObject

Returns the value of attribute country_code.



9
10
11
# File 'lib/square/connect/merchant.rb', line 9

def country_code
  @country_code
end

#emailObject

Returns the value of attribute email.



9
10
11
# File 'lib/square/connect/merchant.rb', line 9

def email
  @email
end

#language_codeObject

Returns the value of attribute language_code.



9
10
11
# File 'lib/square/connect/merchant.rb', line 9

def language_code
  @language_code
end

#nameObject

Returns the value of attribute name.



9
10
11
# File 'lib/square/connect/merchant.rb', line 9

def name
  @name
end

Class Method Details

.me(access_token) ⇒ Object



21
22
23
# File 'lib/square/connect/merchant.rb', line 21

def me(access_token)
  new :me, access_token
end