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

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

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



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

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

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

List all the Payment Records for a given merchant.



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

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.



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

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.



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

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.



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

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.



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

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.



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

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.



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

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.



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

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



114
115
116
117
118
119
120
121
122
# File 'lib/stripe/services/payment_record_service.rb', line 114

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

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

Search for PaymentRecords you've previously created using Stripe's Search Query Language. Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.



128
129
130
131
132
133
134
135
136
# File 'lib/stripe/services/payment_record_service.rb', line 128

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