Class: Rallio::Account
Overview
Represents an account object as it comes from Rallio.
Instance Attribute Summary collapse
-
#city ⇒ String
Account city.
-
#country_code ⇒ String
Account country code.
-
#facebook_connected ⇒ Boolean
Facebook has been associated.
-
#facebook_needs_reconnection ⇒ Boolean
Facebook has lost its connection.
-
#facebook_reputation ⇒ Float
Average review rating for facebook.
-
#franchisor_id ⇒ String
Franchisor_id account belongs to.
-
#franchisor_name ⇒ String
Franchisor_name account belongs to.
-
#google_connected ⇒ String
Google has been associated.
-
#google_needs_reconnection ⇒ Boolean
Google has lost its connection.
-
#google_reputation ⇒ Float
Average review rating for google.
-
#id ⇒ Integer
Unique id for account.
-
#name ⇒ String
Account name.
-
#short_name ⇒ String
Account short name.
-
#time_zone ⇒ String
Account time zone.
-
#url ⇒ String
Account url.
-
#yelp_connected ⇒ String
Yelp has been associated.
-
#yelp_needs_reconnection ⇒ Boolean
Yelp has lost its connection.
-
#yelp_reputation ⇒ Float
Average review rating for yelp.
Class Method Summary collapse
-
.create(franchisor_id:, account:) ⇒ Rallio::Account
Creates an account.
-
.for(franchisor_id:) ⇒ Array<Rallio::Account>
Retreives accounts.
Instance Method Summary collapse
-
#reviews(access_token:) ⇒ Array<Rallio::Review>
Retreives reviews for the account.
Methods inherited from Base
Instance Attribute Details
#city ⇒ String
Returns account city.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rallio/account.rb', line 40 class Account < Base attribute :id, Integer attribute :name, String attribute :short_name, String attribute :url, String attribute :city, String attribute :country_code, String attribute :time_zone, String attribute :franchisor_id, Integer attribute :franchisor_name, String attribute :facebook_connected, Axiom::Types::Boolean attribute :facebook_needs_reconnection, Axiom::Types::Boolean attribute :facebook_reputation, Float attribute :yelp_connected, Axiom::Types::Boolean attribute :yelp_needs_reconnection, Axiom::Types::Boolean attribute :yelp_reputation, Float attribute :google_connected, Axiom::Types::Boolean attribute :google_needs_reconnection, Axiom::Types::Boolean attribute :google_reputation, Float # Retreives accounts. # # @param franchisor_id [Integer] franchisor_id to get accounts for # @return [Array<Rallio::Account>] def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end # Creates an account. # # @param franchisor_id [Integer] franchisor_id to create account under # @param account [Hash] # @option account [String] :name # @option account [String] :short_name slug or other identifier # @option account [String] :url # @option account [String] :city # @option account [String] :country_code # @option account [String] :time_zone # @return [Rallio::Account] hash of account created def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end # Retreives reviews for the account. # # @param access_token [String] user access token for API access to account # @return [Array<Rallio::Review>] def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end private def type :accounts end end |
#country_code ⇒ String
Returns account country code.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rallio/account.rb', line 40 class Account < Base attribute :id, Integer attribute :name, String attribute :short_name, String attribute :url, String attribute :city, String attribute :country_code, String attribute :time_zone, String attribute :franchisor_id, Integer attribute :franchisor_name, String attribute :facebook_connected, Axiom::Types::Boolean attribute :facebook_needs_reconnection, Axiom::Types::Boolean attribute :facebook_reputation, Float attribute :yelp_connected, Axiom::Types::Boolean attribute :yelp_needs_reconnection, Axiom::Types::Boolean attribute :yelp_reputation, Float attribute :google_connected, Axiom::Types::Boolean attribute :google_needs_reconnection, Axiom::Types::Boolean attribute :google_reputation, Float # Retreives accounts. # # @param franchisor_id [Integer] franchisor_id to get accounts for # @return [Array<Rallio::Account>] def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end # Creates an account. # # @param franchisor_id [Integer] franchisor_id to create account under # @param account [Hash] # @option account [String] :name # @option account [String] :short_name slug or other identifier # @option account [String] :url # @option account [String] :city # @option account [String] :country_code # @option account [String] :time_zone # @return [Rallio::Account] hash of account created def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end # Retreives reviews for the account. # # @param access_token [String] user access token for API access to account # @return [Array<Rallio::Review>] def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end private def type :accounts end end |
#facebook_connected ⇒ Boolean
Returns facebook has been associated.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rallio/account.rb', line 40 class Account < Base attribute :id, Integer attribute :name, String attribute :short_name, String attribute :url, String attribute :city, String attribute :country_code, String attribute :time_zone, String attribute :franchisor_id, Integer attribute :franchisor_name, String attribute :facebook_connected, Axiom::Types::Boolean attribute :facebook_needs_reconnection, Axiom::Types::Boolean attribute :facebook_reputation, Float attribute :yelp_connected, Axiom::Types::Boolean attribute :yelp_needs_reconnection, Axiom::Types::Boolean attribute :yelp_reputation, Float attribute :google_connected, Axiom::Types::Boolean attribute :google_needs_reconnection, Axiom::Types::Boolean attribute :google_reputation, Float # Retreives accounts. # # @param franchisor_id [Integer] franchisor_id to get accounts for # @return [Array<Rallio::Account>] def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end # Creates an account. # # @param franchisor_id [Integer] franchisor_id to create account under # @param account [Hash] # @option account [String] :name # @option account [String] :short_name slug or other identifier # @option account [String] :url # @option account [String] :city # @option account [String] :country_code # @option account [String] :time_zone # @return [Rallio::Account] hash of account created def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end # Retreives reviews for the account. # # @param access_token [String] user access token for API access to account # @return [Array<Rallio::Review>] def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end private def type :accounts end end |
#facebook_needs_reconnection ⇒ Boolean
Returns facebook has lost its connection.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rallio/account.rb', line 40 class Account < Base attribute :id, Integer attribute :name, String attribute :short_name, String attribute :url, String attribute :city, String attribute :country_code, String attribute :time_zone, String attribute :franchisor_id, Integer attribute :franchisor_name, String attribute :facebook_connected, Axiom::Types::Boolean attribute :facebook_needs_reconnection, Axiom::Types::Boolean attribute :facebook_reputation, Float attribute :yelp_connected, Axiom::Types::Boolean attribute :yelp_needs_reconnection, Axiom::Types::Boolean attribute :yelp_reputation, Float attribute :google_connected, Axiom::Types::Boolean attribute :google_needs_reconnection, Axiom::Types::Boolean attribute :google_reputation, Float # Retreives accounts. # # @param franchisor_id [Integer] franchisor_id to get accounts for # @return [Array<Rallio::Account>] def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end # Creates an account. # # @param franchisor_id [Integer] franchisor_id to create account under # @param account [Hash] # @option account [String] :name # @option account [String] :short_name slug or other identifier # @option account [String] :url # @option account [String] :city # @option account [String] :country_code # @option account [String] :time_zone # @return [Rallio::Account] hash of account created def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end # Retreives reviews for the account. # # @param access_token [String] user access token for API access to account # @return [Array<Rallio::Review>] def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end private def type :accounts end end |
#facebook_reputation ⇒ Float
Returns average review rating for facebook.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rallio/account.rb', line 40 class Account < Base attribute :id, Integer attribute :name, String attribute :short_name, String attribute :url, String attribute :city, String attribute :country_code, String attribute :time_zone, String attribute :franchisor_id, Integer attribute :franchisor_name, String attribute :facebook_connected, Axiom::Types::Boolean attribute :facebook_needs_reconnection, Axiom::Types::Boolean attribute :facebook_reputation, Float attribute :yelp_connected, Axiom::Types::Boolean attribute :yelp_needs_reconnection, Axiom::Types::Boolean attribute :yelp_reputation, Float attribute :google_connected, Axiom::Types::Boolean attribute :google_needs_reconnection, Axiom::Types::Boolean attribute :google_reputation, Float # Retreives accounts. # # @param franchisor_id [Integer] franchisor_id to get accounts for # @return [Array<Rallio::Account>] def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end # Creates an account. # # @param franchisor_id [Integer] franchisor_id to create account under # @param account [Hash] # @option account [String] :name # @option account [String] :short_name slug or other identifier # @option account [String] :url # @option account [String] :city # @option account [String] :country_code # @option account [String] :time_zone # @return [Rallio::Account] hash of account created def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end # Retreives reviews for the account. # # @param access_token [String] user access token for API access to account # @return [Array<Rallio::Review>] def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end private def type :accounts end end |
#franchisor_id ⇒ String
Returns franchisor_id account belongs to.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rallio/account.rb', line 40 class Account < Base attribute :id, Integer attribute :name, String attribute :short_name, String attribute :url, String attribute :city, String attribute :country_code, String attribute :time_zone, String attribute :franchisor_id, Integer attribute :franchisor_name, String attribute :facebook_connected, Axiom::Types::Boolean attribute :facebook_needs_reconnection, Axiom::Types::Boolean attribute :facebook_reputation, Float attribute :yelp_connected, Axiom::Types::Boolean attribute :yelp_needs_reconnection, Axiom::Types::Boolean attribute :yelp_reputation, Float attribute :google_connected, Axiom::Types::Boolean attribute :google_needs_reconnection, Axiom::Types::Boolean attribute :google_reputation, Float # Retreives accounts. # # @param franchisor_id [Integer] franchisor_id to get accounts for # @return [Array<Rallio::Account>] def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end # Creates an account. # # @param franchisor_id [Integer] franchisor_id to create account under # @param account [Hash] # @option account [String] :name # @option account [String] :short_name slug or other identifier # @option account [String] :url # @option account [String] :city # @option account [String] :country_code # @option account [String] :time_zone # @return [Rallio::Account] hash of account created def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end # Retreives reviews for the account. # # @param access_token [String] user access token for API access to account # @return [Array<Rallio::Review>] def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end private def type :accounts end end |
#franchisor_name ⇒ String
Returns franchisor_name account belongs to.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rallio/account.rb', line 40 class Account < Base attribute :id, Integer attribute :name, String attribute :short_name, String attribute :url, String attribute :city, String attribute :country_code, String attribute :time_zone, String attribute :franchisor_id, Integer attribute :franchisor_name, String attribute :facebook_connected, Axiom::Types::Boolean attribute :facebook_needs_reconnection, Axiom::Types::Boolean attribute :facebook_reputation, Float attribute :yelp_connected, Axiom::Types::Boolean attribute :yelp_needs_reconnection, Axiom::Types::Boolean attribute :yelp_reputation, Float attribute :google_connected, Axiom::Types::Boolean attribute :google_needs_reconnection, Axiom::Types::Boolean attribute :google_reputation, Float # Retreives accounts. # # @param franchisor_id [Integer] franchisor_id to get accounts for # @return [Array<Rallio::Account>] def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end # Creates an account. # # @param franchisor_id [Integer] franchisor_id to create account under # @param account [Hash] # @option account [String] :name # @option account [String] :short_name slug or other identifier # @option account [String] :url # @option account [String] :city # @option account [String] :country_code # @option account [String] :time_zone # @return [Rallio::Account] hash of account created def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end # Retreives reviews for the account. # # @param access_token [String] user access token for API access to account # @return [Array<Rallio::Review>] def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end private def type :accounts end end |
#google_connected ⇒ String
Returns google has been associated.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rallio/account.rb', line 40 class Account < Base attribute :id, Integer attribute :name, String attribute :short_name, String attribute :url, String attribute :city, String attribute :country_code, String attribute :time_zone, String attribute :franchisor_id, Integer attribute :franchisor_name, String attribute :facebook_connected, Axiom::Types::Boolean attribute :facebook_needs_reconnection, Axiom::Types::Boolean attribute :facebook_reputation, Float attribute :yelp_connected, Axiom::Types::Boolean attribute :yelp_needs_reconnection, Axiom::Types::Boolean attribute :yelp_reputation, Float attribute :google_connected, Axiom::Types::Boolean attribute :google_needs_reconnection, Axiom::Types::Boolean attribute :google_reputation, Float # Retreives accounts. # # @param franchisor_id [Integer] franchisor_id to get accounts for # @return [Array<Rallio::Account>] def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end # Creates an account. # # @param franchisor_id [Integer] franchisor_id to create account under # @param account [Hash] # @option account [String] :name # @option account [String] :short_name slug or other identifier # @option account [String] :url # @option account [String] :city # @option account [String] :country_code # @option account [String] :time_zone # @return [Rallio::Account] hash of account created def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end # Retreives reviews for the account. # # @param access_token [String] user access token for API access to account # @return [Array<Rallio::Review>] def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end private def type :accounts end end |
#google_needs_reconnection ⇒ Boolean
Returns google has lost its connection.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rallio/account.rb', line 40 class Account < Base attribute :id, Integer attribute :name, String attribute :short_name, String attribute :url, String attribute :city, String attribute :country_code, String attribute :time_zone, String attribute :franchisor_id, Integer attribute :franchisor_name, String attribute :facebook_connected, Axiom::Types::Boolean attribute :facebook_needs_reconnection, Axiom::Types::Boolean attribute :facebook_reputation, Float attribute :yelp_connected, Axiom::Types::Boolean attribute :yelp_needs_reconnection, Axiom::Types::Boolean attribute :yelp_reputation, Float attribute :google_connected, Axiom::Types::Boolean attribute :google_needs_reconnection, Axiom::Types::Boolean attribute :google_reputation, Float # Retreives accounts. # # @param franchisor_id [Integer] franchisor_id to get accounts for # @return [Array<Rallio::Account>] def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end # Creates an account. # # @param franchisor_id [Integer] franchisor_id to create account under # @param account [Hash] # @option account [String] :name # @option account [String] :short_name slug or other identifier # @option account [String] :url # @option account [String] :city # @option account [String] :country_code # @option account [String] :time_zone # @return [Rallio::Account] hash of account created def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end # Retreives reviews for the account. # # @param access_token [String] user access token for API access to account # @return [Array<Rallio::Review>] def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end private def type :accounts end end |
#google_reputation ⇒ Float
Returns average review rating for google.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rallio/account.rb', line 40 class Account < Base attribute :id, Integer attribute :name, String attribute :short_name, String attribute :url, String attribute :city, String attribute :country_code, String attribute :time_zone, String attribute :franchisor_id, Integer attribute :franchisor_name, String attribute :facebook_connected, Axiom::Types::Boolean attribute :facebook_needs_reconnection, Axiom::Types::Boolean attribute :facebook_reputation, Float attribute :yelp_connected, Axiom::Types::Boolean attribute :yelp_needs_reconnection, Axiom::Types::Boolean attribute :yelp_reputation, Float attribute :google_connected, Axiom::Types::Boolean attribute :google_needs_reconnection, Axiom::Types::Boolean attribute :google_reputation, Float # Retreives accounts. # # @param franchisor_id [Integer] franchisor_id to get accounts for # @return [Array<Rallio::Account>] def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end # Creates an account. # # @param franchisor_id [Integer] franchisor_id to create account under # @param account [Hash] # @option account [String] :name # @option account [String] :short_name slug or other identifier # @option account [String] :url # @option account [String] :city # @option account [String] :country_code # @option account [String] :time_zone # @return [Rallio::Account] hash of account created def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end # Retreives reviews for the account. # # @param access_token [String] user access token for API access to account # @return [Array<Rallio::Review>] def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end private def type :accounts end end |
#id ⇒ Integer
Returns unique id for account.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rallio/account.rb', line 40 class Account < Base attribute :id, Integer attribute :name, String attribute :short_name, String attribute :url, String attribute :city, String attribute :country_code, String attribute :time_zone, String attribute :franchisor_id, Integer attribute :franchisor_name, String attribute :facebook_connected, Axiom::Types::Boolean attribute :facebook_needs_reconnection, Axiom::Types::Boolean attribute :facebook_reputation, Float attribute :yelp_connected, Axiom::Types::Boolean attribute :yelp_needs_reconnection, Axiom::Types::Boolean attribute :yelp_reputation, Float attribute :google_connected, Axiom::Types::Boolean attribute :google_needs_reconnection, Axiom::Types::Boolean attribute :google_reputation, Float # Retreives accounts. # # @param franchisor_id [Integer] franchisor_id to get accounts for # @return [Array<Rallio::Account>] def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end # Creates an account. # # @param franchisor_id [Integer] franchisor_id to create account under # @param account [Hash] # @option account [String] :name # @option account [String] :short_name slug or other identifier # @option account [String] :url # @option account [String] :city # @option account [String] :country_code # @option account [String] :time_zone # @return [Rallio::Account] hash of account created def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end # Retreives reviews for the account. # # @param access_token [String] user access token for API access to account # @return [Array<Rallio::Review>] def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end private def type :accounts end end |
#name ⇒ String
Returns account name.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rallio/account.rb', line 40 class Account < Base attribute :id, Integer attribute :name, String attribute :short_name, String attribute :url, String attribute :city, String attribute :country_code, String attribute :time_zone, String attribute :franchisor_id, Integer attribute :franchisor_name, String attribute :facebook_connected, Axiom::Types::Boolean attribute :facebook_needs_reconnection, Axiom::Types::Boolean attribute :facebook_reputation, Float attribute :yelp_connected, Axiom::Types::Boolean attribute :yelp_needs_reconnection, Axiom::Types::Boolean attribute :yelp_reputation, Float attribute :google_connected, Axiom::Types::Boolean attribute :google_needs_reconnection, Axiom::Types::Boolean attribute :google_reputation, Float # Retreives accounts. # # @param franchisor_id [Integer] franchisor_id to get accounts for # @return [Array<Rallio::Account>] def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end # Creates an account. # # @param franchisor_id [Integer] franchisor_id to create account under # @param account [Hash] # @option account [String] :name # @option account [String] :short_name slug or other identifier # @option account [String] :url # @option account [String] :city # @option account [String] :country_code # @option account [String] :time_zone # @return [Rallio::Account] hash of account created def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end # Retreives reviews for the account. # # @param access_token [String] user access token for API access to account # @return [Array<Rallio::Review>] def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end private def type :accounts end end |
#short_name ⇒ String
Returns account short name.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rallio/account.rb', line 40 class Account < Base attribute :id, Integer attribute :name, String attribute :short_name, String attribute :url, String attribute :city, String attribute :country_code, String attribute :time_zone, String attribute :franchisor_id, Integer attribute :franchisor_name, String attribute :facebook_connected, Axiom::Types::Boolean attribute :facebook_needs_reconnection, Axiom::Types::Boolean attribute :facebook_reputation, Float attribute :yelp_connected, Axiom::Types::Boolean attribute :yelp_needs_reconnection, Axiom::Types::Boolean attribute :yelp_reputation, Float attribute :google_connected, Axiom::Types::Boolean attribute :google_needs_reconnection, Axiom::Types::Boolean attribute :google_reputation, Float # Retreives accounts. # # @param franchisor_id [Integer] franchisor_id to get accounts for # @return [Array<Rallio::Account>] def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end # Creates an account. # # @param franchisor_id [Integer] franchisor_id to create account under # @param account [Hash] # @option account [String] :name # @option account [String] :short_name slug or other identifier # @option account [String] :url # @option account [String] :city # @option account [String] :country_code # @option account [String] :time_zone # @return [Rallio::Account] hash of account created def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end # Retreives reviews for the account. # # @param access_token [String] user access token for API access to account # @return [Array<Rallio::Review>] def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end private def type :accounts end end |
#time_zone ⇒ String
Returns account time zone.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rallio/account.rb', line 40 class Account < Base attribute :id, Integer attribute :name, String attribute :short_name, String attribute :url, String attribute :city, String attribute :country_code, String attribute :time_zone, String attribute :franchisor_id, Integer attribute :franchisor_name, String attribute :facebook_connected, Axiom::Types::Boolean attribute :facebook_needs_reconnection, Axiom::Types::Boolean attribute :facebook_reputation, Float attribute :yelp_connected, Axiom::Types::Boolean attribute :yelp_needs_reconnection, Axiom::Types::Boolean attribute :yelp_reputation, Float attribute :google_connected, Axiom::Types::Boolean attribute :google_needs_reconnection, Axiom::Types::Boolean attribute :google_reputation, Float # Retreives accounts. # # @param franchisor_id [Integer] franchisor_id to get accounts for # @return [Array<Rallio::Account>] def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end # Creates an account. # # @param franchisor_id [Integer] franchisor_id to create account under # @param account [Hash] # @option account [String] :name # @option account [String] :short_name slug or other identifier # @option account [String] :url # @option account [String] :city # @option account [String] :country_code # @option account [String] :time_zone # @return [Rallio::Account] hash of account created def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end # Retreives reviews for the account. # # @param access_token [String] user access token for API access to account # @return [Array<Rallio::Review>] def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end private def type :accounts end end |
#url ⇒ String
Returns account url.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rallio/account.rb', line 40 class Account < Base attribute :id, Integer attribute :name, String attribute :short_name, String attribute :url, String attribute :city, String attribute :country_code, String attribute :time_zone, String attribute :franchisor_id, Integer attribute :franchisor_name, String attribute :facebook_connected, Axiom::Types::Boolean attribute :facebook_needs_reconnection, Axiom::Types::Boolean attribute :facebook_reputation, Float attribute :yelp_connected, Axiom::Types::Boolean attribute :yelp_needs_reconnection, Axiom::Types::Boolean attribute :yelp_reputation, Float attribute :google_connected, Axiom::Types::Boolean attribute :google_needs_reconnection, Axiom::Types::Boolean attribute :google_reputation, Float # Retreives accounts. # # @param franchisor_id [Integer] franchisor_id to get accounts for # @return [Array<Rallio::Account>] def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end # Creates an account. # # @param franchisor_id [Integer] franchisor_id to create account under # @param account [Hash] # @option account [String] :name # @option account [String] :short_name slug or other identifier # @option account [String] :url # @option account [String] :city # @option account [String] :country_code # @option account [String] :time_zone # @return [Rallio::Account] hash of account created def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end # Retreives reviews for the account. # # @param access_token [String] user access token for API access to account # @return [Array<Rallio::Review>] def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end private def type :accounts end end |
#yelp_connected ⇒ String
Returns yelp has been associated.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rallio/account.rb', line 40 class Account < Base attribute :id, Integer attribute :name, String attribute :short_name, String attribute :url, String attribute :city, String attribute :country_code, String attribute :time_zone, String attribute :franchisor_id, Integer attribute :franchisor_name, String attribute :facebook_connected, Axiom::Types::Boolean attribute :facebook_needs_reconnection, Axiom::Types::Boolean attribute :facebook_reputation, Float attribute :yelp_connected, Axiom::Types::Boolean attribute :yelp_needs_reconnection, Axiom::Types::Boolean attribute :yelp_reputation, Float attribute :google_connected, Axiom::Types::Boolean attribute :google_needs_reconnection, Axiom::Types::Boolean attribute :google_reputation, Float # Retreives accounts. # # @param franchisor_id [Integer] franchisor_id to get accounts for # @return [Array<Rallio::Account>] def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end # Creates an account. # # @param franchisor_id [Integer] franchisor_id to create account under # @param account [Hash] # @option account [String] :name # @option account [String] :short_name slug or other identifier # @option account [String] :url # @option account [String] :city # @option account [String] :country_code # @option account [String] :time_zone # @return [Rallio::Account] hash of account created def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end # Retreives reviews for the account. # # @param access_token [String] user access token for API access to account # @return [Array<Rallio::Review>] def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end private def type :accounts end end |
#yelp_needs_reconnection ⇒ Boolean
Returns yelp has lost its connection.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rallio/account.rb', line 40 class Account < Base attribute :id, Integer attribute :name, String attribute :short_name, String attribute :url, String attribute :city, String attribute :country_code, String attribute :time_zone, String attribute :franchisor_id, Integer attribute :franchisor_name, String attribute :facebook_connected, Axiom::Types::Boolean attribute :facebook_needs_reconnection, Axiom::Types::Boolean attribute :facebook_reputation, Float attribute :yelp_connected, Axiom::Types::Boolean attribute :yelp_needs_reconnection, Axiom::Types::Boolean attribute :yelp_reputation, Float attribute :google_connected, Axiom::Types::Boolean attribute :google_needs_reconnection, Axiom::Types::Boolean attribute :google_reputation, Float # Retreives accounts. # # @param franchisor_id [Integer] franchisor_id to get accounts for # @return [Array<Rallio::Account>] def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end # Creates an account. # # @param franchisor_id [Integer] franchisor_id to create account under # @param account [Hash] # @option account [String] :name # @option account [String] :short_name slug or other identifier # @option account [String] :url # @option account [String] :city # @option account [String] :country_code # @option account [String] :time_zone # @return [Rallio::Account] hash of account created def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end # Retreives reviews for the account. # # @param access_token [String] user access token for API access to account # @return [Array<Rallio::Review>] def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end private def type :accounts end end |
#yelp_reputation ⇒ Float
Returns average review rating for yelp.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/rallio/account.rb', line 40 class Account < Base attribute :id, Integer attribute :name, String attribute :short_name, String attribute :url, String attribute :city, String attribute :country_code, String attribute :time_zone, String attribute :franchisor_id, Integer attribute :franchisor_name, String attribute :facebook_connected, Axiom::Types::Boolean attribute :facebook_needs_reconnection, Axiom::Types::Boolean attribute :facebook_reputation, Float attribute :yelp_connected, Axiom::Types::Boolean attribute :yelp_needs_reconnection, Axiom::Types::Boolean attribute :yelp_reputation, Float attribute :google_connected, Axiom::Types::Boolean attribute :google_needs_reconnection, Axiom::Types::Boolean attribute :google_reputation, Float # Retreives accounts. # # @param franchisor_id [Integer] franchisor_id to get accounts for # @return [Array<Rallio::Account>] def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end # Creates an account. # # @param franchisor_id [Integer] franchisor_id to create account under # @param account [Hash] # @option account [String] :name # @option account [String] :short_name slug or other identifier # @option account [String] :url # @option account [String] :city # @option account [String] :country_code # @option account [String] :time_zone # @return [Rallio::Account] hash of account created def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end # Retreives reviews for the account. # # @param access_token [String] user access token for API access to account # @return [Array<Rallio::Review>] def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end private def type :accounts end end |
Class Method Details
.create(franchisor_id:, account:) ⇒ Rallio::Account
Creates an account.
80 81 82 83 |
# File 'lib/rallio/account.rb', line 80 def self.create(franchisor_id:, account:) response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account }) new response.parsed_response['account'] end |
.for(franchisor_id:) ⇒ Array<Rallio::Account>
Retreives accounts.
64 65 66 67 |
# File 'lib/rallio/account.rb', line 64 def self.for(franchisor_id:) response = self.get("/franchisors/#{franchisor_id}/accounts", headers: app_credentials) response.parsed_response['accounts'].map { |a| new a } end |
Instance Method Details
#reviews(access_token:) ⇒ Array<Rallio::Review>
Retreives reviews for the account.
89 90 91 |
# File 'lib/rallio/account.rb', line 89 def reviews(access_token:) Review.all(type: type, id: id, access_token: access_token) end |