Class: Increase::Resources::DigitalCardProfiles

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ DigitalCardProfiles

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 DigitalCardProfiles.

Parameters:



159
160
161
# File 'lib/increase/resources/digital_card_profiles.rb', line 159

def initialize(client:)
  @client = client
end

Instance Method Details

#archive(digital_card_profile_id, request_options: {}) ⇒ Increase::Models::DigitalCardProfile

Archive a Digital Card Profile

Parameters:

  • digital_card_profile_id (String)

    The identifier of the Digital Card Profile to archive.

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

Returns:

See Also:



107
108
109
110
111
112
113
114
# File 'lib/increase/resources/digital_card_profiles.rb', line 107

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

#clone_(digital_card_profile_id, app_icon_file_id: nil, background_image_file_id: nil, card_description: nil, contact_email: nil, contact_phone: nil, contact_website: nil, description: nil, issuer_name: nil, text_color: nil, request_options: {}) ⇒ Increase::Models::DigitalCardProfile

Clones a Digital Card Profile

Parameters:

  • digital_card_profile_id (String)

    The identifier of the Digital Card Profile to clone.

  • app_icon_file_id (String)

    The identifier of the File containing the card’s icon image.

  • background_image_file_id (String)

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

  • card_description (String)

    A user-facing description for the card itself.

  • contact_email (String)

    An email address the user can contact to receive support for their card.

  • contact_phone (String)

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

  • contact_website (String)

    A website the user can visit to view and receive support for their card.

  • description (String)

    A description you can use to identify the Card Profile.

  • issuer_name (String)

    A user-facing description for whoever is issuing the card.

  • text_color (Increase::Models::DigitalCardProfileCloneParams::TextColor)

    The Card’s text color, specified as an RGB triple. The default is white.

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

Returns:

See Also:



145
146
147
148
149
150
151
152
153
154
# File 'lib/increase/resources/digital_card_profiles.rb', line 145

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

#create(app_icon_file_id: , background_image_file_id: , card_description: , description: , issuer_name: , contact_email: nil, contact_phone: nil, contact_website: nil, text_color: nil, request_options: {}) ⇒ Increase::Models::DigitalCardProfile

Create a Digital Card Profile

Parameters:

  • app_icon_file_id (String)

    The identifier of the File containing the card’s icon image.

  • background_image_file_id (String)

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

  • card_description (String)

    A user-facing description for the card itself.

  • description (String)

    A description you can use to identify the Card Profile.

  • issuer_name (String)

    A user-facing description for whoever is issuing the card.

  • contact_email (String)

    An email address the user can contact to receive support for their card.

  • contact_phone (String)

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

  • contact_website (String)

    A website the user can visit to view and receive support for their card.

  • text_color (Increase::Models::DigitalCardProfileCreateParams::TextColor)

    The Card’s text color, specified as an RGB triple. The default is white.

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

Returns:

See Also:



33
34
35
36
37
38
39
40
41
42
# File 'lib/increase/resources/digital_card_profiles.rb', line 33

def create(params)
  parsed, options = Increase::DigitalCardProfileCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "digital_card_profiles",
    body: parsed,
    model: Increase::DigitalCardProfile,
    options: options
  )
end

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

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

List 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::DigitalCardProfileListParams::Status)
  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



84
85
86
87
88
89
90
91
92
93
94
# File 'lib/increase/resources/digital_card_profiles.rb', line 84

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

#retrieve(digital_card_profile_id, request_options: {}) ⇒ Increase::Models::DigitalCardProfile

Retrieve a Digital Card Profile

Parameters:

  • digital_card_profile_id (String)

    The identifier of the Digital Card Profile.

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

Returns:

See Also:



55
56
57
58
59
60
61
62
# File 'lib/increase/resources/digital_card_profiles.rb', line 55

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