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.



1689
1690
1691
# File 'lib/platform-api/client.rb', line 1689

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



1704
1705
1706
# File 'lib/platform-api/client.rb', line 1704

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



1697
1698
1699
# File 'lib/platform-api/client.rb', line 1697

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