Class: Stripe::GiftCards::TransactionService::CreateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::GiftCards::TransactionService::CreateParams
- Defined in:
- lib/stripe/services/gift_cards/transaction_service.rb
Defined Under Namespace
Classes: CreatedBy
Instance Attribute Summary collapse
-
#amount ⇒ Object
The amount of the transaction.
-
#confirm ⇒ Object
Whether this is a confirmed transaction.
-
#created_by ⇒ Object
Related objects which created this transaction.
-
#currency ⇒ Object
The currency of the transaction.
-
#description ⇒ Object
An arbitrary string attached to the object.
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#gift_card ⇒ Object
The gift card to create a new transaction on.
-
#metadata ⇒ Object
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#transfer_group ⇒ Object
A string that identifies this transaction as part of a group.
Instance Method Summary collapse
-
#initialize(amount: nil, confirm: nil, created_by: nil, currency: nil, description: nil, expand: nil, gift_card: nil, metadata: nil, transfer_group: nil) ⇒ CreateParams
constructor
A new instance of CreateParams.
Methods inherited from RequestParams
Constructor Details
#initialize(amount: nil, confirm: nil, created_by: nil, currency: nil, description: nil, expand: nil, gift_card: nil, metadata: nil, transfer_group: nil) ⇒ CreateParams
Returns a new instance of CreateParams.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/stripe/services/gift_cards/transaction_service.rb', line 77 def initialize( amount: nil, confirm: nil, created_by: nil, currency: nil, description: nil, expand: nil, gift_card: nil, metadata: nil, transfer_group: nil ) @amount = amount @confirm = confirm @created_by = created_by @currency = currency @description = description @expand = @gift_card = gift_card @metadata = @transfer_group = transfer_group end |
Instance Attribute Details
#amount ⇒ Object
The amount of the transaction. A negative amount deducts funds, and a positive amount adds funds.
59 60 61 |
# File 'lib/stripe/services/gift_cards/transaction_service.rb', line 59 def amount @amount end |
#confirm ⇒ Object
Whether this is a confirmed transaction. A confirmed transaction immediately deducts from/adds to the ‘amount_available` on the gift card. Otherwise, it creates a held transaction that increments the `amount_held` on the gift card.
61 62 63 |
# File 'lib/stripe/services/gift_cards/transaction_service.rb', line 61 def confirm @confirm end |
#created_by ⇒ Object
Related objects which created this transaction.
63 64 65 |
# File 'lib/stripe/services/gift_cards/transaction_service.rb', line 63 def created_by @created_by end |
#currency ⇒ Object
The currency of the transaction. This must match the currency of the gift card.
65 66 67 |
# File 'lib/stripe/services/gift_cards/transaction_service.rb', line 65 def currency @currency end |
#description ⇒ Object
An arbitrary string attached to the object. Often useful for displaying to users.
67 68 69 |
# File 'lib/stripe/services/gift_cards/transaction_service.rb', line 67 def description @description end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
69 70 71 |
# File 'lib/stripe/services/gift_cards/transaction_service.rb', line 69 def @expand end |
#gift_card ⇒ Object
The gift card to create a new transaction on.
71 72 73 |
# File 'lib/stripe/services/gift_cards/transaction_service.rb', line 71 def gift_card @gift_card end |
#metadata ⇒ Object
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`.
73 74 75 |
# File 'lib/stripe/services/gift_cards/transaction_service.rb', line 73 def @metadata end |
#transfer_group ⇒ Object
A string that identifies this transaction as part of a group. See the [Connect documentation](stripe.com/docs/connect/separate-charges-and-transfers) for details.
75 76 77 |
# File 'lib/stripe/services/gift_cards/transaction_service.rb', line 75 def transfer_group @transfer_group end |