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

Returns a new instance of 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

#new_activityObject

Create a new Activity instance



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

def new_activity()
  Activity.new(self)
end

#new_authorization_requestObject

Create a new AuthorizationRequest instance



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

def new_authorization_request()
  AuthorizationRequest.new(self)
end

#new_cardObject

Create a new Card instance



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

def new_card()
  Card.new(self)
end

#new_couponObject

Create a new Coupon instance



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

def new_coupon()
  Coupon.new(self)
end

#new_customerObject

Create a new Customer instance



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

def new_customer()
  Customer.new(self)
end

#new_customer_actionObject

Create a new CustomerAction instance



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

def new_customer_action()
  CustomerAction.new(self)
end

#new_discountObject

Create a new Discount instance



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

def new_discount()
  Discount.new(self)
end

#new_eventObject

Create a new Event instance



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

def new_event()
  Event.new(self)
end

#new_gatewayObject

Create a new Gateway instance



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

def new_gateway()
  Gateway.new(self)
end

#new_gateway_configurationObject

Create a new GatewayConfiguration instance



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

def new_gateway_configuration()
  GatewayConfiguration.new(self)
end

#new_invoiceObject

Create a new Invoice instance



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

def new_invoice()
  Invoice.new(self)
end

#new_planObject

Create a new Plan instance



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

def new_plan()
  Plan.new(self)
end

#new_productObject

Create a new Product instance



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

def new_product()
  Product.new(self)
end

#new_projectObject

Create a new Project instance



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

def new_project()
  Project.new(self)
end

#new_refundObject

Create a new Refund instance



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

def new_refund()
  Refund.new(self)
end

#new_subscriptionObject

Create a new Subscription instance



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

def new_subscription()
  Subscription.new(self)
end

#new_tokenObject

Create a new Token instance



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

def new_token()
  Token.new(self)
end

#new_transactionObject

Create a new Transaction instance



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

def new_transaction()
  Transaction.new(self)
end

#new_webhookObject

Create a new Webhook instance



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

def new_webhook()
  Webhook.new(self)
end