Class: Braintree::Merchant

Inherits:
Object
  • Object
show all
Includes:
BaseModule
Defined in:
lib/braintree/merchant.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from BaseModule

included

Methods included from BaseModule::Methods

#copy_instance_variables_from_object, #return_object_or_raise, #set_instance_variables_from_hash, #singleton_class

Constructor Details

#initialize(gateway, attributes) ⇒ Merchant

Returns a new instance of Merchant.



14
15
16
17
18
19
20
# File 'lib/braintree/merchant.rb', line 14

def initialize(gateway, attributes)
  @merchant_accounts = attributes.delete(:merchant_accounts).map do ||
    MerchantAccount._new(gateway, )
  end

  set_instance_variables_from_hash(attributes)
end

Instance Attribute Details

#company_nameObject (readonly)

Returns the value of attribute company_name.



5
6
7
# File 'lib/braintree/merchant.rb', line 5

def company_name
  @company_name
end

#country_code_alpha2Object (readonly)

Returns the value of attribute country_code_alpha2.



6
7
8
# File 'lib/braintree/merchant.rb', line 6

def country_code_alpha2
  @country_code_alpha2
end

#country_code_alpha3Object (readonly)

Returns the value of attribute country_code_alpha3.



7
8
9
# File 'lib/braintree/merchant.rb', line 7

def country_code_alpha3
  @country_code_alpha3
end

#country_code_numericObject (readonly)

Returns the value of attribute country_code_numeric.



8
9
10
# File 'lib/braintree/merchant.rb', line 8

def country_code_numeric
  @country_code_numeric
end

#country_nameObject (readonly)

Returns the value of attribute country_name.



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

def country_name
  @country_name
end

#emailObject (readonly)

Returns the value of attribute email.



10
11
12
# File 'lib/braintree/merchant.rb', line 10

def email
  @email
end

#idObject (readonly)

Returns the value of attribute id.



11
12
13
# File 'lib/braintree/merchant.rb', line 11

def id
  @id
end

#merchant_accountsObject (readonly)

Returns the value of attribute merchant_accounts.



12
13
14
# File 'lib/braintree/merchant.rb', line 12

def merchant_accounts
  @merchant_accounts
end

Class Method Details

._new(*args) ⇒ Object



26
27
28
# File 'lib/braintree/merchant.rb', line 26

def self._new(*args)
  self.new(*args)
end

.provision_raw_apple_payObject



30
31
32
# File 'lib/braintree/merchant.rb', line 30

def self.provision_raw_apple_pay
  Configuration.gateway.merchant.provision_raw_apple_pay
end