class ZaloAPI::Resource
Attributes
attributes[R]
Public Class Methods
new(client, attributes = {})
click to toggle source
Create a new resource instance. @param [Client] client The client to use @param [Hash] attributes The optional attributes that describe the resource
# File lib/zalo_api/resource.rb, line 10 def initialize(client, attributes = {}) raise "Expected a Hash for attributes, got #{attributes.inspect}" unless attributes.is_a?(Hash) @client = client @attributes = attributes end
Public Instance Methods
base_url()
click to toggle source
# File lib/zalo_api/resource.rb, line 17 def base_url @base_url ||= "%s/%s" % [ZaloAPI::Config::OA_API_BASE, ZaloAPI::Config::OA_API_VERSION] return @base_url end