SunshineConversationsClient::Buy

August 27, 2025 ยท View on GitHub

Properties

NameTypeDescriptionNotes
typeStringThe type of action.[default to 'buy']
textStringThe button text.
amountIntegerThe amount being charged. It needs to be specified in cents and is an integer (9.99$ -> 999).
currencyStringAn ISO 4217 standard currency code in lowercase. Used for actions of type buy.[optional]
metadataHash<String, Object>Flat object containing custom properties. Strings, numbers and booleans are the only supported format that can be passed to metadata. The metadata is limited to 4KB in size.[optional]

Example

require 'sunshine-conversations-client'

instance = SunshineConversationsClient::Buy.new(
  type: null,
  text: Buy vinegar,
  amount: 8000,
  currency: CAD,
  metadata: {&quot;lang&quot;:&quot;en-ca&quot;}
)