Class: PlatformAPI::OrganizationPaymentMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/platform-api/client.rb

Overview

The on file payment method for an account

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ OrganizationPaymentMethod

Returns a new instance of OrganizationPaymentMethod.



1733
1734
1735
# File 'lib/platform-api/client.rb', line 1733

def initialize(client)
  @client = client
end

Instance Method Details

#get(organization_name) ⇒ Object

Get the current payment method for an account.

Parameters:

  • organization_name:

    unique name of organization



1748
1749
1750
# File 'lib/platform-api/client.rb', line 1748

def get(organization_name)
  @client.organization_payment_method.get(organization_name)
end

#update(organization_name, body = {}) ⇒ Object

Update an existing payment method for an account.

Parameters:

  • organization_name:

    unique name of organization

  • body:

    the object to pass as the request payload



1741
1742
1743
# File 'lib/platform-api/client.rb', line 1741

def update(organization_name, body = {})
  @client.organization_payment_method.update(organization_name, body)
end