Class: Stripe::V2::Core::BatchJob

Inherits:
APIResource show all
Defined in:
lib/stripe/resources/v2/core/batch_job.rb

Overview

BatchJob resource.

Defined Under Namespace

Classes: StatusDetails

Constant Summary collapse

OBJECT_NAME =
"v2.core.batch_job"
ENDPOINT_PATH_V1_ACCOUNT_UPDATE =
"/v1/accounts/:account"
ENDPOINT_PATH_V1_CREDIT_NOTE_CREATE =
"/v1/credit_notes"
ENDPOINT_PATH_V1_CUSTOMER_UPDATE =
"/v1/customers/:customer"
ENDPOINT_PATH_V1_INVOICE_UPDATE =
"/v1/invoices/:invoice"
ENDPOINT_PATH_V1_INVOICE_PAY =
"/v1/invoices/:invoice/pay"
ENDPOINT_PATH_V1_PROMOTION_CODE_CREATE =
"/v1/promotion_codes"
ENDPOINT_PATH_V1_PROMOTION_CODE_UPDATE =
"/v1/promotion_codes/:promotion_code"
ENDPOINT_PATH_V1_SUBSCRIPTION_UPDATE =
"/v1/subscriptions/:subscription_exposed_id"
ENDPOINT_PATH_V1_SUBSCRIPTION_MIGRATE =
"/v1/subscriptions/:subscription/migrate"
ENDPOINT_PATH_V1_SUBSCRIPTION_SCHEDULE_CREATE =
"/v1/subscription_schedules"
ENDPOINT_PATH_V1_SUBSCRIPTION_SCHEDULE_UPDATE =
"/v1/subscription_schedules/:schedule"
ENDPOINT_PATH_V1_SUBSCRIPTION_SCHEDULE_CANCEL =
"/v1/subscription_schedules/:schedule/cancel"

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?, #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

#createdObject (readonly)

Timestamp at which BatchJob was created.



404
405
406
# File 'lib/stripe/resources/v2/core/batch_job.rb', line 404

def created
  @created
end

#idObject (readonly)

Unique identifier for the BatchJob.



406
407
408
# File 'lib/stripe/resources/v2/core/batch_job.rb', line 406

def id
  @id
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



408
409
410
# File 'lib/stripe/resources/v2/core/batch_job.rb', line 408

def livemode
  @livemode
end

#maximum_rpsObject (readonly)

The maximum rps defined for the ‘BatchJob`.



410
411
412
# File 'lib/stripe/resources/v2/core/batch_job.rb', line 410

def maximum_rps
  @maximum_rps
end

#metadataObject (readonly)

The metadata of the ‘BatchJob` object.



412
413
414
# File 'lib/stripe/resources/v2/core/batch_job.rb', line 412

def 
  @metadata
end

#objectObject (readonly)

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



414
415
416
# File 'lib/stripe/resources/v2/core/batch_job.rb', line 414

def object
  @object
end

#skip_validationObject (readonly)

If the validation will be run previous to the execution of the ‘BatchJob`.



416
417
418
# File 'lib/stripe/resources/v2/core/batch_job.rb', line 416

def skip_validation
  @skip_validation
end

#statusObject (readonly)

The current status of the ‘BatchJob`.



418
419
420
# File 'lib/stripe/resources/v2/core/batch_job.rb', line 418

def status
  @status
end

#status_detailsObject (readonly)

Additional details about the current state of the ‘BatchJob`.



420
421
422
# File 'lib/stripe/resources/v2/core/batch_job.rb', line 420

def status_details
  @status_details
end

Class Method Details

.field_encodingsObject



443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'lib/stripe/resources/v2/core/batch_job.rb', line 443

def self.field_encodings
  @field_encodings = {
    status_details: {
      kind: :object,
      fields: {
        canceled: {
          kind: :object,
          fields: {
            failure_count: :int64_string,
            output_file: { kind: :object, fields: { size: :int64_string } },
            success_count: :int64_string,
          },
        },
        complete: {
          kind: :object,
          fields: {
            failure_count: :int64_string,
            output_file: { kind: :object, fields: { size: :int64_string } },
            success_count: :int64_string,
          },
        },
        in_progress: {
          kind: :object,
          fields: { failure_count: :int64_string, success_count: :int64_string },
        },
        timeout: {
          kind: :object,
          fields: {
            failure_count: :int64_string,
            output_file: { kind: :object, fields: { size: :int64_string } },
            success_count: :int64_string,
          },
        },
        validating: { kind: :object, fields: { validated_count: :int64_string } },
        validation_failed: {
          kind: :object,
          fields: {
            failure_count: :int64_string,
            output_file: { kind: :object, fields: { size: :int64_string } },
            success_count: :int64_string,
          },
        },
      },
    },
  }
end

.field_remappingsObject



439
440
441
# File 'lib/stripe/resources/v2/core/batch_job.rb', line 439

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



435
436
437
# File 'lib/stripe/resources/v2/core/batch_job.rb', line 435

def self.inner_class_types
  @inner_class_types = { status_details: StatusDetails }
end

.object_nameObject



10
11
12
# File 'lib/stripe/resources/v2/core/batch_job.rb', line 10

def self.object_name
  "v2.core.batch_job"
end