Class: Stripe::PaymentRecordService

Inherits:
StripeService show all
Defined in:
lib/stripe/services/payment_record_service.rb

Instance Method Summary collapse

Methods inherited from StripeService

#initialize, #request, #request_stream

Constructor Details

This class inherits a constructor from Stripe::StripeService

Instance Method Details

#list(params = {}, opts = {}) ⇒ Object

List all the Payment Records for a given merchant.



7
8
9
10
11
12
13
14
15
# File 'lib/stripe/services/payment_record_service.rb', line 7

def list(params = {}, opts = {})
  request(
    method: :get,
    path: "/v1/payment_records",
    params: params,
    opts: opts,
    base_address: :api
  )
end

#report_payment(params = {}, opts = {}) ⇒ Object

Report a new Payment Record. You may report a Payment Record as it is initialized and later report updates through the other report_* methods, or report Payment Records in a terminal state directly, through this method.



20
21
22
23
24
25
26
27
28
# File 'lib/stripe/services/payment_record_service.rb', line 20

def report_payment(params = {}, opts = {})
  request(
    method: :post,
    path: "/v1/payment_records/report_payment",
    params: params,
    opts: opts,
    base_address: :api
  )
end

#report_payment_attempt(id, params = {}, opts = {}) ⇒ Object

Report a new payment attempt on the specified Payment Record. A new payment attempt can only be specified if all other payment attempts are canceled or failed.



32
33
34
35
36
37
38
39
40
# File 'lib/stripe/services/payment_record_service.rb', line 32

def report_payment_attempt(id, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/payment_records/%<id>s/report_payment_attempt", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end

#report_payment_attempt_canceled(id, params = {}, opts = {}) ⇒ Object

Report that the most recent payment attempt on the specified Payment Record was canceled.



44
45
46
47
48
49
50
51
52
# File 'lib/stripe/services/payment_record_service.rb', line 44

def report_payment_attempt_canceled(id, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/payment_records/%<id>s/report_payment_attempt_canceled", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end

#report_payment_attempt_failed(id, params = {}, opts = {}) ⇒ Object

Report that the most recent payment attempt on the specified Payment Record failed or errored.



56
57
58
59
60
61
62
63
64
# File 'lib/stripe/services/payment_record_service.rb', line 56

def report_payment_attempt_failed(id, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/payment_records/%<id>s/report_payment_attempt_failed", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end

#report_payment_attempt_guaranteed(id, params = {}, opts = {}) ⇒ Object

Report that the most recent payment attempt on the specified Payment Record was guaranteed.



68
69
70
71
72
73
74
75
76
# File 'lib/stripe/services/payment_record_service.rb', line 68

def report_payment_attempt_guaranteed(id, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/payment_records/%<id>s/report_payment_attempt_guaranteed", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end

#report_payment_attempt_informational(id, params = {}, opts = {}) ⇒ Object

Report informational updates on the specified Payment Record.



79
80
81
82
83
84
85
86
87
# File 'lib/stripe/services/payment_record_service.rb', line 79

def report_payment_attempt_informational(id, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/payment_records/%<id>s/report_payment_attempt_informational", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end

#report_refund(id, params = {}, opts = {}) ⇒ Object

Report that the most recent payment attempt on the specified Payment Record was refunded.



91
92
93
94
95
96
97
98
99
# File 'lib/stripe/services/payment_record_service.rb', line 91

def report_refund(id, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/payment_records/%<id>s/report_refund", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end

#retrieve(id, params = {}, opts = {}) ⇒ Object

Retrieves a Payment Record with the given ID



102
103
104
105
106
107
108
109
110
# File 'lib/stripe/services/payment_record_service.rb', line 102

def retrieve(id, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v1/payment_records/%<id>s", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end