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
-
#activity(data = {}) ⇒ Object
Create a new Activity instance.
-
#addon(data = {}) ⇒ Object
Create a new Addon instance.
-
#api_request(data = {}) ⇒ Object
Create a new APIRequest instance.
-
#api_version(data = {}) ⇒ Object
Create a new APIVersion instance.
-
#authorization_request(data = {}) ⇒ Object
Create a new AuthorizationRequest instance.
-
#card(data = {}) ⇒ Object
Create a new Card instance.
-
#card_information(data = {}) ⇒ Object
Create a new CardInformation instance.
-
#coupon(data = {}) ⇒ Object
Create a new Coupon instance.
-
#customer(data = {}) ⇒ Object
Create a new Customer instance.
-
#customer_action(data = {}) ⇒ Object
Create a new CustomerAction instance.
-
#discount(data = {}) ⇒ Object
Create a new Discount instance.
-
#dunning_action(data = {}) ⇒ Object
Create a new DunningAction instance.
-
#event(data = {}) ⇒ Object
Create a new Event instance.
-
#gateway(data = {}) ⇒ Object
Create a new Gateway instance.
-
#gateway_configuration(data = {}) ⇒ Object
Create a new GatewayConfiguration instance.
-
#initialize(project_id, project_secret) ⇒ Client
constructor
A new instance of Client.
-
#invoice(data = {}) ⇒ Object
Create a new Invoice instance.
-
#invoice_detail(data = {}) ⇒ Object
Create a new InvoiceDetail instance.
-
#plan(data = {}) ⇒ Object
Create a new Plan instance.
-
#product(data = {}) ⇒ Object
Create a new Product instance.
-
#project(data = {}) ⇒ Object
Create a new Project instance.
-
#refund(data = {}) ⇒ Object
Create a new Refund instance.
-
#subscription(data = {}) ⇒ Object
Create a new Subscription instance.
-
#token(data = {}) ⇒ Object
Create a new Token instance.
-
#transaction(data = {}) ⇒ Object
Create a new Transaction instance.
-
#transaction_operation(data = {}) ⇒ Object
Create a new TransactionOperation instance.
-
#webhook(data = {}) ⇒ Object
Create a new Webhook instance.
-
#webhook_endpoint(data = {}) ⇒ Object
Create a new WebhookEndpoint instance.
Constructor Details
#initialize(project_id, project_secret) ⇒ Client
Returns a new instance of Client.
35 36 37 38 39 40 |
# File 'lib/processout.rb', line 35 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.
33 34 35 |
# File 'lib/processout.rb', line 33 def host @host end |
#project_id ⇒ Object (readonly)
Returns the value of attribute project_id.
33 34 35 |
# File 'lib/processout.rb', line 33 def project_id @project_id end |
#project_secret ⇒ Object (readonly)
Returns the value of attribute project_secret.
33 34 35 |
# File 'lib/processout.rb', line 33 def project_secret @project_secret end |
Instance Method Details
#activity(data = {}) ⇒ Object
Create a new Activity instance
43 44 45 |
# File 'lib/processout.rb', line 43 def activity(data = {}) obj = Activity.new(self, data) end |
#addon(data = {}) ⇒ Object
Create a new Addon instance
48 49 50 |
# File 'lib/processout.rb', line 48 def addon(data = {}) obj = Addon.new(self, data) end |
#api_request(data = {}) ⇒ Object
Create a new APIRequest instance
53 54 55 |
# File 'lib/processout.rb', line 53 def api_request(data = {}) obj = APIRequest.new(self, data) end |
#api_version(data = {}) ⇒ Object
Create a new APIVersion instance
58 59 60 |
# File 'lib/processout.rb', line 58 def api_version(data = {}) obj = APIVersion.new(self, data) end |
#authorization_request(data = {}) ⇒ Object
Create a new AuthorizationRequest instance
63 64 65 |
# File 'lib/processout.rb', line 63 def (data = {}) obj = AuthorizationRequest.new(self, data) end |
#card(data = {}) ⇒ Object
Create a new Card instance
68 69 70 |
# File 'lib/processout.rb', line 68 def card(data = {}) obj = Card.new(self, data) end |
#card_information(data = {}) ⇒ Object
Create a new CardInformation instance
73 74 75 |
# File 'lib/processout.rb', line 73 def card_information(data = {}) obj = CardInformation.new(self, data) end |
#coupon(data = {}) ⇒ Object
Create a new Coupon instance
78 79 80 |
# File 'lib/processout.rb', line 78 def coupon(data = {}) obj = Coupon.new(self, data) end |
#customer(data = {}) ⇒ Object
Create a new Customer instance
83 84 85 |
# File 'lib/processout.rb', line 83 def customer(data = {}) obj = Customer.new(self, data) end |
#customer_action(data = {}) ⇒ Object
Create a new CustomerAction instance
123 124 125 |
# File 'lib/processout.rb', line 123 def customer_action(data = {}) obj = CustomerAction.new(self, data) end |
#discount(data = {}) ⇒ Object
Create a new Discount instance
93 94 95 |
# File 'lib/processout.rb', line 93 def discount(data = {}) obj = Discount.new(self, data) end |
#dunning_action(data = {}) ⇒ Object
Create a new DunningAction instance
128 129 130 |
# File 'lib/processout.rb', line 128 def dunning_action(data = {}) obj = DunningAction.new(self, data) end |
#event(data = {}) ⇒ Object
Create a new Event instance
98 99 100 |
# File 'lib/processout.rb', line 98 def event(data = {}) obj = Event.new(self, data) end |
#gateway(data = {}) ⇒ Object
Create a new Gateway instance
103 104 105 |
# File 'lib/processout.rb', line 103 def gateway(data = {}) obj = Gateway.new(self, data) end |
#gateway_configuration(data = {}) ⇒ Object
Create a new GatewayConfiguration instance
108 109 110 |
# File 'lib/processout.rb', line 108 def gateway_configuration(data = {}) obj = GatewayConfiguration.new(self, data) end |
#invoice(data = {}) ⇒ Object
Create a new Invoice instance
113 114 115 |
# File 'lib/processout.rb', line 113 def invoice(data = {}) obj = Invoice.new(self, data) end |
#invoice_detail(data = {}) ⇒ Object
Create a new InvoiceDetail instance
118 119 120 |
# File 'lib/processout.rb', line 118 def invoice_detail(data = {}) obj = InvoiceDetail.new(self, data) end |
#plan(data = {}) ⇒ Object
Create a new Plan instance
133 134 135 |
# File 'lib/processout.rb', line 133 def plan(data = {}) obj = Plan.new(self, data) end |
#product(data = {}) ⇒ Object
Create a new Product instance
138 139 140 |
# File 'lib/processout.rb', line 138 def product(data = {}) obj = Product.new(self, data) end |
#project(data = {}) ⇒ Object
Create a new Project instance
143 144 145 |
# File 'lib/processout.rb', line 143 def project(data = {}) obj = Project.new(self, data) end |
#refund(data = {}) ⇒ Object
Create a new Refund instance
148 149 150 |
# File 'lib/processout.rb', line 148 def refund(data = {}) obj = Refund.new(self, data) end |
#subscription(data = {}) ⇒ Object
Create a new Subscription instance
153 154 155 |
# File 'lib/processout.rb', line 153 def subscription(data = {}) obj = Subscription.new(self, data) end |
#token(data = {}) ⇒ Object
Create a new Token instance
88 89 90 |
# File 'lib/processout.rb', line 88 def token(data = {}) obj = Token.new(self, data) end |
#transaction(data = {}) ⇒ Object
Create a new Transaction instance
158 159 160 |
# File 'lib/processout.rb', line 158 def transaction(data = {}) obj = Transaction.new(self, data) end |
#transaction_operation(data = {}) ⇒ Object
Create a new TransactionOperation instance
163 164 165 |
# File 'lib/processout.rb', line 163 def transaction_operation(data = {}) obj = TransactionOperation.new(self, data) end |
#webhook(data = {}) ⇒ Object
Create a new Webhook instance
168 169 170 |
# File 'lib/processout.rb', line 168 def webhook(data = {}) obj = Webhook.new(self, data) end |
#webhook_endpoint(data = {}) ⇒ Object
Create a new WebhookEndpoint instance
173 174 175 |
# File 'lib/processout.rb', line 173 def webhook_endpoint(data = {}) obj = WebhookEndpoint.new(self, data) end |