Module: CXML
- Defined in:
- lib/cxml/money.rb,
lib/cxml/to.rb,
lib/cxml/tax.rb,
lib/cxml-ruby.rb,
lib/cxml/from.rb,
lib/cxml/name.rb,
lib/cxml/email.rb,
lib/cxml/phone.rb,
lib/cxml/state.rb,
lib/cxml/total.rb,
lib/cxml/charge.rb,
lib/cxml/errors.rb,
lib/cxml/header.rb,
lib/cxml/parser.rb,
lib/cxml/period.rb,
lib/cxml/sender.rb,
lib/cxml/status.rb,
lib/cxml/address.rb,
lib/cxml/bill_to.rb,
lib/cxml/comment.rb,
lib/cxml/contact.rb,
lib/cxml/country.rb,
lib/cxml/item_id.rb,
lib/cxml/item_in.rb,
lib/cxml/message.rb,
lib/cxml/request.rb,
lib/cxml/segment.rb,
lib/cxml/ship_to.rb,
lib/cxml/version.rb,
lib/cxml/discount.rb,
lib/cxml/document.rb,
lib/cxml/item_out.rb,
lib/cxml/protocol.rb,
lib/cxml/response.rb,
lib/cxml/shipping.rb,
lib/cxml/extrinsic.rb,
lib/cxml/accounting.rb,
lib/cxml/credential.rb,
lib/cxml/due_amount.rb,
lib/cxml/net_amount.rb,
lib/cxml/start_page.rb,
lib/cxml/tax_amount.rb,
lib/cxml/tax_detail.rb,
lib/cxml/unit_price.rb,
lib/cxml/description.rb,
lib/cxml/item_detail.rb,
lib/cxml/country_code.rb,
lib/cxml/distribution.rb,
lib/cxml/gross_amount.rb,
lib/cxml/id_reference.rb,
lib/cxml/modification.rb,
lib/cxml/payment_term.rb,
lib/cxml/tax_location.rb,
lib/cxml/document_node.rb,
lib/cxml/modifications.rb,
lib/cxml/order_request.rb,
lib/cxml/total_charges.rb,
lib/cxml/classification.rb,
lib/cxml/credential_mac.rb,
lib/cxml/deducted_price.rb,
lib/cxml/deposit_amount.rb,
lib/cxml/postal_address.rb,
lib/cxml/supplier_setup.rb,
lib/cxml/taxable_amount.rb,
lib/cxml/additional_cost.rb,
lib/cxml/invoice_id_info.rb,
lib/cxml/invoice_partner.rb,
lib/cxml/order_reference.rb,
lib/cxml/shipping_amount.rb,
lib/cxml/subtotal_amount.rb,
lib/cxml/deduction_amount.rb,
lib/cxml/discount_percent.rb,
lib/cxml/telephone_number.rb,
lib/cxml/total_allowances.rb,
lib/cxml/browser_form_post.rb,
lib/cxml/confirmation_item.rb,
lib/cxml/document_reference.rb,
lib/cxml/confirmation_header.rb,
lib/cxml/confirmation_status.rb,
lib/cxml/invoice_detail_item.rb,
lib/cxml/modification_detail.rb,
lib/cxml/additional_deduction.rb,
lib/cxml/confirmation_request.rb,
lib/cxml/invoice_detail_order.rb,
lib/cxml/order_request_header.rb,
lib/cxml/tax_adjustment_amount.rb,
lib/cxml/invoice_detail_request.rb,
lib/cxml/invoice_detail_summary.rb,
lib/cxml/invoice_detail_discount.rb,
lib/cxml/invoice_detail_shipping.rb,
lib/cxml/punch_out_order_message.rb,
lib/cxml/punch_out_setup_request.rb,
lib/cxml/special_handling_amount.rb,
lib/cxml/punch_out_setup_response.rb,
lib/cxml/total_amount_without_tax.rb,
lib/cxml/invoice_detail_order_info.rb,
lib/cxml/master_agreement_reference.rb,
lib/cxml/invoice_detail_header_order.rb,
lib/cxml/invoice_detail_line_shipping.rb,
lib/cxml/invoice_detail_order_summary.rb,
lib/cxml/invoice_detail_item_reference.rb,
lib/cxml/invoice_detail_line_indicator.rb,
lib/cxml/invoice_detail_request_header.rb,
lib/cxml/punch_out_order_message_header.rb,
lib/cxml/invoice_detail_header_indicator.rb,
lib/cxml/invoice_detail_line_special_handling.rb
Overview
The CredentialMac element is used for the Message Authentication Code (MAC) authentication method. This authentication method is used in situations where the sender must prove to the receiver that it has been authenticated by shared secret by a trusted third party. For example, a direct PunchOut request can travel directly from a buyer to a supplier without going through a network commerce hub, because it contains a MAC (generated by the network commerce hub) that allows the supplier to authenticate it. The trusted third party computes the MAC and transfers it to the sender through the Profile transaction. The MAC is opaque to the sender (it is secure and non-reversible). To see how the MAC is transmitted from the trusted third party to the sender, see “ProfileResponse” on page 63.
Page 45 cXML reference
Defined Under Namespace
Modules: Protocol
Classes: Accounting, AdditionalCost, AdditionalDeduction, Address, BillTo, BrowserFormPost, Charge, Classification, Comments, ConfirmationHeader, ConfirmationItem, ConfirmationRequest, ConfirmationStatus, Contact, Country, CountryCode, Credential, CredentialMac, DeductedPrice, DeductionAmount, DepositAmount, Description, Discount, DiscountPercent, Distribution, Document, DocumentNode, DocumentReference, DueAmount, Email, Error, Extrinsic, From, GrossAmount, Header, IdReference, InvoiceDetailDiscount, InvoiceDetailHeaderIndicator, InvoiceDetailHeaderOrder, InvoiceDetailItem, InvoiceDetailItemReference, InvoiceDetailLineIndicator, InvoiceDetailLineShipping, InvoiceDetailLineSpecialHandling, InvoiceDetailOrder, InvoiceDetailOrderInfo, InvoiceDetailOrderSummary, InvoiceDetailRequest, InvoiceDetailRequestHeader, InvoiceDetailShipping, InvoiceDetailSummary, InvoiceIDInfo, InvoicePartner, ItemDetail, ItemID, ItemIn, ItemOut, MasterAgreementReference, Message, Modification, ModificationDetail, Modifications, Money, Name, NetAmount, OrderReference, OrderRequest, OrderRequestHeader, ParseError, Parser, PaymentTerm, Period, Phone, PostalAddress, PunchOutOrderMessage, PunchOutOrderMessageHeader, PunchOutSetupRequest, PunchOutSetupResponse, Request, Response, Segment, Sender, ShipTo, Shipping, ShippingAmount, SpecialHandlingAmount, StartPage, State, Status, SubtotalAmount, SupplierSetup, Tax, TaxAdjustmentAmount, TaxAmount, TaxDetail, TaxLocation, TaxableAmount, TelephoneNumber, To, Total, TotalAllowances, TotalAmountWithoutTax, TotalCharges, UnitPrice, UnknownAttributeError
Constant Summary
collapse
- VERSION =
'0.8.0'
Class Method Summary
collapse
Class Method Details
14
15
16
|
# File 'lib/cxml-ruby.rb', line 14
def self.configure
yield(self)
end
|
.logger ⇒ Object
26
27
28
29
30
|
# File 'lib/cxml-ruby.rb', line 26
def self.logger
return @logger if @logger
@logger ||= Logger.new($stdout, level: :warn)
end
|
.logger=(new_logger) ⇒ Object
32
33
34
|
# File 'lib/cxml-ruby.rb', line 32
def self.logger=(new_logger)
@logger = new_logger
end
|
.parse(str) ⇒ Object
10
11
12
|
# File 'lib/cxml-ruby.rb', line 10
def self.parse(str)
CXML::Parser.new(data: str).parse
end
|
.raise_unknown_elements ⇒ Object
18
19
20
|
# File 'lib/cxml-ruby.rb', line 18
def self.raise_unknown_elements
@raise_unknown_elements.nil? ? @raise_unknown_elements ||= true : @raise_unknown_elements
end
|
.raise_unknown_elements=(setting) ⇒ Object
22
23
24
|
# File 'lib/cxml-ruby.rb', line 22
def self.raise_unknown_elements=(setting)
@raise_unknown_elements = setting
end
|