Class: ProcessOut::Client
- Inherits:
-
Object
- Object
- ProcessOut::Client
- Defined in:
- lib/processout.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#project_id ⇒ Object
readonly
Returns the value of attribute project_id.
-
#project_secret ⇒ Object
readonly
Returns the value of attribute project_secret.
Instance Method Summary collapse
-
#initialize(project_id, project_secret) ⇒ Client
constructor
A new instance of Client.
-
#new_activity ⇒ Object
Create a new Activity instance.
-
#new_authorization_request ⇒ Object
Create a new AuthorizationRequest instance.
-
#new_card ⇒ Object
Create a new Card instance.
-
#new_coupon ⇒ Object
Create a new Coupon instance.
-
#new_customer ⇒ Object
Create a new Customer instance.
-
#new_customer_action ⇒ Object
Create a new CustomerAction instance.
-
#new_discount ⇒ Object
Create a new Discount instance.
-
#new_event ⇒ Object
Create a new Event instance.
-
#new_gateway ⇒ Object
Create a new Gateway instance.
-
#new_gateway_configuration ⇒ Object
Create a new GatewayConfiguration instance.
-
#new_invoice ⇒ Object
Create a new Invoice instance.
-
#new_plan ⇒ Object
Create a new Plan instance.
-
#new_product ⇒ Object
Create a new Product instance.
-
#new_project ⇒ Object
Create a new Project instance.
-
#new_refund ⇒ Object
Create a new Refund instance.
-
#new_subscription ⇒ Object
Create a new Subscription instance.
-
#new_token ⇒ Object
Create a new Token instance.
-
#new_transaction ⇒ Object
Create a new Transaction instance.
-
#new_webhook ⇒ Object
Create a new Webhook instance.
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
#host ⇒ Object (readonly)
Returns the value of attribute host.
24 25 26 |
# File 'lib/processout.rb', line 24 def host @host end |
#project_id ⇒ Object (readonly)
Returns the value of attribute project_id.
24 25 26 |
# File 'lib/processout.rb', line 24 def project_id @project_id end |
#project_secret ⇒ Object (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_activity ⇒ Object
Create a new Activity instance
34 35 36 |
# File 'lib/processout.rb', line 34 def new_activity() Activity.new(self) end |
#new_authorization_request ⇒ Object
Create a new AuthorizationRequest instance
39 40 41 |
# File 'lib/processout.rb', line 39 def () AuthorizationRequest.new(self) end |
#new_card ⇒ Object
Create a new Card instance
44 45 46 |
# File 'lib/processout.rb', line 44 def new_card() Card.new(self) end |
#new_coupon ⇒ Object
Create a new Coupon instance
49 50 51 |
# File 'lib/processout.rb', line 49 def new_coupon() Coupon.new(self) end |
#new_customer ⇒ Object
Create a new Customer instance
54 55 56 |
# File 'lib/processout.rb', line 54 def new_customer() Customer.new(self) end |
#new_customer_action ⇒ Object
Create a new CustomerAction instance
89 90 91 |
# File 'lib/processout.rb', line 89 def new_customer_action() CustomerAction.new(self) end |
#new_discount ⇒ Object
Create a new Discount instance
64 65 66 |
# File 'lib/processout.rb', line 64 def new_discount() Discount.new(self) end |
#new_event ⇒ Object
Create a new Event instance
69 70 71 |
# File 'lib/processout.rb', line 69 def new_event() Event.new(self) end |
#new_gateway ⇒ Object
Create a new Gateway instance
74 75 76 |
# File 'lib/processout.rb', line 74 def new_gateway() Gateway.new(self) end |
#new_gateway_configuration ⇒ Object
Create a new GatewayConfiguration instance
79 80 81 |
# File 'lib/processout.rb', line 79 def new_gateway_configuration() GatewayConfiguration.new(self) end |
#new_invoice ⇒ Object
Create a new Invoice instance
84 85 86 |
# File 'lib/processout.rb', line 84 def new_invoice() Invoice.new(self) end |
#new_plan ⇒ Object
Create a new Plan instance
94 95 96 |
# File 'lib/processout.rb', line 94 def new_plan() Plan.new(self) end |
#new_product ⇒ Object
Create a new Product instance
99 100 101 |
# File 'lib/processout.rb', line 99 def new_product() Product.new(self) end |
#new_project ⇒ Object
Create a new Project instance
104 105 106 |
# File 'lib/processout.rb', line 104 def new_project() Project.new(self) end |
#new_refund ⇒ Object
Create a new Refund instance
109 110 111 |
# File 'lib/processout.rb', line 109 def new_refund() Refund.new(self) end |
#new_subscription ⇒ Object
Create a new Subscription instance
114 115 116 |
# File 'lib/processout.rb', line 114 def new_subscription() Subscription.new(self) end |
#new_token ⇒ Object
Create a new Token instance
59 60 61 |
# File 'lib/processout.rb', line 59 def new_token() Token.new(self) end |
#new_transaction ⇒ Object
Create a new Transaction instance
119 120 121 |
# File 'lib/processout.rb', line 119 def new_transaction() Transaction.new(self) end |