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

Returns a new instance of PhysicalCardProfiles.



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

def initialize(client:)
  @client = client
end

Instance Method Details

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

Archive a Physical Card Profile

Parameters:

  • physical_card_profile_id (String)

    The identifier of the Physical Card Profile to archive.

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

    Options to specify HTTP behaviour for this request.

Returns:



75
76
77
78
79
80
81
# File 'lib/increase/resources/physical_card_profiles.rb', line 75

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

#clone(physical_card_profile_id, params = {}, opts = {}) ⇒ Increase::Models::PhysicalCardProfile

Clone a Physical Card Profile

Parameters:

  • physical_card_profile_id (String)

    The identifier of the Physical 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):

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

    Text printed on the front of the card. Reach out to [email protected] for more information.

Returns:



98
99
100
101
102
103
104
105
# File 'lib/increase/resources/physical_card_profiles.rb', line 98

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

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

Create a Physical 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):

  • :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.

Returns:



21
22
23
24
25
26
27
28
# File 'lib/increase/resources/physical_card_profiles.rb', line 21

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

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

List Physical 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:



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

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

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

Retrieve a Card Profile

Parameters:

  • physical_card_profile_id (String)

    The identifier of the Card Profile.

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

    Options to specify HTTP behaviour for this request.

Returns:



36
37
38
39
40
41
42
# File 'lib/increase/resources/physical_card_profiles.rb', line 36

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