Class: Braintree::Merchant
- Inherits:
-
Object
- Object
- Braintree::Merchant
- Includes:
- BaseModule
- Defined in:
- lib/braintree/merchant.rb
Instance Attribute Summary collapse
-
#company_name ⇒ Object
readonly
Returns the value of attribute company_name.
-
#country_code_alpha2 ⇒ Object
readonly
Returns the value of attribute country_code_alpha2.
-
#country_code_alpha3 ⇒ Object
readonly
Returns the value of attribute country_code_alpha3.
-
#country_code_numeric ⇒ Object
readonly
Returns the value of attribute country_code_numeric.
-
#country_name ⇒ Object
readonly
Returns the value of attribute country_name.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#merchant_accounts ⇒ Object
readonly
Returns the value of attribute merchant_accounts.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(gateway, attributes) ⇒ Merchant
constructor
A new instance of Merchant.
Methods included from BaseModule
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 |merchant_account| MerchantAccount._new(gateway, merchant_account) end set_instance_variables_from_hash(attributes) end |
Instance Attribute Details
#company_name ⇒ Object (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_alpha2 ⇒ Object (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_alpha3 ⇒ Object (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_numeric ⇒ Object (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_name ⇒ Object (readonly)
Returns the value of attribute country_name.
9 10 11 |
# File 'lib/braintree/merchant.rb', line 9 def country_name @country_name end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
10 11 12 |
# File 'lib/braintree/merchant.rb', line 10 def email @email end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
11 12 13 |
# File 'lib/braintree/merchant.rb', line 11 def id @id end |
#merchant_accounts ⇒ Object (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_pay ⇒ Object
30 31 32 |
# File 'lib/braintree/merchant.rb', line 30 def self.provision_raw_apple_pay Configuration.gateway.merchant.provision_raw_apple_pay end |