Class: Stripe::RefundService::CreateParams

Inherits:
Stripe::RequestParams show all
Defined in:
lib/stripe/services/refund_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Stripe::RequestParams

#to_h

Constructor Details

#initialize(amount: nil, charge: nil, currency: nil, customer: nil, expand: nil, instructions_email: nil, metadata: nil, origin: nil, payment_intent: nil, reason: nil, refund_application_fee: nil, reverse_transfer: nil) ⇒ CreateParams

Returns a new instance of CreateParams.



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/stripe/services/refund_service.rb', line 84

def initialize(
  amount: nil,
  charge: nil,
  currency: nil,
  customer: nil,
  expand: nil,
  instructions_email: nil,
  metadata: nil,
  origin: nil,
  payment_intent: nil,
  reason: nil,
  refund_application_fee: nil,
  reverse_transfer: nil
)
  @amount = amount
  @charge = charge
  @currency = currency
  @customer = customer
  @expand = expand
  @instructions_email = instructions_email
  @metadata = 
  @origin = origin
  @payment_intent = payment_intent
  @reason = reason
  @refund_application_fee = refund_application_fee
  @reverse_transfer = reverse_transfer
end

Instance Attribute Details

#amountObject

Attribute for param field amount



60
61
62
# File 'lib/stripe/services/refund_service.rb', line 60

def amount
  @amount
end

#chargeObject

The identifier of the charge to refund.



62
63
64
# File 'lib/stripe/services/refund_service.rb', line 62

def charge
  @charge
end

#currencyObject

Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).



64
65
66
# File 'lib/stripe/services/refund_service.rb', line 64

def currency
  @currency
end

#customerObject

Customer whose customer balance to refund from.



66
67
68
# File 'lib/stripe/services/refund_service.rb', line 66

def customer
  @customer
end

#expandObject

Specifies which fields in the response should be expanded.



68
69
70
# File 'lib/stripe/services/refund_service.rb', line 68

def expand
  @expand
end

#instructions_emailObject

For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions.



70
71
72
# File 'lib/stripe/services/refund_service.rb', line 70

def instructions_email
  @instructions_email
end

#metadataObject

Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to ‘metadata`.



72
73
74
# File 'lib/stripe/services/refund_service.rb', line 72

def 
  @metadata
end

#originObject

Origin of the refund



74
75
76
# File 'lib/stripe/services/refund_service.rb', line 74

def origin
  @origin
end

#payment_intentObject

The identifier of the PaymentIntent to refund.



76
77
78
# File 'lib/stripe/services/refund_service.rb', line 76

def payment_intent
  @payment_intent
end

#reasonObject

String indicating the reason for the refund. If set, possible values are ‘duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms.



78
79
80
# File 'lib/stripe/services/refund_service.rb', line 78

def reason
  @reason
end

#refund_application_feeObject

Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.



80
81
82
# File 'lib/stripe/services/refund_service.rb', line 80

def refund_application_fee
  @refund_application_fee
end

#reverse_transferObject

Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).
A transfer can be reversed only by the application that created the charge.



82
83
84
# File 'lib/stripe/services/refund_service.rb', line 82

def reverse_transfer
  @reverse_transfer
end