Class: Starling::Resources::MerchantResource

Inherits:
BaseResource show all
Defined in:
lib/starling/resources/merchant_resource.rb

Overview

A resource representing a Merchant returned from the Merchants API

Instance Method Summary collapse

Methods inherited from BaseResource

#initialize

Constructor Details

This class inherits a constructor from Starling::Resources::BaseResource

Instance Method Details

#merchant_uidString

Returns the Starling internal ID of the merchant.

Returns:

  • (String)

    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

#nameString

Returns the name of the merchant.

Returns:

  • (String)

    the name of the merchant



11
12
13
# File 'lib/starling/resources/merchant_resource.rb', line 11

def name
  parsed_data['name']
end

#phone_numberString?

Returns the phone number of the merchant, or nil if this is not known.

Returns:

  • (String, nil)

    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_usernameString?

Returns the Twitter username of the merchant, prefixed with “@”, or nil if this is not known.

Returns:

  • (String, nil)

    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

#websiteString?

Returns the website address of the merchant, or nil if this is not known.

Returns:

  • (String, nil)

    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