Class: Stripe::CustomerBalanceTransactionService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::CustomerBalanceTransactionService
- Defined in:
- lib/stripe/services/customer_balance_transaction_service.rb
Defined Under Namespace
Classes: CreateParams, ListParams, RetrieveParams, UpdateParams
Instance Method Summary collapse
-
#create(customer, params = {}, opts = {}) ⇒ Object
Creates an immutable transaction that updates the customer’s credit [balance](stripe.com/docs/billing/customer/balance).
-
#list(customer, params = {}, opts = {}) ⇒ Object
Returns a list of transactions that updated the customer’s [balances](stripe.com/docs/billing/customer/balance).
-
#retrieve(customer, transaction, params = {}, opts = {}) ⇒ Object
Retrieves a specific customer balance transaction that updated the customer’s [balances](stripe.com/docs/billing/customer/balance).
-
#update(customer, transaction, params = {}, opts = {}) ⇒ Object
Most credit balance transaction fields are immutable, but you may update its description and metadata.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#create(customer, params = {}, opts = {}) ⇒ Object
Creates an immutable transaction that updates the customer’s credit [balance](stripe.com/docs/billing/customer/balance).
70 71 72 73 74 75 76 77 78 |
# File 'lib/stripe/services/customer_balance_transaction_service.rb', line 70 def create(customer, params = {}, opts = {}) request( method: :post, path: format("/v1/customers/%<customer>s/balance_transactions", { customer: CGI.escape(customer) }), params: params, opts: opts, base_address: :api ) end |
#list(customer, params = {}, opts = {}) ⇒ Object
Returns a list of transactions that updated the customer’s [balances](stripe.com/docs/billing/customer/balance).
81 82 83 84 85 86 87 88 89 |
# File 'lib/stripe/services/customer_balance_transaction_service.rb', line 81 def list(customer, params = {}, opts = {}) request( method: :get, path: format("/v1/customers/%<customer>s/balance_transactions", { customer: CGI.escape(customer) }), params: params, opts: opts, base_address: :api ) end |
#retrieve(customer, transaction, params = {}, opts = {}) ⇒ Object
Retrieves a specific customer balance transaction that updated the customer’s [balances](stripe.com/docs/billing/customer/balance).
92 93 94 95 96 97 98 99 100 |
# File 'lib/stripe/services/customer_balance_transaction_service.rb', line 92 def retrieve(customer, transaction, params = {}, opts = {}) request( method: :get, path: format("/v1/customers/%<customer>s/balance_transactions/%<transaction>s", { customer: CGI.escape(customer), transaction: CGI.escape(transaction) }), params: params, opts: opts, base_address: :api ) end |
#update(customer, transaction, params = {}, opts = {}) ⇒ Object
Most credit balance transaction fields are immutable, but you may update its description and metadata.
103 104 105 106 107 108 109 110 111 |
# File 'lib/stripe/services/customer_balance_transaction_service.rb', line 103 def update(customer, transaction, params = {}, opts = {}) request( method: :post, path: format("/v1/customers/%<customer>s/balance_transactions/%<transaction>s", { customer: CGI.escape(customer), transaction: CGI.escape(transaction) }), params: params, opts: opts, base_address: :api ) end |