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

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

Overview

A batch job allows you to perform an API operation on a large set of records asynchronously.

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_ACCOUNT_CREATE =
"/v1/accounts"
ENDPOINT_PATH_V1_ACCOUNT_DELETE =
"/v1/accounts/:account"
ENDPOINT_PATH_V1_COUPON_CREATE =
"/v1/coupons"
ENDPOINT_PATH_V1_COUPON_UPDATE =
"/v1/coupons/:coupon"
ENDPOINT_PATH_V1_COUPON_DELETE =
"/v1/coupons/:coupon"
ENDPOINT_PATH_V1_CREDIT_NOTE_CREATE =
"/v1/credit_notes"
ENDPOINT_PATH_V1_CUSTOMER_UPDATE =
"/v1/customers/:customer"
ENDPOINT_PATH_V1_CUSTOMER_DELETE =
"/v1/customers/:customer"
ENDPOINT_PATH_V1_CUSTOMER_CREATE =
"/v1/customers"
ENDPOINT_PATH_V1_CUSTOMER_DELETE_DISCOUNT =
"/v1/customers/:customer/discount"
ENDPOINT_PATH_V1_CUSTOMER_CREATE_FUNDING_INSTRUCTIONS =
"/v1/customers/:customer/funding_instructions"
ENDPOINT_PATH_V1_CUSTOMER_CREATE_SUBSCRIPTION =
"/v1/customers/:customer/subscriptions"
ENDPOINT_PATH_V1_CUSTOMER_DELETE_SUBSCRIPTION =
"/v1/customers/:customer/subscriptions"
ENDPOINT_PATH_V1_CUSTOMER_UPDATE_SUBSCRIPTION =
"/v1/customers/:customer/subscriptions/:subscription_exposed_id"
ENDPOINT_PATH_V1_CUSTOMER_DELETE_SUBSCRIPTION_DISCOUNT =
"/v1/customers/:customer/subscriptions/:subscription_exposed_id/discount"
ENDPOINT_PATH_V1_CUSTOMER_CREATE_BANK_ACCOUNT =
"/v1/customers/:customer/bank_accounts"
ENDPOINT_PATH_V1_CUSTOMER_UPDATE_BANK_ACCOUNT =
"/v1/customers/:customer/bank_accounts/:id"
ENDPOINT_PATH_V1_CUSTOMER_DELETE_BANK_ACCOUNT =
"/v1/customers/:customer/bank_accounts/:id"
ENDPOINT_PATH_V1_CUSTOMER_VERIFY_BANK_ACCOUNT =
"/v1/customers/:customer/bank_accounts/:id/verify"
ENDPOINT_PATH_V1_CUSTOMER_CREATE_CARD =
"/v1/customers/:customer/cards"
ENDPOINT_PATH_V1_CUSTOMER_UPDATE_CARD =
"/v1/customers/:customer/cards/:id"
ENDPOINT_PATH_V1_CUSTOMER_DELETE_CARD =
"/v1/customers/:customer/cards/:id"
ENDPOINT_PATH_V1_CUSTOMER_DELETE_TAX_IDS =
"/v1/customers/:customer/tax_ids"
ENDPOINT_PATH_V1_PAYMENT_SOURCE_CREATE =
"/v1/customers/:customer/sources"
ENDPOINT_PATH_V1_BANK_ACCOUNT_UPDATE =
"/v1/customers/:customer/sources/:id"
ENDPOINT_PATH_V1_BANK_ACCOUNT_DELETE =
"/v1/customers/:customer/sources/:id"
ENDPOINT_PATH_V1_BANK_ACCOUNT_VERIFY =
"/v1/customers/:customer/sources/:id/verify"
ENDPOINT_PATH_V1_CUSTOMER_BALANCE_TRANSACTION_CREATE =
"/v1/customers/:customer/balance_transactions"
ENDPOINT_PATH_V1_CUSTOMER_BALANCE_TRANSACTION_UPDATE =
"/v1/customers/:customer/balance_transactions/:transaction"
ENDPOINT_PATH_V1_CASH_BALANCE_UPDATE =
"/v1/customers/:customer/cash_balance"
ENDPOINT_PATH_V1_CUSTOMER_SESSION_CREATE =
"/v1/customer_sessions"
ENDPOINT_PATH_V1_DISPUTE_CLOSE =
"/v1/disputes/:dispute/close"
ENDPOINT_PATH_V1_INVOICE_CREATE =
"/v1/invoices"
ENDPOINT_PATH_V1_INVOICE_UPDATE =
"/v1/invoices/:invoice"
ENDPOINT_PATH_V1_INVOICE_DELETE =
"/v1/invoices/:invoice"
ENDPOINT_PATH_V1_INVOICE_PAY =
"/v1/invoices/:invoice/pay"
ENDPOINT_PATH_V1_INVOICE_SEND_INVOICE =
"/v1/invoices/:invoice/send"
ENDPOINT_PATH_V1_INVOICE_VOID_INVOICE =
"/v1/invoices/:invoice/void"
ENDPOINT_PATH_V1_INVOICE_FINALIZE_INVOICE =
"/v1/invoices/:invoice/finalize"
ENDPOINT_PATH_V1_INVOICE_MARK_UNCOLLECTIBLE =
"/v1/invoices/:invoice/mark_uncollectible"
ENDPOINT_PATH_V1_INVOICE_UPDATE_LINES =
"/v1/invoices/:invoice/update_lines"
ENDPOINT_PATH_V1_INVOICE_ADD_LINES =
"/v1/invoices/:invoice/add_lines"
ENDPOINT_PATH_V1_INVOICE_REMOVE_LINES =
"/v1/invoices/:invoice/remove_lines"
ENDPOINT_PATH_V1_INVOICE_CREATE_PREVIEW =
"/v1/invoices/create_preview"
ENDPOINT_PATH_V1_LINE_ITEM_UPDATE =
"/v1/invoices/:invoice/lines/:line_item_id"
ENDPOINT_PATH_V1_INVOICEITEM_CREATE =
"/v1/invoiceitems"
ENDPOINT_PATH_V1_INVOICEITEM_UPDATE =
"/v1/invoiceitems/:invoiceitem"
ENDPOINT_PATH_V1_INVOICEITEM_DELETE =
"/v1/invoiceitems/:invoiceitem"
ENDPOINT_PATH_V1_INVOICE_RENDERING_TEMPLATE_ARCHIVE =
"/v1/invoice_rendering_templates/:template/archive"
ENDPOINT_PATH_V1_INVOICE_RENDERING_TEMPLATE_UNARCHIVE =
"/v1/invoice_rendering_templates/:template/unarchive"
ENDPOINT_PATH_V1_PAYMENT_METHOD_ATTACH =
"/v1/payment_methods/:payment_method/attach"
ENDPOINT_PATH_V1_PRICE_CREATE =
"/v1/prices"
ENDPOINT_PATH_V1_PRICE_UPDATE =
"/v1/prices/:price"
ENDPOINT_PATH_V1_PRODUCT_CREATE =
"/v1/products"
ENDPOINT_PATH_V1_PRODUCT_UPDATE =
"/v1/products/:id"
ENDPOINT_PATH_V1_PRODUCT_DELETE =
"/v1/products/:id"
ENDPOINT_PATH_V1_PRODUCT_FEATURE_CREATE =
"/v1/products/:product/features"
ENDPOINT_PATH_V1_PRODUCT_FEATURE_DELETE =
"/v1/products/:product/features/:id"
ENDPOINT_PATH_V1_PROMOTION_CODE_CREATE =
"/v1/promotion_codes"
ENDPOINT_PATH_V1_PROMOTION_CODE_UPDATE =
"/v1/promotion_codes/:promotion_code"
ENDPOINT_PATH_V1_RADAR_VALUE_LIST_ITEM_CREATE =
"/v1/radar/value_list_items"
ENDPOINT_PATH_V1_REFUND_CREATE =
"/v1/refunds"
ENDPOINT_PATH_V1_REFUND_CANCEL =
"/v1/refunds/:refund/cancel"
ENDPOINT_PATH_V1_SUBSCRIPTION_UPDATE =
"/v1/subscriptions/:subscription_exposed_id"
ENDPOINT_PATH_V1_SUBSCRIPTION_CANCEL =
"/v1/subscriptions/:subscription_exposed_id"
ENDPOINT_PATH_V1_SUBSCRIPTION_MIGRATE =
"/v1/subscriptions/:subscription/migrate"
ENDPOINT_PATH_V1_SUBSCRIPTION_CREATE =
"/v1/subscriptions"
ENDPOINT_PATH_V1_SUBSCRIPTION_RESUME =
"/v1/subscriptions/:subscription/resume"
ENDPOINT_PATH_V1_SUBSCRIPTION_PAUSE =
"/v1/subscriptions/:subscription/pause"
ENDPOINT_PATH_V1_SUBSCRIPTION_ITEM_CREATE =
"/v1/subscription_items"
ENDPOINT_PATH_V1_SUBSCRIPTION_ITEM_UPDATE =
"/v1/subscription_items/:item"
ENDPOINT_PATH_V1_SUBSCRIPTION_ITEM_DELETE =
"/v1/subscription_items/:item"
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"
ENDPOINT_PATH_V1_SUBSCRIPTION_SCHEDULE_RELEASE =
"/v1/subscription_schedules/:schedule/release"
ENDPOINT_PATH_V1_TAX_REGISTRATION_CREATE =
"/v1/tax/registrations"
ENDPOINT_PATH_V1_TAX_REGISTRATION_UPDATE =
"/v1/tax/registrations/:id"
ENDPOINT_PATH_V1_TAX_SETTINGS_UPDATE =
"/v1/tax/settings"
ENDPOINT_PATH_V1_TAX_TRANSACTION_CREATE_REVERSAL =
"/v1/tax/transactions/create_reversal"
ENDPOINT_PATH_V1_TAX_ID_CREATE =
"/v1/tax_ids"
ENDPOINT_PATH_V1_TAX_ID_UPDATE =
"/v1/tax_ids/:id"
ENDPOINT_PATH_V1_TAX_ID_CREATE_FOR_CUSTOMER =
"/v1/customers/:customer/tax_ids"
ENDPOINT_PATH_V1_TAX_ID_DELETE =
"/v1/customers/:customer/tax_ids/:id"
ENDPOINT_PATH_V1_TAX_RATE_CREATE =
"/v1/tax_rates"
ENDPOINT_PATH_V1_TAX_RATE_UPDATE =
"/v1/tax_rates/:tax_rate"

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 the ‘batch_job` 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 ‘batch_job`.



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 requests per second defined for the ‘batch_job`.



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 ‘batch_job`.



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)

Whether validation runs before executing the ‘batch_job`.



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 ‘batch_job`.



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 ‘batch_job`.



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



518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
# File 'lib/stripe/resources/v2/core/batch_job.rb', line 518

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



514
515
516
# File 'lib/stripe/resources/v2/core/batch_job.rb', line 514

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



510
511
512
# File 'lib/stripe/resources/v2/core/batch_job.rb', line 510

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