Class: ProcessOut::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/processout.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project_id, project_secret) ⇒ Client



26
27
28
29
30
31
# File 'lib/processout.rb', line 26

def initialize(project_id, project_secret)
  @host = "https://api.processout.com"

  @project_id = project_id
  @project_secret = project_secret
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



24
25
26
# File 'lib/processout.rb', line 24

def host
  @host
end

#project_idObject (readonly)

Returns the value of attribute project_id.



24
25
26
# File 'lib/processout.rb', line 24

def project_id
  @project_id
end

#project_secretObject (readonly)

Returns the value of attribute project_secret.



24
25
26
# File 'lib/processout.rb', line 24

def project_secret
  @project_secret
end

Instance Method Details

#activity(data = {}) ⇒ Object

Create a new Activity instance



34
35
36
# File 'lib/processout.rb', line 34

def activity(data = {})
  obj = Activity.new(self, data)
end

#authorization_request(data = {}) ⇒ Object

Create a new AuthorizationRequest instance



39
40
41
# File 'lib/processout.rb', line 39

def authorization_request(data = {})
  obj = AuthorizationRequest.new(self, data)
end

#card(data = {}) ⇒ Object

Create a new Card instance



44
45
46
# File 'lib/processout.rb', line 44

def card(data = {})
  obj = Card.new(self, data)
end

#coupon(data = {}) ⇒ Object

Create a new Coupon instance



49
50
51
# File 'lib/processout.rb', line 49

def coupon(data = {})
  obj = Coupon.new(self, data)
end

#customer(data = {}) ⇒ Object

Create a new Customer instance



54
55
56
# File 'lib/processout.rb', line 54

def customer(data = {})
  obj = Customer.new(self, data)
end

#customer_action(data = {}) ⇒ Object

Create a new CustomerAction instance



89
90
91
# File 'lib/processout.rb', line 89

def customer_action(data = {})
  obj = CustomerAction.new(self, data)
end

#discount(data = {}) ⇒ Object

Create a new Discount instance



64
65
66
# File 'lib/processout.rb', line 64

def discount(data = {})
  obj = Discount.new(self, data)
end

#event(data = {}) ⇒ Object

Create a new Event instance



69
70
71
# File 'lib/processout.rb', line 69

def event(data = {})
  obj = Event.new(self, data)
end

#gateway(data = {}) ⇒ Object

Create a new Gateway instance



74
75
76
# File 'lib/processout.rb', line 74

def gateway(data = {})
  obj = Gateway.new(self, data)
end

#gateway_configuration(data = {}) ⇒ Object

Create a new GatewayConfiguration instance



79
80
81
# File 'lib/processout.rb', line 79

def gateway_configuration(data = {})
  obj = GatewayConfiguration.new(self, data)
end

#invoice(data = {}) ⇒ Object

Create a new Invoice instance



84
85
86
# File 'lib/processout.rb', line 84

def invoice(data = {})
  obj = Invoice.new(self, data)
end

#plan(data = {}) ⇒ Object

Create a new Plan instance



94
95
96
# File 'lib/processout.rb', line 94

def plan(data = {})
  obj = Plan.new(self, data)
end

#product(data = {}) ⇒ Object

Create a new Product instance



99
100
101
# File 'lib/processout.rb', line 99

def product(data = {})
  obj = Product.new(self, data)
end

#project(data = {}) ⇒ Object

Create a new Project instance



104
105
106
# File 'lib/processout.rb', line 104

def project(data = {})
  obj = Project.new(self, data)
end

#refund(data = {}) ⇒ Object

Create a new Refund instance



109
110
111
# File 'lib/processout.rb', line 109

def refund(data = {})
  obj = Refund.new(self, data)
end

#subscription(data = {}) ⇒ Object

Create a new Subscription instance



114
115
116
# File 'lib/processout.rb', line 114

def subscription(data = {})
  obj = Subscription.new(self, data)
end

#token(data = {}) ⇒ Object

Create a new Token instance



59
60
61
# File 'lib/processout.rb', line 59

def token(data = {})
  obj = Token.new(self, data)
end

#transaction(data = {}) ⇒ Object

Create a new Transaction instance



119
120
121
# File 'lib/processout.rb', line 119

def transaction(data = {})
  obj = Transaction.new(self, data)
end

#webhook(data = {}) ⇒ Object

Create a new Webhook instance



124
125
126
# File 'lib/processout.rb', line 124

def webhook(data = {})
  obj = Webhook.new(self, data)
end