Class: Stripe::Issuing::Program

Inherits:
APIResource show all
Extended by:
APIOperations::Create, APIOperations::List
Includes:
APIOperations::Save
Defined in:
lib/stripe/resources/issuing/program.rb

Overview

An Issuing ‘Program` represents a card program that the user has access to.

Constant Summary collapse

OBJECT_NAME =
"issuing.program"

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 included from APIOperations::Create

create

Methods included from APIOperations::List

list

Methods included from APIOperations::Save

included, #save

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

#createdObject (readonly)

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



18
19
20
# File 'lib/stripe/resources/issuing/program.rb', line 18

def created
  @created
end

#idObject (readonly)

Unique identifier for the object.



20
21
22
# File 'lib/stripe/resources/issuing/program.rb', line 20

def id
  @id
end

#is_defaultObject (readonly)

Whether or not this is the “default” issuing program new cards are created on. Only one active ‘is_default` program at the same time.



22
23
24
# File 'lib/stripe/resources/issuing/program.rb', line 22

def is_default
  @is_default
end

#metadataObject (readonly)

Set of [key-value pairs](docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.



24
25
26
# File 'lib/stripe/resources/issuing/program.rb', line 24

def 
  @metadata
end

#objectObject (readonly)

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



26
27
28
# File 'lib/stripe/resources/issuing/program.rb', line 26

def object
  @object
end

#platform_programObject (readonly)

The platform’s Issuing Program for which this program is associated.



28
29
30
# File 'lib/stripe/resources/issuing/program.rb', line 28

def platform_program
  @platform_program
end

Class Method Details

.create(params = {}, opts = {}) ⇒ Object

Create a Program object.



31
32
33
34
35
36
37
38
# File 'lib/stripe/resources/issuing/program.rb', line 31

def self.create(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: "/v1/issuing/programs",
    params: params,
    opts: opts
  )
end

.field_remappingsObject



64
65
66
# File 'lib/stripe/resources/issuing/program.rb', line 64

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



60
61
62
# File 'lib/stripe/resources/issuing/program.rb', line 60

def self.inner_class_types
  @inner_class_types = {}
end

.list(params = {}, opts = {}) ⇒ Object

List all of the programs the given Issuing user has access to.



41
42
43
44
45
46
47
48
# File 'lib/stripe/resources/issuing/program.rb', line 41

def self.list(params = {}, opts = {})
  request_stripe_object(
    method: :get,
    path: "/v1/issuing/programs",
    params: params,
    opts: opts
  )
end

.object_nameObject



13
14
15
# File 'lib/stripe/resources/issuing/program.rb', line 13

def self.object_name
  "issuing.program"
end

.update(program, params = {}, opts = {}) ⇒ Object

Updates a Program object.



51
52
53
54
55
56
57
58
# File 'lib/stripe/resources/issuing/program.rb', line 51

def self.update(program, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/issuing/programs/%<program>s", { program: CGI.escape(program) }),
    params: params,
    opts: opts
  )
end