Class: Airwallex::AccountAmendment

Inherits:
APIResource show all
Extended by:
Airwallex::APIOperations::Create, Airwallex::APIOperations::Retrieve
Defined in:
lib/airwallex/resources/account_amendment.rb

Overview

Represents an amendment to whichever account the request is authenticated as (the platform's own account, or a connected account via x-on-behalf-of). Not nested under /accounts/Airwallex::APIResource#id — scoped implicitly by auth context, same as ConnectedAccount.current.

.create requires Admin-level API key permissions, a separate tier from the normal per-resource Read/Write scopes.

Examples:

Submit an amendment

# `target` identifies the dotted path being amended; the changed
# section is a top-level sibling keyed by its own name (e.g.
# store_details), not wrapped in a generic "changes" key.
amendment = Airwallex::AccountAmendment.create(
  target: "account_details.store_details",
  store_details: { store_name: "New Store Name" }
)

Instance Attribute Summary

Attributes inherited from APIResource

#attributes, #id

Class Method Summary collapse

Methods included from Airwallex::APIOperations::Create

create

Methods included from Airwallex::APIOperations::Retrieve

retrieve

Methods inherited from APIResource

#changed_attributes, #dirty?, #initialize, #inspect, #method_missing, #refresh, #refresh_from, resource_name, #respond_to_missing?, #to_hash, #to_json, #to_s

Constructor Details

This class inherits a constructor from Airwallex::APIResource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Airwallex::APIResource

Class Method Details

.resource_pathString

Returns API resource path for account amendments.

Returns:

  • (String)

    API resource path for account amendments



25
26
27
# File 'lib/airwallex/resources/account_amendment.rb', line 25

def self.resource_path
  "/api/v1/account/amendments"
end