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

Returns a new instance of DigitalCardProfiles.



6
7
8
# File 'lib/increase/resources/digital_card_profiles.rb', line 6

def initialize(client:)
  @client = client
end

Instance Method Details

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

Archive a Digital Card Profile

Parameters:

  • digital_card_profile_id (String)

    The identifier of the Digital Card Profile to archive.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:



80
81
82
83
84
85
86
# File 'lib/increase/resources/digital_card_profiles.rb', line 80

def archive(digital_card_profile_id, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/digital_card_profiles/#{digital_card_profile_id}/archive"
  req[:model] = Increase::Models::DigitalCardProfile
  @client.request(req, opts)
end

#clone(digital_card_profile_id, params = {}, opts = {}) ⇒ Increase::Models::DigitalCardProfile

Clones a Digital Card Profile

Parameters:

  • digital_card_profile_id (String)

    The identifier of the Digital Card Profile to clone.

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :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 (TextColor)

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

Returns:



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

def clone(digital_card_profile_id, params = {}, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/digital_card_profiles/#{digital_card_profile_id}/clone"
  req[:body] = params
  req[:model] = Increase::Models::DigitalCardProfile
  @client.request(req, opts)
end

#create(params = {}, opts = {}) ⇒ Increase::Models::DigitalCardProfile

Create a Digital Card Profile

Parameters:

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :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 (TextColor)

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

Returns:



26
27
28
29
30
31
32
33
# File 'lib/increase/resources/digital_card_profiles.rb', line 26

def create(params = {}, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/digital_card_profiles"
  req[:body] = params
  req[:model] = Increase::Models::DigitalCardProfile
  @client.request(req, opts)
end

#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::DigitalCardProfile>

List Card Profiles

Parameters:

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :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 that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about idempotency.

  • :limit (Integer)

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

  • :status (Status)

Returns:



64
65
66
67
68
69
70
71
72
# File 'lib/increase/resources/digital_card_profiles.rb', line 64

def list(params = {}, opts = {})
  req = {}
  req[:method] = :get
  req[:path] = "/digital_card_profiles"
  req[:query] = params
  req[:page] = Increase::Page
  req[:model] = Increase::Models::DigitalCardProfile
  @client.request(req, opts)
end

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

Retrieve a Digital Card Profile

Parameters:

  • digital_card_profile_id (String)

    The identifier of the Digital Card Profile.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:



41
42
43
44
45
46
47
# File 'lib/increase/resources/digital_card_profiles.rb', line 41

def retrieve(digital_card_profile_id, opts = {})
  req = {}
  req[:method] = :get
  req[:path] = "/digital_card_profiles/#{digital_card_profile_id}"
  req[:model] = Increase::Models::DigitalCardProfile
  @client.request(req, opts)
end