Class: Stripe::GiftCardOperation

Inherits:
APIResource show all
Defined in:
lib/stripe/resources/gift_card_operation.rb

Overview

A GiftCardOperation represents an operation performed on a third-party gift card, such as activation, reload, cashout, balance check, or void.

Defined Under Namespace

Classes: Activation, ActivationVoid, BalanceCheck, Cashout, CashoutVoid, Reload, ReloadVoid

Constant Summary collapse

OBJECT_NAME =
"gift_card_operation"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods inherited from APIResource

class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource

Methods included from APIOperations::Request

included

Methods inherited from StripeObject

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#activationObject (readonly)

Details about a gift card activation operation.



226
227
228
# File 'lib/stripe/resources/gift_card_operation.rb', line 226

def activation
  @activation
end

#activation_voidObject (readonly)

Details about a gift card activation void operation.



228
229
230
# File 'lib/stripe/resources/gift_card_operation.rb', line 228

def activation_void
  @activation_void
end

#balance_checkObject (readonly)

Details about a gift card balance check operation.



230
231
232
# File 'lib/stripe/resources/gift_card_operation.rb', line 230

def balance_check
  @balance_check
end

#cashoutObject (readonly)

Details about a gift card cashout operation.



232
233
234
# File 'lib/stripe/resources/gift_card_operation.rb', line 232

def cashout
  @cashout
end

#cashout_voidObject (readonly)

Details about a gift card cashout void operation.



234
235
236
# File 'lib/stripe/resources/gift_card_operation.rb', line 234

def cashout_void
  @cashout_void
end

#completed_atObject (readonly)

The timestamp of when this operation was completed.



236
237
238
# File 'lib/stripe/resources/gift_card_operation.rb', line 236

def completed_at
  @completed_at
end

#createdObject (readonly)

Time at which the object was created. Measured in seconds since the Unix epoch.



238
239
240
# File 'lib/stripe/resources/gift_card_operation.rb', line 238

def created
  @created
end

#failure_codeObject (readonly)

The failure code of the operation. Only present if the status is failed.



240
241
242
# File 'lib/stripe/resources/gift_card_operation.rb', line 240

def failure_code
  @failure_code
end

#gift_cardObject (readonly)

The gift card this operation was performed on.



242
243
244
# File 'lib/stripe/resources/gift_card_operation.rb', line 242

def gift_card
  @gift_card
end

#idObject (readonly)

Unique identifier for the object.



244
245
246
# File 'lib/stripe/resources/gift_card_operation.rb', line 244

def id
  @id
end

#livemodeObject (readonly)

If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.



246
247
248
# File 'lib/stripe/resources/gift_card_operation.rb', line 246

def livemode
  @livemode
end

#locationObject (readonly)

ID of the location that this transaction's reader is assigned to.



248
249
250
# File 'lib/stripe/resources/gift_card_operation.rb', line 248

def location
  @location
end

#objectObject (readonly)

String representing the object's type. Objects of the same type share the same value.



250
251
252
# File 'lib/stripe/resources/gift_card_operation.rb', line 250

def object
  @object
end

#on_behalf_ofObject (readonly)

The connected account whose credentials were used to perform this operation.



252
253
254
# File 'lib/stripe/resources/gift_card_operation.rb', line 252

def on_behalf_of
  @on_behalf_of
end

#readerObject (readonly)

ID of the reader this transaction was made on.



254
255
256
# File 'lib/stripe/resources/gift_card_operation.rb', line 254

def reader
  @reader
end

#reloadObject (readonly)

Details about a gift card reload operation.



256
257
258
# File 'lib/stripe/resources/gift_card_operation.rb', line 256

def reload
  @reload
end

#reload_voidObject (readonly)

Details about a gift card reload void operation.



258
259
260
# File 'lib/stripe/resources/gift_card_operation.rb', line 258

def reload_void
  @reload_void
end

#statusObject (readonly)

The status of the operation.



260
261
262
# File 'lib/stripe/resources/gift_card_operation.rb', line 260

def status
  @status
end

#typeObject (readonly)

The type of operation performed.



262
263
264
# File 'lib/stripe/resources/gift_card_operation.rb', line 262

def type
  @type
end

Class Method Details

.field_remappingsObject



276
277
278
# File 'lib/stripe/resources/gift_card_operation.rb', line 276

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



264
265
266
267
268
269
270
271
272
273
274
# File 'lib/stripe/resources/gift_card_operation.rb', line 264

def self.inner_class_types
  @inner_class_types = {
    activation: Activation,
    activation_void: ActivationVoid,
    balance_check: BalanceCheck,
    cashout: Cashout,
    cashout_void: CashoutVoid,
    reload: Reload,
    reload_void: ReloadVoid,
  }
end

.object_nameObject



9
10
11
# File 'lib/stripe/resources/gift_card_operation.rb', line 9

def self.object_name
  "gift_card_operation"
end