Module: FlexCommerce

Defined in:
app/models/note.rb,
app/models/cart.rb,
app/models/menu.rb,
app/models/role.rb,
app/models/slug.rb,
app/models/user.rb,
app/models/email.rb,
app/models/order.rb,
app/models/bundle.rb,
app/models/coupon.rb,
app/models/import.rb,
app/models/refund.rb,
app/models/report.rb,
lib/flex_commerce.rb,
app/models/address.rb,
app/models/country.rb,
app/models/product.rb,
app/models/section.rb,
app/models/session.rb,
app/models/variant.rb,
app/models/webhook.rb,
app/models/category.rb,
app/models/redirect.rb,
app/models/tax_code.rb,
app/models/taxonomy.rb,
app/models/template.rb,
app/models/v2/order.rb,
app/models/component.rb,
app/models/line_item.rb,
app/models/menu_item.rb,
app/models/promotion.rb,
app/models/asset_file.rb,
app/models/ewis_opt_in.rb,
app/models/static_page.rb,
app/models/stock_level.rb,
lib/paypal_express/api.rb,
app/models/asset_folder.rb,
app/models/bundle_group.rb,
app/models/external_url.rb,
app/models/import_entry.rb,
app/models/remote_order.rb,
app/models/retail_store.rb,
app/models/user_profile.rb,
app/models/v2/line_item.rb,
lib/paypal_express/auth.rb,
app/models/category_tree.rb,
lib/paypal_express/setup.rb,
app/models/data_attribute.rb,
app/models/markdown_price.rb,
app/models/menu_item_item.rb,
app/models/remote_address.rb,
app/models/data_store_type.rb,
app/models/payment_process.rb,
app/models/shipping_method.rb,
app/models/v2/create_order.rb,
app/services/param_to_shql.rb,
app/models/container_coupon.rb,
app/models/customer_account.rb,
app/models/customer_segment.rb,
app/models/discount_summary.rb,
app/models/payment_provider.rb,
app/models/remote_line_item.rb,
app/models/template_section.rb,
app/models/unallocate_order.rb,
app/services/surrogate_keys.rb,
app/models/data_store_record.rb,
app/models/password_recovery.rb,
app/models/report_invocation.rb,
app/models/search_suggestion.rb,
app/models/line_item_discount.rb,
app/models/product_asset_file.rb,
app/models/static_page_folder.rb,
app/models/template_component.rb,
app/models/payment_transaction.rb,
app/models/template_definition.rb,
app/models/v2/deallocate_order.rb,
app/models/v2/unallocate_order.rb,
app/models/remote_shipping_method.rb,
app/models/customer_segment_member.rb,
app/models/free_shipping_promotion.rb,
lib/paypal_express/additional_info.rb,
lib/paypal_express/generate_summary.rb,
app/models/payment_address_verification.rb,
lib/paypal_express/cart_shipping_method.rb,
lib/paypal_express/exception/transaction.rb,
lib/paypal_express/process/paypal_params.rb,
app/models/customer_account_authentication.rb,
lib/paypal_express/exception/access_denied.rb,
lib/paypal_express/process/response_parser.rb,
lib/paypal_express/exception/not_authorized.rb,
lib/paypal_express/shipping_methods_for_cart.rb,
lib/paypal_express/exception/connection_error.rb,
app/models/promotion_qualifying_product_exclusion.rb

Defined Under Namespace

Modules: PaypalExpress, V2 Classes: Address, AssetFile, AssetFolder, Bundle, BundleGroup, Cart, Category, CategoryTree, Component, ContainerCoupon, Country, Coupon, CustomerAccount, CustomerAccountAuthentication, CustomerSegment, CustomerSegmentMember, DataAttribute, DataStoreRecord, DataStoreType, DiscountSummary, Email, EwisOptIn, ExternalUrl, FreeShippingPromotion, Import, ImportEntry, LineItem, LineItemDiscount, MarkdownPrice, Menu, MenuItem, MenuItemItem, Note, Order, ParamToShql, PasswordRecovery, PaymentAddressVerification, PaymentProcess, PaymentProvider, PaymentTransaction, Product, ProductAssetFile, Promotion, PromotionQualifyingProductExclusion, Redirect, Refund, RemoteAddress, RemoteLineItem, RemoteOrder, RemoteShippingMethod, Report, ReportInvocation, RetailStore, Role, SearchSuggestion, Section, Session, ShippingMethod, Slug, StaticPage, StaticPageFolder, StockLevel, SurrogateKeys, TaxCode, Taxonomy, Template, TemplateComponent, TemplateDefinition, TemplateSection, UnallocateOrder, User, UserProfile, Variant, Webhook

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(attributes = {}) ⇒ Object



29
30
31
# File 'app/models/order.rb', line 29

def self.create(attributes = {})
  super(attributes.merge(extra_attributes))
end

.extra_attributesObject



33
34
35
36
37
# File 'app/models/order.rb', line 33

def self.extra_attributes
  extras = {}
  extras.merge!(test: true) if FlexCommerceApi.config.order_test_mode
  extras
end

.gem_rootObject



2
3
4
# File 'lib/flex_commerce.rb', line 2

def self.gem_root
  File.expand_path("../", __dir__)
end

Instance Method Details

#allFlexCommerce::OrderShippingMethod[]

Returns all order shipping methods

Returns:

  • (FlexCommerce::OrderShippingMethod[])

    An array of order shipping methods or an empty array



# File 'app/models/shipping_method.rb', line 21