Class: Starling::Resources::MerchantResource
- Inherits:
-
BaseResource
- Object
- BaseResource
- Starling::Resources::MerchantResource
- Defined in:
- lib/starling/resources/merchant_resource.rb
Overview
A resource representing a Merchant returned from the Merchants API
Instance Method Summary collapse
-
#merchant_uid ⇒ String
The Starling internal ID of the merchant.
-
#name ⇒ String
The name of the merchant.
-
#phone_number ⇒ String?
The phone number of the merchant, or nil if this is not known.
-
#twitter_username ⇒ String?
The Twitter username of the merchant, prefixed with “@”, or nil if this is not known.
-
#website ⇒ String?
The website address of the merchant, or nil if this is not known.
Methods inherited from BaseResource
Constructor Details
This class inherits a constructor from Starling::Resources::BaseResource
Instance Method Details
#merchant_uid ⇒ String
Returns the Starling internal ID of the merchant.
6 7 8 |
# File 'lib/starling/resources/merchant_resource.rb', line 6 def merchant_uid parsed_data['merchantUid'] end |
#name ⇒ String
Returns the name of the merchant.
11 12 13 |
# File 'lib/starling/resources/merchant_resource.rb', line 11 def name parsed_data['name'] end |
#phone_number ⇒ String?
Returns the phone number of the merchant, or nil if this is not known.
23 24 25 |
# File 'lib/starling/resources/merchant_resource.rb', line 23 def phone_number parsed_data['phoneNumber'] end |
#twitter_username ⇒ String?
Returns the Twitter username of the merchant, prefixed with “@”, or nil if this is not known.
29 30 31 |
# File 'lib/starling/resources/merchant_resource.rb', line 29 def twitter_username parsed_data['twitterUsername'] end |
#website ⇒ String?
Returns the website address of the merchant, or nil if this is not known.
17 18 19 |
# File 'lib/starling/resources/merchant_resource.rb', line 17 def website parsed_data['website'] end |