Class: Increase::Resources::PhysicalCardProfiles

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/physical_card_profiles.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ PhysicalCardProfiles

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of PhysicalCardProfiles.

Parameters:



161
162
163
# File 'lib/increase/resources/physical_card_profiles.rb', line 161

def initialize(client:)
  @client = client
end

Instance Method Details

#archive(physical_card_profile_id, request_options: {}) ⇒ Increase::Models::PhysicalCardProfile

Archive a Physical Card Profile

Parameters:

  • physical_card_profile_id (String)

    The identifier of the Physical Card Profile to archive.

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



112
113
114
115
116
117
118
119
# File 'lib/increase/resources/physical_card_profiles.rb', line 112

def archive(physical_card_profile_id, params = {})
  @client.request(
    method: :post,
    path: ["physical_card_profiles/%1$s/archive", physical_card_profile_id],
    model: Increase::PhysicalCardProfile,
    options: params[:request_options]
  )
end

#clone_(physical_card_profile_id, carrier_image_file_id: nil, contact_phone: nil, description: nil, front_image_file_id: nil, front_text: nil, program_id: nil, request_options: {}) ⇒ Increase::Models::PhysicalCardProfile

Some parameter documentations has been truncated, see Models::PhysicalCardProfileCloneParams for more details.

Clone a Physical Card Profile

Parameters:

  • physical_card_profile_id (String)

    The identifier of the Physical Card Profile to clone.

  • carrier_image_file_id (String)

    The identifier of the File containing the physical card’s carrier image.

  • contact_phone (String)

    A phone number the user can contact to receive support for their card.

  • description (String)

    A description you can use to identify the Card Profile.

  • front_image_file_id (String)

    The identifier of the File containing the physical card’s front image.

  • front_text (Increase::Models::PhysicalCardProfileCloneParams::FrontText)

    Text printed on the front of the card. Reach out to [support@increase.com](mailt

  • program_id (String)

    The identifier of the Program to use for the cloned Physical Card Profile.

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



147
148
149
150
151
152
153
154
155
156
# File 'lib/increase/resources/physical_card_profiles.rb', line 147

def clone_(physical_card_profile_id, params = {})
  parsed, options = Increase::PhysicalCardProfileCloneParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["physical_card_profiles/%1$s/clone", physical_card_profile_id],
    body: parsed,
    model: Increase::PhysicalCardProfile,
    options: options
  )
end

#create(carrier_image_file_id: , contact_phone: , description: , front_image_file_id: , program_id: , back_color: nil, card_stock_reference: nil, carrier_stock_reference: nil, front_color: nil, front_text: nil, request_options: {}) ⇒ Increase::Models::PhysicalCardProfile

Some parameter documentations has been truncated, see Models::PhysicalCardProfileCreateParams for more details.

Create a Physical Card Profile

Parameters:

  • carrier_image_file_id (String)

    The identifier of the File containing the physical card’s carrier image.

  • contact_phone (String)

    A phone number the user can contact to receive support for their card.

  • description (String)

    A description you can use to identify the Card Profile.

  • front_image_file_id (String)

    The identifier of the File containing the physical card’s front image.

  • program_id (String)

    The identifier for the Program that this Physical Card Profile falls under.

  • back_color (Symbol, Increase::Models::PhysicalCardProfileCreateParams::BackColor)

    The color of the text on the back of the card. Defaults to “black”.

  • card_stock_reference (String)

    A reference ID provided by the fulfillment provider for the card stock used. Onl

  • carrier_stock_reference (String)

    A reference ID provided by the fulfillment provider for the carrier stock used.

  • front_color (Symbol, Increase::Models::PhysicalCardProfileCreateParams::FrontColor)

    The color of the design on the front of the card. Defaults to “black”.

  • front_text (Increase::Models::PhysicalCardProfileCreateParams::FrontText)

    Text printed on the front of the card. Reach out to [support@increase.com](mailt

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



38
39
40
41
42
43
44
45
46
47
# File 'lib/increase/resources/physical_card_profiles.rb', line 38

def create(params)
  parsed, options = Increase::PhysicalCardProfileCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "physical_card_profiles",
    body: parsed,
    model: Increase::PhysicalCardProfile,
    options: options
  )
end

#list(cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::PhysicalCardProfile>

Some parameter documentations has been truncated, see Models::PhysicalCardProfileListParams for more details.

List Physical Card Profiles

Parameters:

  • cursor (String)

    Return the page of entries after this one.

  • idempotency_key (String)

    Filter records to the one with the specified ‘idempotency_key` you chose for tha

  • limit (Integer)

    Limit the size of the list that is returned. The default (and maximum) is 100 ob

  • status (Increase::Models::PhysicalCardProfileListParams::Status)
  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



89
90
91
92
93
94
95
96
97
98
99
# File 'lib/increase/resources/physical_card_profiles.rb', line 89

def list(params = {})
  parsed, options = Increase::PhysicalCardProfileListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "physical_card_profiles",
    query: parsed,
    page: Increase::Internal::Page,
    model: Increase::PhysicalCardProfile,
    options: options
  )
end

#retrieve(physical_card_profile_id, request_options: {}) ⇒ Increase::Models::PhysicalCardProfile

Retrieve a Card Profile

Parameters:

  • physical_card_profile_id (String)

    The identifier of the Card Profile.

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



60
61
62
63
64
65
66
67
# File 'lib/increase/resources/physical_card_profiles.rb', line 60

def retrieve(physical_card_profile_id, params = {})
  @client.request(
    method: :get,
    path: ["physical_card_profiles/%1$s", physical_card_profile_id],
    model: Increase::PhysicalCardProfile,
    options: params[:request_options]
  )
end