Sha256: 930a5136c09624de2c9ae42bde07fb945e2a25f31a1384921215f67ea1acc79d
Contents?: true
Size: 1.91 KB
Versions: 1
Compression:
Stored size: 1.91 KB
Contents
# The content of this file was automatically generated require "cgi" require "json" require "processout/networking/request" require "processout/networking/response" module ProcessOut class ExportLayoutConfigurationConfigurationOptionsAmount attr_reader :precision attr_reader :separator def precision=(val) @precision = val end def separator=(val) @separator = val end # Initializes the ExportLayoutConfigurationConfigurationOptionsAmount object # Params: # +client+:: +ProcessOut+ client instance # +data+:: data that can be used to fill the object def initialize(client, data = {}) @client = client self.precision = data.fetch(:precision, nil) self.separator = data.fetch(:separator, nil) end # Create a new ExportLayoutConfigurationConfigurationOptionsAmount using the current client def new(data = {}) ExportLayoutConfigurationConfigurationOptionsAmount.new(@client, data) end # Overrides the JSON marshaller to only send the fields we want def to_json(options) { "precision": self.precision, "separator": self.separator, }.to_json end # Fills the object with data coming from the API # Params: # +data+:: +Hash+ of data coming from the API def fill_with_data(data) if data.nil? return self end if data.include? "precision" self.precision = data["precision"] end if data.include? "separator" self.separator = data["separator"] end self end # Prefills the object with the data passed as parameters # Params: # +data+:: +Hash+ of data def prefill(data) if data.nil? return self end self.precision = data.fetch(:precision, self.precision) self.separator = data.fetch(:separator, self.separator) self end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
processout-3.1.0 | lib/processout/export_layout_configuration_configuration_options_amount.rb |