Class: FastBound::Client

Inherits:
Base
  • Object
show all
Includes:
API
Defined in:
lib/fastbound-ruby/client.rb

Constant Summary

Constants included from API

API::FILE_UPLOAD_ATTRS, API::ROOT_URL, API::USER_AGENT

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from API

#delete_request, #get_request, #post_file_request, #post_request, #put_request

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



18
19
20
21
22
23
24
# File 'lib/fastbound-ruby/client.rb', line 18

def initialize(options = {})
  requires!(options, :account_number, :api_key, :account_email)

  self. = options[:account_number]
  self.api_key = options[:api_key]
  self. = options[:account_email]
end

Instance Attribute Details

#account_emailObject

Returns the value of attribute account_email.



16
17
18
# File 'lib/fastbound-ruby/client.rb', line 16

def 
  @account_email
end

#account_numberObject

Returns the value of attribute account_number.



16
17
18
# File 'lib/fastbound-ruby/client.rb', line 16

def 
  @account_number
end

#api_keyObject

Returns the value of attribute api_key.



16
17
18
# File 'lib/fastbound-ruby/client.rb', line 16

def api_key
  @api_key
end

Instance Method Details

#accountObject



26
27
28
# File 'lib/fastbound-ruby/client.rb', line 26

def 
  @account ||= FastBound::Account.new(self)
end

#acquisitionObject



30
31
32
# File 'lib/fastbound-ruby/client.rb', line 30

def acquisition
  @acquisition ||= FastBound::Acquisition.new(self)
end

#attachmentObject



34
35
36
# File 'lib/fastbound-ruby/client.rb', line 34

def attachment
  @attachment ||= FastBound::Attachment.new(self)
end

#contactObject



38
39
40
# File 'lib/fastbound-ruby/client.rb', line 38

def contact
  @contact ||= FastBound::Contact.new(self)
end

#dispositionObject



42
43
44
# File 'lib/fastbound-ruby/client.rb', line 42

def disposition
  @disposition ||= FastBound::Disposition.new(self)
end

#itemObject



46
47
48
# File 'lib/fastbound-ruby/client.rb', line 46

def item
  @item ||= FastBound::Item.new(self)
end

#smart_listObject



50
51
52
# File 'lib/fastbound-ruby/client.rb', line 50

def smart_list
  @smart_list ||= FastBound::SmartList.new(self)
end

#webhookObject



54
55
56
# File 'lib/fastbound-ruby/client.rb', line 54

def webhook
  @webhook ||= FastBound::Webhook.new(self)
end