Sha256: b8dad379c345a52eb0285a4f6b2237d9e2896afa378cb68b566e6342fa6eb570
Contents?: true
Size: 1.89 KB
Versions: 20
Compression:
Stored size: 1.89 KB
Contents
# File generated from our OpenAPI spec # frozen_string_literal: true module Stripe class CustomerBalanceTransactionService < StripeService # Creates an immutable transaction that updates the customer's credit [balance](https://stripe.com/docs/billing/customer/balance). 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 # Returns a list of transactions that updated the customer's [balances](https://stripe.com/docs/billing/customer/balance). 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 # Retrieves a specific customer balance transaction that updated the customer's [balances](https://stripe.com/docs/billing/customer/balance). 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 # Most credit balance transaction fields are immutable, but you may update its description and metadata. 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 end end
Version data entries
20 entries across 20 versions & 1 rubygems